ice: Rebuild TC queues on VSI queue reconfiguration
Subsystems (3)
PATCH 1/1 ice: Rebuild TC queues on VSI queue reconfiguration
From: Jan Sokolowski <[email protected]>
TC queues needs to be correctly updated when the number of queues on a VSI is reconfigured, so netdev's queue and TC settings will be dynamically adjusted and could accurately represent the underlying hardware state after changes to the VSI queue counts.
--- drivers/net/ethernet/intel/ice/ice_main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_main.c +9 -1
@@ -4136,7 +4136,7 @@ bool ice_is_wol_supported(struct ice_hw *hw)int ice_vsi_recfg_qs (struct ice_vsi *vsi,int new_rx,int new_tx,bool locked) {struct ice_pf *pf = vsi->back; -int err =0 , timeout =50 ; +int i, err =0 , timeout =50 ;if (!new_rx && !new_tx)return -EINVAL ;
@@ -4162,6 +4162,14 @@ int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)ice_vsi_close (vsi);ice_vsi_rebuild (vsi,ICE_VSI_FLAG_NO_INIT ); + +ice_for_each_traffic_class (i) { +if (vsi->tc_cfg.ena_tc &BIT (i)) +netdev_set_tc_queue (vsi->netdev, + vsi->tc_cfg.tc_info[i].netdev_tc, + vsi->tc_cfg.tc_info[i].qcount_tx, + vsi->tc_cfg.tc_info[i].qoffset); + }ice_pf_dcb_recfg (pf, locked);ice_vsi_open (vsi); done:
Signature · 1 line
2.31.1
Dear Karen, dear Jan,
Thank you for the patch.
Am 29.05.24 um 09:17 schrieb Karen Ostrowska:
Quoted 3 lines
From: Jan Sokolowski <[email protected]>
TC queues needs to be correctly updated when the number of queues on
need
Quoted 3 lines
a VSI is reconfigured, so netdev's queue and TC settings will be dynamically adjusted and could accurately represent the underlying hardware state after changes to the VSI queue counts.
Please document the test configuration, and how to test/verify your change.
Quoted 13 lines
Fixes 0754d65bd4be ("ice: Add infrastructure for mqprio support via ndo_setup_tc")Reviewed-by Wojciech Drewek <[email protected]>Signed-off-by Jan Sokolowski <[email protected]>Signed-off-by Karen Ostrowska <[email protected]>--- drivers/net/ethernet/intel/ice/ice_main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)drivers/net/ethernet/intel/ice/ice_main.c +0
-0
drivers/net/ethernet/intel/ice/ice_main.c bool ice_is_wol_supported(struct ice_hw *hw) · line 4139
Quoted 5 lines
drivers/net/ethernet/intel/ice/ice_main.c +1
-1@@ -4136,7 +4136,7 @@ bool ice_is_wol_supported(struct ice_hw *hw)int ice_vsi_recfg_qs (struct ice_vsi *vsi,int new_rx,int new_tx,bool locked) {struct ice_pf *pf = vsi->back; -int err =0 , timeout =50 ; +int i, err =0 , timeout =50 ;
unsigned int
Quoted 7 lines
drivers/net/ethernet/intel/ice/ice_main.c +1
-0if (!new_rx && !new_tx)return -EINVAL ;@@ -4162,6 +4162,14 @@ int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)ice_vsi_close (vsi);ice_vsi_rebuild (vsi,ICE_VSI_FLAG_NO_INIT ); +
drivers/net/ethernet/intel/ice/ice_main.c int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked) · line 4175
Quoted 10 lines
drivers/net/ethernet/intel/ice/ice_main.c +7
-0+ice_for_each_traffic_class (i) { +if (vsi->tc_cfg.ena_tc &BIT (i)) +netdev_set_tc_queue (vsi->netdev, + vsi->tc_cfg.tc_info[i].netdev_tc, + vsi->tc_cfg.tc_info[i].qcount_tx, + vsi->tc_cfg.tc_info[i].qoffset); + }ice_pf_dcb_recfg (pf, locked);ice_vsi_open (vsi); done:
Kind regards,
Paul
Quoted 11 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Karen Ostrowska
Sent: Wednesday, May 29, 2024 12:48 PM
To: [email protected]
Cc: Ostrowska, Karen <[email protected]>; [email protected]; Sokolowski, Jan <[email protected]>; Drewek, Wojciech <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net v1] ice: Rebuild TC queues on VSI queue reconfigurationFrom: Jan Sokolowski <[email protected]>
TC queues needs to be correctly updated when the number of queues on a VSI is reconfigured, so netdev's queue and TC settings will be dynamically adjusted and could accurately represent the underlying hardware state after changes to the VSI queue counts.
Quoted 8 lines
Fixes 0754d65bd4be ("ice: Add infrastructure for mqprio support via ndo_setup_tc")Reviewed-by Wojciech Drewek <[email protected]>Signed-off-by Jan Sokolowski <[email protected]>Signed-off-by Karen Ostrowska <[email protected]>--- drivers/net/ethernet/intel/ice/ice_main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)