Skip to content

Commit db63864

Browse files
committed
Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2019-09-09 This series contains a variety of cold and hot savoury changes to Intel drivers. Some of the fixes could be considered for stable even though the author did not request it. Hulk Robert cleans up (i.e. removes) a function that has no caller for the iavf driver. Radoslaw fixes an issue when there is no link in the VM after the hypervisor is restored from a low-power state due to the driver not properly restoring features in the device that had been disabled during the suspension for ixgbevf. Kai-Heng Feng modified e1000e to use mod_delayed_work() to help resolve a hot plug speed detection issue by adding a deterministic 1 second delay before running watchdog task after an interrupt. Sasha moves functions around to avoid forward declarations, since the forward declarations are not necessary for these static functions in igc. Also added a check for igc during driver probe to validate the NVM checksum. Cleaned up code defines that were not being used in the igc driver. Adds support for IP generic transmit checksum offload in the igc driver. Updated the iavf kernel documentation by a developer with no life. Jake provides another fm10k update to a local variable for ease of code readability. Mitch fixes the iavf driver to allow the VF to override the MAC address set by the host, if the VF is in "trusted" mode. Mauro S. M. Rodrigues provides several changes for i40e driver, first with resolving hw_dbg usage and referencing a i40e_hw attribute. Also implemented a debug macro using pr_debug, since the use of netdev_dbg could cause a NULL pointer dereference during probe. Finally cleaned up code that is no longer used or needed. Firo Yang provides a change in the ixgbe driver to ensure we sync the first fragment unconditionally to help resolve an issue seen in the XEN environment when the upper network stack could receive an incomplete network packet. Mariusz adds a missing device to the i40e PCI table in the driver. v2: Mauro S. M. Rodrigues updated patches 10 & 11 of the series based on feedback from Jakub Kicinski. Also updated patch 13 description so that the "Fixes:" tag was no wrapped. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 6703a60 + f78787f commit db63864

File tree

20 files changed

+373
-232
lines changed

20 files changed

+373
-232
lines changed

Documentation/networking/device_drivers/intel/iavf.rst

Lines changed: 82 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ Copyright(c) 2013-2018 Intel Corporation.
1010
Contents
1111
========
1212

13+
- Overview
1314
- Identifying Your Adapter
1415
- Additional Configurations
1516
- Known Issues/Troubleshooting
1617
- Support
1718

19+
Overview
20+
========
21+
1822
This file describes the iavf Linux* Base Driver. This driver was formerly
1923
called i40evf.
2024

@@ -27,6 +31,7 @@ The guest OS loading the iavf driver must support MSI-X interrupts.
2731

2832
Identifying Your Adapter
2933
========================
34+
3035
The driver in this kernel is compatible with devices based on the following:
3136
* Intel(R) XL710 X710 Virtual Function
3237
* Intel(R) X722 Virtual Function
@@ -50,9 +55,10 @@ Link messages will not be displayed to the console if the distribution is
5055
restricting system messages. In order to see network driver link messages on
5156
your console, set dmesg to eight by entering the following::
5257

53-
dmesg -n 8
58+
# dmesg -n 8
5459

55-
NOTE: This setting is not saved across reboots.
60+
NOTE:
61+
This setting is not saved across reboots.
5662

5763
ethtool
5864
-------
@@ -72,11 +78,11 @@ then requests from that VF to set VLAN tag stripping will be ignored.
7278
To enable/disable VLAN tag stripping for a VF, issue the following command
7379
from inside the VM in which you are running the VF::
7480

75-
ethtool -K <if_name> rxvlan on/off
81+
# ethtool -K <if_name> rxvlan on/off
7682

7783
or alternatively::
7884

79-
ethtool --offload <if_name> rxvlan on/off
85+
# ethtool --offload <if_name> rxvlan on/off
8086

8187
Adaptive Virtual Function
8288
-------------------------
@@ -91,21 +97,21 @@ additional features depending on what features are available in the PF with
9197
which the AVF is associated. The following are base mode features:
9298

