Checks
Context | Check | Description |
---|---|---|
ci/checkpatch | warning | coding style issues |
Commit Message
Burakov, Anatoly
June 12, 2024, 3:01 p.m. UTC
From: Ian Stokes <ian.stokes@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. Call the function "ice_sched_replay_node_prio" in the configuration flow once the node has been determined and the value of strict verified. Signed-off-by: Dave Ertman <david.m.ertman@intel.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com> --- drivers/net/ice/base/ice_sched.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
Comments
On Wed, Jun 12, 2024 at 04:01:06PM +0100, Anatoly Burakov wrote: > From: Ian Stokes <ian.stokes@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. > > Call the function "ice_sched_replay_node_prio" in the configuration flow once > the node has been determined and the value of strict verified. > That change isn't in this patch.
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index af8f8cc7a9..d39106173b 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -4659,6 +4659,10 @@ 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_M 0xE +#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 +4687,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