[PATCH v4 036/103] net/ice/base: update strict status when assigning BW limits
Anatoly Burakov
anatoly.burakov at intel.com
Wed Jun 26 13:41:24 CEST 2024
From: Dave Ertman <david.m.ertman at intel.com>
In the BW configuration performed by DCF functions, the strict/WFQ and priority
field (referred to as Generic in the EAS) is not updated in the FW. This needs
to be updated so as to not incorrectly allocate BW credits in the traffic
shaping Tx scheduler.
Signed-off-by: Dave Ertman <david.m.ertman at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>
---
drivers/net/ice/base/ice_sched.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index af8f8cc7a9..cb6131f69d 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -4659,6 +4659,9 @@ ice_sched_save_tc_node_bw(struct ice_port_info *pi, u8 tc,
return 0;
}
+#define ICE_SCHED_GENERIC_STRICT_MODE BIT(4)
+#define ICE_SCHED_GENERIC_PRIO_S 1
+
/**
* ice_sched_set_tc_node_bw_lmt - sets TC node BW limit
* @pi: port information structure
@@ -4683,6 +4686,17 @@ ice_sched_set_tc_node_bw_lmt(struct ice_port_info *pi, u8 tc,
tc_node = ice_sched_get_tc_node(pi, tc);
if (!tc_node)
goto exit_set_tc_node_bw;
+
+ /* update node's generic field */
+ buf = tc_node->info;
+ data = &buf.data;
+ data->valid_sections = ICE_AQC_ELEM_VALID_GENERIC;
+ data->generic = (tc << ICE_SCHED_GENERIC_PRIO_S) |
+ ICE_SCHED_GENERIC_STRICT_MODE;
+ status = ice_sched_update_elem(pi->hw, tc_node, &buf);
+ if (status)
+ goto exit_set_tc_node_bw;
+
if (bw == ICE_SCHED_DFLT_BW)
status = ice_sched_set_node_bw_dflt_lmt(pi, tc_node, rl_type);
else
--
2.43.0
More information about the dev
mailing list