9399
- 4 Queue Pairs (QP) and associated Configuration Status Registers (CSRs)
94-
for Tx/Rx.
95-
- i40e descriptors and ring format.
96-
- Descriptor write-back completion.
97-
- 1 control queue, with i40e descriptors, CSRs and ring format.
98-
- 5 MSI-X interrupt vectors and corresponding i40e CSRs.
99-
- 1 Interrupt Throttle Rate (ITR) index.
100-
- 1 Virtual Station Interface (VSI) per VF.
100+
for Tx/Rx
101+
- i40e descriptors and ring format
102+
- Descriptor write-back completion
103+
- 1 control queue, with i40e descriptors, CSRs and ring format
104+
- 5 MSI-X interrupt vectors and corresponding i40e CSRs
105+
- 1 Interrupt Throttle Rate (ITR) index
106+
- 1 Virtual Station Interface (VSI) per VF
101107
- 1 Traffic Class (TC), TC0
102108
- Receive Side Scaling (RSS) with 64 entry indirection table and key,
103-
configured through the PF.
104-
- 1 unicast MAC address reserved per VF.
105-
- 16 MAC address filters for each VF.
106-
- Stateless offloads - non-tunneled checksums.
107-
- AVF device ID.
108-
- HW mailbox is used for VF to PF communications (including on Windows).
109+
configured through the PF
110+
- 1 unicast MAC address reserved per VF
111+
- 16 MAC address filters for each VF
112+
- Stateless offloads - non-tunneled checksums
113+
- AVF device ID
114+
- HW mailbox is used for VF to PF communications (including on Windows)
109115

110116
IEEE 802.1ad (QinQ) Support
111117
---------------------------
@@ -117,8 +123,8 @@ VLAN ID, among other uses.
117123

118124
The following are examples of how to configure 802.1ad (QinQ)::
119125

120-
ip link add link eth0 eth0.24 type vlan proto 802.1ad id 24
121-
ip link add link eth0.24 eth0.24.371 type vlan proto 802.1Q id 371
126+
# ip link add link eth0 eth0.24 type vlan proto 802.1ad id 24
127+
# ip link add link eth0.24 eth0.24.371 type vlan proto 802.1Q id 371
122128

123129
Where "24" and "371" are example VLAN IDs.
124130

@@ -133,6 +139,19 @@ specific application. This can reduce latency for the specified application,
133139
and allow Tx traffic to be rate limited per application. Follow the steps below
134140
to set ADq.
135141

142+
Requirements:
143+
144+
- The sch_mqprio, act_mirred and cls_flower modules must be loaded
145+
- The latest version of iproute2
146+
- If another driver (for example, DPDK) has set cloud filters, you cannot
147+
enable ADQ
148+
- Depending on the underlying PF device, ADQ cannot be enabled when the
149+
following features are enabled:
150+
151+
+ Data Center Bridging (DCB)
152+
+ Multiple Functions per Port (MFP)
153+
+ Sideband Filters
154+
136155
1. Create traffic classes (TCs). Maximum of 8 TCs can be created per interface.
137156
The shaper bw_rlimit parameter is optional.
138157

@@ -141,9 +160,9 @@ to 1Gbit for tc0 and 3Gbit for tc1.
141160

142161
::
143162

144-
# tc qdisc add dev <interface> root mqprio num_tc 2 map 0 0 0 0 1 1 1 1
145-
queues 16@0 16@16 hw 1 mode channel shaper bw_rlimit min_rate 1Gbit 2Gbit
146-
max_rate 1Gbit 3Gbit
163+
tc qdisc add dev <interface> root mqprio num_tc 2 map 0 0 0 0 1 1 1 1
164+
queues 16@0 16@16 hw 1 mode channel shaper bw_rlimit min_rate 1Gbit 2Gbit
165+
max_rate 1Gbit 3Gbit
147166

148167
map: priority mapping for up to 16 priorities to tcs (e.g. map 0 0 0 0 1 1 1 1
149168
sets priorities 0-3 to use tc0 and 4-7 to use tc1)
@@ -162,6 +181,10 @@ Totals must be equal or less than port speed.
162181
For example: min_rate 1Gbit 3Gbit: Verify bandwidth limit using network
163182
monitoring tools such as ifstat or sar –n DEV [interval] [number of samples]
164183

184+
NOTE:
185+
Setting up channels via ethtool (ethtool -L) is not supported when the
186+
TCs are configured using mqprio.
187+
165188
2. Enable HW TC offload on interface::
166189

167190
# ethtool -K <interface> hw-tc-offload on
@@ -171,16 +194,16 @@ monitoring tools such as ifstat or sar –n DEV [interval] [number of samples]
171194
# tc qdisc add dev <interface> ingress
172195

