]> git.baikalelectronics.ru Git - kernel.git/commit
ice: parameterize functions responsible for Tx ring management
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Thu, 20 May 2021 06:35:00 +0000 (08:35 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 9 Jun 2021 20:15:10 +0000 (13:15 -0700)
commit0cf7b6085faf429f5ed1a85ee53b25643673889a
tree8fd3ad4899994a37f948ea278257dd606dce5a56
parent5eb32aaef603288e1190d15dfe7beacee90b879c
ice: parameterize functions responsible for Tx ring management

Commit dc62ecf124f0 ("ice: Change number of XDP Tx queues to match
number of Rx queues") tried to address the incorrect setting of XDP
queue count that was based on the Tx queue count, whereas in theory we
should provide the XDP queue per Rx queue. However, the routines that
setup and destroy the set of Tx resources are still based on the
vsi->num_txq.

Ice supports the asynchronous Tx/Rx queue count, so for a setup where
vsi->num_txq > vsi->num_rxq, ice_vsi_stop_tx_rings and ice_vsi_cfg_txqs
will be accessing the vsi->xdp_rings out of the bounds.

Parameterize two mentioned functions so they get the size of Tx resources
array as the input.

Fixes: dc62ecf124f0 ("ice: Change number of XDP Tx queues to match number of Rx queues")
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Kiran Bhandare <kiranx.bhandare@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_lib.c