From f03c22f4bae8497bc9c88715ab094e7bef46b59e Mon Sep 17 00:00:00 2001 From: Mohd Husaam Mehdi <husaam.mehdi@iopsys.eu> Date: Tue, 4 Mar 2025 17:08:03 +0530 Subject: [PATCH] qosmngr: disable per queue rate and burst size for airoha --- bbf_plugin/qos_bbf.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/bbf_plugin/qos_bbf.c b/bbf_plugin/qos_bbf.c index 12b7d42..4b4ca12 100644 --- a/bbf_plugin/qos_bbf.c +++ b/bbf_plugin/qos_bbf.c @@ -1670,6 +1670,14 @@ static int set_QoSQueue_ShapingRate(char *refparam, struct dmctx *ctx, void *dat { switch (action) { case VALUECHECK: + char *per_queue_shaper = NULL; + dmuci_get_option_value_string("qos", "globals", "per_queue_shaper", &per_queue_shaper); + + if (DM_STRLEN(per_queue_shaper) && !DM_STRCMP(per_queue_shaper, "0")) { + bbfdm_set_fault_message(ctx, "Per Queue ShapingRate not supported"); + return FAULT_9001; + } + if (bbfdm_validate_long(ctx, value, RANGE_ARGS{{"-1",NULL}}, 1)) return FAULT_9007; @@ -1677,7 +1685,6 @@ static int set_QoSQueue_ShapingRate(char *refparam, struct dmctx *ctx, void *dat bbfdm_set_fault_message(ctx, "ShapingRate value in range 101-999 not supported"); return FAULT_9007; } - break; case VALUESET: dmuci_set_value_by_section(((struct dm_data *)data)->config_section, "rate", value); @@ -1696,6 +1703,14 @@ static int set_QoSQueue_ShapingBurstSize(char *refparam, struct dmctx *ctx, void { switch (action) { case VALUECHECK: + char *per_queue_shaper = NULL; + dmuci_get_option_value_string("qos", "globals", "per_queue_shaper", &per_queue_shaper); + + if (DM_STRLEN(per_queue_shaper) && !DM_STRCMP(per_queue_shaper, "0")) { + bbfdm_set_fault_message(ctx, "Per Queue ShapingBurstSize not supported"); + return FAULT_9001; + } + if (bbfdm_validate_unsignedInt(ctx, value, RANGE_ARGS{{NULL,NULL}}, 1)) return FAULT_9007; break; -- GitLab