173196
NOTES:
174-
- Run all tc commands from the iproute2 <pathtoiproute2>/tc/ directory.
175-
- ADq is not compatible with cloud filters.
197+
- Run all tc commands from the iproute2 <pathtoiproute2>/tc/ directory
198+
- ADq is not compatible with cloud filters
176199
- Setting up channels via ethtool (ethtool -L) is not supported when the TCs
177-
are configured using mqprio.
200+
are configured using mqprio
178201
- You must have iproute2 latest version
179-
- NVM version 6.01 or later is required.
202+
- NVM version 6.01 or later is required
180203
- ADq cannot be enabled when any the following features are enabled: Data
181-
Center Bridging (DCB), Multiple Functions per Port (MFP), or Sideband Filters.
204+
Center Bridging (DCB), Multiple Functions per Port (MFP), or Sideband Filters
182205
- If another driver (for example, DPDK) has set cloud filters, you cannot
183-
enable ADq.
206+
enable ADq
184207
- Tunnel filters are not supported in ADq. If encapsulated packets do arrive
185208
in non-tunnel mode, filtering will be done on the inner headers. For example,
186209
for VXLAN traffic in non-tunnel mode, PCTYPE is identified as a VXLAN
@@ -198,6 +221,16 @@ NOTES:
198221
Known Issues/Troubleshooting
199222
============================
200223

224+
Bonding fails with VFs bound to an Intel(R) Ethernet Controller 700 series device
225+
---------------------------------------------------------------------------------
226+
If you bind Virtual Functions (VFs) to an Intel(R) Ethernet Controller 700
227+
series based device, the VF slaves may fail when they become the active slave.
228+
If the MAC address of the VF is set by the PF (Physical Function) of the
229+
device, when you add a slave, or change the active-backup slave, Linux bonding
230+
tries to sync the backup slave's MAC address to the same MAC address as the
231+
active slave. Linux bonding will fail at this point. This issue will not occur
232+
if the VF's MAC address is not set by the PF.
233+
201234
Traffic Is Not Being Passed Between VM and Client
202235
-------------------------------------------------
203236
You may not be able to pass traffic between a client system and a
@@ -215,13 +248,28 @@ Do not unload a port's driver if a Virtual Function (VF) with an active Virtual
215248
Machine (VM) is bound to it. Doing so will cause the port to appear to hang.
216249
Once the VM shuts down, or otherwise releases the VF, the command will complete.
217250

251+
Using four traffic classes fails
252+
--------------------------------
253+
Do not try to reserve more than three traffic classes in the iavf driver. Doing
254+
so will fail to set any traffic classes and will cause the driver to write
255+
errors to stdout. Use a maximum of three queues to avoid this issue.
256+
257+
Multiple log error messages on iavf driver removal
258+
--------------------------------------------------
259+
If you have several VFs and you remove the iavf driver, several instances of
260+
the following log errors are written to the log::
261+
262+
Unable to send opcode 2 to PF, err I40E_ERR_QUEUE_EMPTY, aq_err ok
263+
Unable to send the message to VF 2 aq_err 12
264+
ARQ Overflow Error detected
265+
218266
Virtual machine does not get link
219267
---------------------------------
220268
If the virtual machine has more than one virtual port assigned to it, and those
221269
virtual ports are bound to different physical ports, you may not get link on
222270
all of the virtual ports. The following command may work around the issue::
223271

224-
ethtool -r <PF>
272+
# ethtool -r <PF>
225273

226274
Where <PF> is the PF interface in the host, for example: p5p1. You may need to
227275
run the command more than once to get link on all virtual ports.
@@ -251,12 +299,13 @@ traffic.
251299
If you have multiple interfaces in a server, either turn on ARP filtering by
252300
entering::
253301

254-
echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
302+
# echo 1 > /proc/sys/net/ipv4/conf/all/arp_filter
255303

256-
NOTE: This setting is not saved across reboots. The configuration change can be
257-
made permanent by adding the following line to the file /etc/sysctl.conf::
304+
NOTE:
305+
This setting is not saved across reboots. The configuration change can be
306+
made permanent by adding the following line to the file /etc/sysctl.conf::
258307

259-
net.ipv4.conf.all.arp_filter = 1
308+
net.ipv4.conf.all.arp_filter = 1
260309

261310
Another alternative is to install the interfaces in separate broadcast domains
262311
(either in different switches or in a switch partitioned to VLANs).

