]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Fix ATR queue selection
authorArkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Wed, 18 Aug 2021 17:42:16 +0000 (10:42 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Aug 2021 16:55:23 +0000 (09:55 -0700)
commitf102d745a8cf224f6b640d0985aab23e300f5d8b
tree6c52dc4f224f6ff3a255a3035c29f5b3fb68dbae
parent1a102252f603aaaf4ecf3d800885670d9eb6b1aa
i40e: Fix ATR queue selection

Without this patch, ATR does not work. Receive/transmit uses queue
selection based on SW DCB hashing method.

If traffic classes are not configured for PF, then use
netdev_pick_tx function for selecting queue for packet transmission.
Instead of calling i40e_swdcb_skb_tx_hash, call netdev_pick_tx,
which ensures that packet is transmitted/received from CPU that is
running the application.

Reproduction steps:
1. Load i40e driver
2. Map each MSI interrupt of i40e port for each CPU
3. Disable ntuple, enable ATR i.e.:
ethtool -K $interface ntuple off
ethtool --set-priv-flags $interface flow-director-atr
4. Run application that is generating traffic and is bound to a
single CPU, i.e.:
taskset -c 9 netperf -H 1.1.1.1 -t TCP_RR -l 10
5. Observe behavior:
Application's traffic should be restricted to the CPU provided in
taskset.

Fixes: e04f0d9afe3d ("i40e: Fix queue-to-TC mapping on Tx")
Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Tested-by: Dave Switzer <david.switzer@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/i40e/i40e_txrx.c