]> 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)
commitb1b50452279c40532d4d95ba7d592dcf1c7c274e
tree8fd3ad4899994a37f948ea278257dd606dce5a56
parent5d407b90250278c863500eea46564371608d25fc
ice: parameterize functions responsible for Tx ring management

Commit 7fba19060479 ("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: 7fba19060479 ("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