drivers/net/ethernet/intel/e1000e/netdev.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,8 +1780,8 @@ static irqreturn_t e1000_intr_msi(int __always_unused irq, void *data)
17801780
}
17811781
/* guard against interrupt when we're going down */
17821782
if (!test_bit(__E1000_DOWN, &adapter->state))
1783-
queue_delayed_work(adapter->e1000_workqueue,
1784-
&adapter->watchdog_task, 1);
1783+
mod_delayed_work(adapter->e1000_workqueue,
1784+
&adapter->watchdog_task, HZ);
17851785
}
17861786

17871787
/* Reset on uncorrectable ECC error */
@@ -1861,8 +1861,8 @@ static irqreturn_t e1000_intr(int __always_unused irq, void *data)
18611861
}
18621862
/* guard against interrupt when we're going down */
18631863
if (!test_bit(__E1000_DOWN, &adapter->state))
1864-
queue_delayed_work(adapter->e1000_workqueue,
1865-
&adapter->watchdog_task, 1);
1864+
mod_delayed_work(adapter->e1000_workqueue,
1865+
&adapter->watchdog_task, HZ);
18661866
}
18671867

18681868
/* Reset on uncorrectable ECC error */
@@ -1907,8 +1907,8 @@ static irqreturn_t e1000_msix_other(int __always_unused irq, void *data)
19071907
hw->mac.get_link_status = true;
19081908
/* guard against interrupt when we're going down */
19091909
if (!test_bit(__E1000_DOWN, &adapter->state))
1910-
queue_delayed_work(adapter->e1000_workqueue,
1911-
&adapter->watchdog_task, 1);
1910+
mod_delayed_work(adapter->e1000_workqueue,
1911+
&adapter->watchdog_task, HZ);
19121912
}
19131913

19141914
if (!test_bit(__E1000_DOWN, &adapter->state))

drivers/net/ethernet/intel/fm10k/fm10k_main.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,9 +1073,11 @@ netdev_tx_t fm10k_xmit_frame_ring(struct sk_buff *skb,
10731073
* + 2 desc gap to keep tail from touching head
10741074
* otherwise try next time
10751075
*/
1076-
for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
1077-
count += TXD_USE_COUNT(skb_frag_size(
1078-
&skb_shinfo(skb)->frags[f]));
1076+
for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) {
1077+
skb_frag_t *frag = &skb_shinfo(skb)->frags[f];
1078+
1079+
count += TXD_USE_COUNT(skb_frag_size(frag));
1080+
}
10791081

