Skip to content

Commit f4b91c1

Browse files
JanJSokolowskidavem330
authored andcommitted
ice: Rebuild TC queues on VSI queue reconfiguration
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. Fixes: 0754d65 ("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]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8a67cbd commit f4b91c1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4139,7 +4139,7 @@ bool ice_is_wol_supported(struct ice_hw *hw)
41394139
int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
41404140
{
41414141
struct ice_pf *pf = vsi->back;
4142-
int err = 0, timeout = 50;
4142+
int i, err = 0, timeout = 50;
41434143

41444144
if (!new_rx && !new_tx)
41454145
return -EINVAL;
@@ -4165,6 +4165,14 @@ int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
41654165

41664166
ice_vsi_close(vsi);
41674167
ice_vsi_rebuild(vsi, ICE_VSI_FLAG_NO_INIT);
4168+
4169+
ice_for_each_traffic_class(i) {
4170+
if (vsi->tc_cfg.ena_tc & BIT(i))
4171+
netdev_set_tc_queue(vsi->netdev,
4172+
vsi->tc_cfg.tc_info[i].netdev_tc,
4173+
vsi->tc_cfg.tc_info[i].qcount_tx,
4174+
vsi->tc_cfg.tc_info[i].qoffset);
4175+
}
41684176
ice_pf_dcb_recfg(pf, locked);
41694177
ice_vsi_open(vsi);
41704178
done:

0 commit comments

Comments
 (0)