mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-11 03:45:21 +02:00
ice: Rebuild TC queues on VSI queue reconfiguration
[ Upstream commitf4b91c1d17
] 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:0754d65bd4
("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>
This commit is contained in:
parent
9d36f6312b
commit
b36267d996
|
@ -3958,7 +3958,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)
|
int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
|
||||||
{
|
{
|
||||||
struct ice_pf *pf = vsi->back;
|
struct ice_pf *pf = vsi->back;
|
||||||
int err = 0, timeout = 50;
|
int i, err = 0, timeout = 50;
|
||||||
|
|
||||||
if (!new_rx && !new_tx)
|
if (!new_rx && !new_tx)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -3984,6 +3984,14 @@ int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx, bool locked)
|
||||||
|
|
||||||
ice_vsi_close(vsi);
|
ice_vsi_close(vsi);
|
||||||
ice_vsi_rebuild(vsi, ICE_VSI_FLAG_NO_INIT);
|
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_pf_dcb_recfg(pf, locked);
|
||||||
ice_vsi_open(vsi);
|
ice_vsi_open(vsi);
|
||||||
done:
|
done:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user