Intel Wired LAN Driver Updates 2021-08-18
Subsystems (3)
Tony Nguyen
maintainerThis series contains updates to i40e and iavf drivers.
Arkadiusz fixes Flow Director not using the correct queue due to calling the wrong pick Tx function for i40e.
Sylwester resolves traffic loss for iavf when it attempts to change its MAC address when it does not have permissions to do so.
The following are changes since commit a786e3195d6af183033e86f0518ffd2c51c0e8ac:
net: asix: fix uninit value bugs
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 40GbE
Arkadiusz Kubalewski (1):
i40e: Fix ATR queue selection
Sylwester Dziedziuch (1):
iavf: Fix ping is lost after untrusted VF had tried to change MAC
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 +- drivers/net/ethernet/intel/iavf/iavf.h | 1 + drivers/net/ethernet/intel/iavf/iavf_main.c | 1 + .../net/ethernet/intel/iavf/iavf_virtchnl.c | 47 ++++++++++++++++++- 4 files changed, 48 insertions(+), 4 deletions(-)
Signature · 1 line
2.26.2
Tony Nguyen
maintainerPATCH 1/2 i40e: Fix ATR queue selection
From: Arkadiusz Kubalewski <[email protected]>
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.
--- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_txrx.c +1 -2
@@ -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 netdev_pick_tx (netdev, skb, sb_dev); prio = skb->priority; hw = &vsi->back->hw;
Signature · 1 line
2.26.2
Tony Nguyen
maintainerPATCH 2/2 iavf: Fix ping is lost after untrusted VF had tried to change MAC
In reply to Tony NguyenFrom: Sylwester Dziedziuch <[email protected]>
Make changes to MAC address dependent on the response of PF. Disallow changes to HW MAC address and MAC filter from untrusted VF, thanks to that ping is not lost if VF tries to change MAC. Add a new field in iavf_mac_filter, to indicate whether there was response from PF for given filter. Based on this field pass or discard the filter.
If untrusted VF tried to change it's address, it's not changed. Still filter was changed, because of that ping couldn't go through.
--- drivers/net/ethernet/intel/iavf/iavf.h | 1 + drivers/net/ethernet/intel/iavf/iavf_main.c | 1 + .../net/ethernet/intel/iavf/iavf_virtchnl.c | 47 ++++++++++++++++++- 3 files changed, 47 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/iavf/iavf.h +1 -0
@@ -136,6 +136,7 @@ struct iavf_q_vector {struct iavf_mac_filter {struct list_head list;u8 macaddr[ETH_ALEN ]; +bool is_new_mac;/* filter is new, wait for PF decision */ bool remove;/* filter needs to be removed */ bool add;/* filter needs to be added */ };
drivers/net/ethernet/intel/iavf/iavf_main.c +1 -0
@@ -751,6 +751,7 @@ struct iavf_mac_filter *iavf_add_filter(struct iavf_adapter *adapter,list_add_tail (&f->list, &adapter->mac_filter_list); f->add = true; + f->is_new_mac = true; adapter->aq_required |=IAVF_FLAG_AQ_ADD_MAC_FILTER ; }else { f->remove = false;
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +45 -2
67 lines not on this page · raw message
Signature · 1 line
2.26.2
Jakub Kicinski
maintainerQuoted 7 lines · On Wed, 18 Aug 2021 10:42:15 -0700 Tony Nguyen wrote:
This series contains updates to i40e and iavf drivers.
Arkadiusz fixes Flow Director not using the correct queue due to calling the wrong pick Tx function for i40e.
Sylwester resolves traffic loss for iavf when it attempts to change its MAC address when it does not have permissions to do so.
Applied from the list because I had to correct the Fixes tag in the first patch, please be careful with those. Thanks!