Skip to content

Commit 9d114a3

Browse files
JanJSokolowskismb49
authored andcommitted
ice: Rebuild TC queues on VSI queue reconfiguration
BugLink: https://bugs.launchpad.net/bugs/2076435 [ Upstream commit f4b91c1 ] 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 <wojciech.drewek@intel.com> Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com> Signed-off-by: Karen Ostrowska <karen.ostrowska@intel.com> Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Portia Stephens <portia.stephens@canonical.com> Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
1 parent ed9df11 commit 9d114a3

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
@@ -4100,7 +4100,7 @@ bool ice_is_wol_supported(struct ice_hw *hw)
41004100
int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
41014101
{
41024102
struct ice_pf *pf = vsi->back;
4103-
int err = 0, timeout = 50;
4103+
int i, err = 0, timeout = 50;
41044104

41054105
if (!new_rx && !new_tx)
41064106
return -EINVAL;
@@ -4126,6 +4126,14 @@ int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
41264126

41274127
ice_vsi_close(vsi);
41284128
ice_vsi_rebuild(vsi, ICE_VSI_FLAG_NO_INIT);
4129+
4130+
ice_for_each_traffic_class(i) {
4131+
if (vsi->tc_cfg.ena_tc & BIT(i))
4132+
netdev_set_tc_queue(vsi->netdev,
4133+
vsi->tc_cfg.tc_info[i].netdev_tc,
4134+
vsi->tc_cfg.tc_info[i].qcount_tx,
4135+
vsi->tc_cfg.tc_info[i].qoffset);
4136+
}
41294137
ice_pf_dcb_recfg(pf, locked);
41304138
ice_vsi_open(vsi);
41314139
done:

0 commit comments

Comments
 (0)