From 51c076e0ce1f7648a9adaf54753a7a626c714a26 Mon Sep 17 00:00:00 2001 From: gebidelidaye Date: Fri, 29 Oct 2021 08:52:35 +0000 Subject: [PATCH 1/2] add Fix-ATR-queue-selection.patch. --- Fix-ATR-queue-selection.patch | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Fix-ATR-queue-selection.patch diff --git a/Fix-ATR-queue-selection.patch b/Fix-ATR-queue-selection.patch new file mode 100644 index 0000000..dec4019 --- /dev/null +++ b/Fix-ATR-queue-selection.patch @@ -0,0 +1,58 @@ +From a222be597e316389f9f8c26033352c124ce93056 Mon Sep 17 00:00:00 2001 +From: Arkadiusz Kubalewski +Date: Wed, 18 Aug 2021 10:42:16 -0700 +Subject: 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: 89ec1f0886c1 ("i40e: Fix queue-to-TC mapping on Tx") +Signed-off-by: Przemyslaw Patynowski +Signed-off-by: Arkadiusz Kubalewski +Tested-by: Dave Switzer +Signed-off-by: Tony Nguyen +Signed-off-by: Jakub Kicinski + +Reference:https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a222be597e316389f9f8c26033352c124ce93056 +Conflicting:Replaced some interface for adapting to the current kernel +--- + drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +(limited to 'drivers/net/ethernet/intel/i40e') + +diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c +index 3f25bd8c4924e..10a83e5385c70 100644 +--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c ++++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c +@@ -3663,8 +3663,7 @@ u16 i40e_lan_select_queue(struct net_device *netdev, + + /* is DCB enabled at all? */ + if (vsi->tc_config.numtc == 1) +- return i40e_swdcb_skb_tx_hash(netdev, skb, +- netdev->real_num_tx_queues); ++ return fallback(netdev, skb, sb_dev); + + prio = skb->priority; + hw = &vsi->back->hw; +-- +cgit 1.2.3-1.el7 \ No newline at end of file From b66f0eb0285ad81589af7fd0f10bc63956d471f9 Mon Sep 17 00:00:00 2001 From: liaichun Date: Fri, 29 Oct 2021 17:11:29 +0800 Subject: [PATCH 2/2] fix ATR queue selection Signed-off-by: liaichun --- Fix-ATR-queue-selection.patch | 32 ++++++++++++++------------------ i40e.spec | 9 ++++++++- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/Fix-ATR-queue-selection.patch b/Fix-ATR-queue-selection.patch index dec4019..6a3848e 100644 --- a/Fix-ATR-queue-selection.patch +++ b/Fix-ATR-queue-selection.patch @@ -35,24 +35,20 @@ Signed-off-by: Jakub Kicinski Reference:https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a222be597e316389f9f8c26033352c124ce93056 Conflicting:Replaced some interface for adapting to the current kernel --- - drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -(limited to 'drivers/net/ethernet/intel/i40e') - -diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c -index 3f25bd8c4924e..10a83e5385c70 100644 ---- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c -+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c -@@ -3663,8 +3663,7 @@ u16 i40e_lan_select_queue(struct net_device *netdev, +diff --git a/src/i40e_txrx.c b/src/i40e_txrx.c +index 0ca5a17..8236cde 100644 +--- a/src/i40e_txrx.c ++++ b/src/i40e_txrx.c +@@ -4189,8 +4189,7 @@ u16 i40e_lan_select_queue(struct net_device +*netdev, - /* is DCB enabled at all? */ - if (vsi->tc_config.numtc == 1) -- return i40e_swdcb_skb_tx_hash(netdev, skb, -- netdev->real_num_tx_queues); -+ return fallback(netdev, skb, sb_dev); + /* is DCB enabled at all? */ + if (vsi->tc_config.numtc == 1) +- return i40e_swdcb_skb_tx_hash(netdev, skb, +- netdev->real_num_tx_queues); ++ return fallback(netdev, skb, sb_dev); - prio = skb->priority; - hw = &vsi->back->hw; + prio = skb->priority; + hw = &vsi->back->hw; -- -cgit 1.2.3-1.el7 \ No newline at end of file +cgit 1.2.3-1.el7 diff --git a/i40e.spec b/i40e.spec index ec7030a..5c330fc 100644 --- a/i40e.spec +++ b/i40e.spec @@ -9,13 +9,14 @@ Name: i40e Summary: Intel(R) 40-10 Gigabit Ethernet Connection Network Driver Version: 2.14.13 -Release: 5 +Release: 6 Vendor: Intel Corporation License: GPL-2.0 URL: http://support.intel.com Source0: https://downloadcenter.intel.com/download/24411/Intel-Network-Adapter-Driver-for-PCIe-40-Gigabit-Ethernet-Network-Connections-Under-Linux-/%{name}-%{version}.tar.gz Patch0001: fix-gcc9-new-warning.patch +Patch0002: Fix-ATR-queue-selection.patch Requires: kernel, findutils, gawk, bash, hwdata @@ -383,6 +384,12 @@ else fi %changelog +* Fri Oct 29 2021 Aichun Li - 2.14.13-6 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix ATR queue selection + * Wed Jul 7 2021 gaihuiying - 2.14.13-5 - Type:bugfix - ID:NA