10801082
if (fm10k_maybe_stop_tx(tx_ring, count + 3)) {
10811083
tx_ring->tx_stats.tx_busy++;

drivers/net/ethernet/intel/i40e/i40e.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ enum i40e_state_t {
131131
__I40E_PF_RESET_REQUESTED,
132132
__I40E_CORE_RESET_REQUESTED,
133133
__I40E_GLOBAL_RESET_REQUESTED,
134-
__I40E_EMP_RESET_REQUESTED,
135134
__I40E_EMP_RESET_INTR_RECEIVED,
136135
__I40E_SUSPENDED,
137136
__I40E_PTP_TX_IN_PROGRESS,

drivers/net/ethernet/intel/i40e/i40e_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/* Copyright(c) 2013 - 2018 Intel Corporation. */
33

4+
#include "i40e.h"
45
#include "i40e_type.h"
56
#include "i40e_adminq.h"
67
#include "i40e_prototype.h"

drivers/net/ethernet/intel/i40e/i40e_debugfs.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,10 +1125,6 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
11251125
dev_info(&pf->pdev->dev, "debugfs: forcing GlobR\n");
11261126
i40e_do_reset_safe(pf, BIT(__I40E_GLOBAL_RESET_REQUESTED));
11271127

1128-
} else if (strncmp(cmd_buf, "empr", 4) == 0) {
1129-
dev_info(&pf->pdev->dev, "debugfs: forcing EMPR\n");
1130-
i40e_do_reset_safe(pf, BIT(__I40E_EMP_RESET_REQUESTED));
1131-
11321128
} else if (strncmp(cmd_buf, "read", 4) == 0) {
11331129
u32 address;
11341130
u32 value;

drivers/net/ethernet/intel/i40e/i40e_hmc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/* Copyright(c) 2013 - 2018 Intel Corporation. */
33

4+
#include "i40e.h"
45
#include "i40e_osdep.h"
56
#include "i40e_register.h"
67
#include "i40e_status.h"

drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/* Copyright(c) 2013 - 2018 Intel Corporation. */
33

4+
#include "i40e.h"
45
#include "i40e_osdep.h"
56
#include "i40e_register.h"
67
#include "i40e_type.h"
@@ -963,7 +964,7 @@ static i40e_status i40e_set_hmc_context(u8 *context_bytes,
963964

964965
/**
965966
* i40e_hmc_get_object_va - retrieves an object's virtual address
966-
* @hmc_info: pointer to i40e_hmc_info struct
967+
* @hw: the hardware struct, from which we obtain the i40e_hmc_info pointer
967968
* @object_base: pointer to u64 to get the va
968969
* @rsrc_type: the hmc resource type
969970
* @obj_idx: hmc object index
@@ -972,16 +973,16 @@ static i40e_status i40e_set_hmc_context(u8 *context_bytes,
972973
* base pointer. This function is used for LAN Queue contexts.
973974
**/
974975
static
975-
i40e_status i40e_hmc_get_object_va(struct i40e_hmc_info *hmc_info,
976-
u8 **object_base,
977-
enum i40e_hmc_lan_rsrc_type rsrc_type,
978-
u32 obj_idx)
976+
i40e_status i40e_hmc_get_object_va(struct i40e_hw *hw, u8 **object_base,
977+
enum i40e_hmc_lan_rsrc_type rsrc_type,
978+
u32 obj_idx)
979979
{
980+
struct i40e_hmc_info *hmc_info = &hw->hmc;
980981
u32 obj_offset_in_sd, obj_offset_in_pd;
981-
i40e_status ret_code = 0;
982982
struct i40e_hmc_sd_entry *sd_entry;
983983
struct i40e_hmc_pd_entry *pd_entry;
984984
u32 pd_idx, pd_lmt, rel_pd_idx;
985+
i40e_status ret_code = 0;
985986
u64 obj_offset_in_fpm;
986987
u32 sd_idx, sd_lmt;
987988

@@ -1047,7 +1048,7 @@ i40e_status i40e_clear_lan_tx_queue_context(struct i40e_hw *hw,
10471048
i40e_status err;
10481049
u8 *context_bytes;
10491050

1050-
err = i40e_hmc_get_object_va(&hw->hmc, &context_bytes,
1051+
err = i40e_hmc_get_object_va(hw, &context_bytes,
10511052
I40E_HMC_LAN_TX, queue);
10521053
if (err < 0)
10531054
return err;
@@ -1068,7 +1069,7 @@ i40e_status i40e_set_lan_tx_queue_context(struct i40e_hw *hw,
10681069
i40e_status err;
10691070
u8 *context_bytes;
10701071

1071-
err = i40e_hmc_get_object_va(&hw->hmc, &context_bytes,
1072+
err = i40e_hmc_get_object_va(hw, &context_bytes,
10721073
I40E_HMC_LAN_TX, queue);
10731074
if (err < 0)
10741075
return err;
@@ -1088,7 +1089,7 @@ i40e_status i40e_clear_lan_rx_queue_context(struct i40e_hw *hw,
10881089
i40e_status err;
10891090
u8 *context_bytes;
10901091

1091-
err = i40e_hmc_get_object_va(&hw->hmc, &context_bytes,
1092+
err = i40e_hmc_get_object_va(hw, &context_bytes,
10921093
I40E_HMC_LAN_RX, queue);
10931094
if (err < 0)
10941095
return err;
@@ -1109,7 +1110,7 @@ i40e_status i40e_set_lan_rx_queue_context(struct i40e_hw *hw,
11091110
i40e_status err;
11101111
u8 *context_bytes;
11111112

1112-
err = i40e_hmc_get_object_va(&hw->hmc, &context_bytes,
1113+
err = i40e_hmc_get_object_va(hw, &context_bytes,
11131114
I40E_HMC_LAN_RX, queue);
11141115
if (err < 0)
11151116
return err;

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ static const struct pci_device_id i40e_pci_tbl[] = {
7373
{PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_C), 0},
7474
{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T), 0},
7575
{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T4), 0},
76+
{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_BASE_T_BC), 0},
7677
{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_SFP), 0},
7778
{PCI_VDEVICE(INTEL, I40E_DEV_ID_10G_B), 0},
7879
{PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_X722), 0},

0 commit comments

Comments
 (0)