net/ark: support new devices
[dpdk.git] / doc / guides / nics / ixgbe.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(c) 2010-2016 Intel Corporation.
3
4 .. include:: <isonum.txt>
5
6 IXGBE Driver
7 ============
8
9 Vector PMD for IXGBE
10 --------------------
11
12 Vector PMD uses IntelĀ® SIMD instructions to optimize packet I/O.
13 It improves load/store bandwidth efficiency of L1 data cache by using a wider SSE/AVX register 1 (1).
14 The wider register gives space to hold multiple packet buffers so as to save instruction number when processing bulk of packets.
15
16 There is no change to PMD API. The RX/TX handler are the only two entries for vPMD packet I/O.
17 They are transparently registered at runtime RX/TX execution if all condition checks pass.
18
19 1.  To date, only an SSE version of IX GBE vPMD is available.
20
21 Some constraints apply as pre-conditions for specific optimizations on bulk packet transfers.
22 The following sections explain RX and TX constraints in the vPMD.
23
24 RX Constraints
25 ~~~~~~~~~~~~~~
26
27 Linux Prerequisites and Pre-conditions
28 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29
30 The following prerequisites apply:
31
32 *   To enable vPMD to work for RX, bulk allocation for Rx must be allowed.
33
34 Ensure that the following pre-conditions are satisfied:
35
36 *   rxq->rx_free_thresh >= RTE_PMD_IXGBE_RX_MAX_BURST
37
38 *   rxq->rx_free_thresh < rxq->nb_rx_desc
39
40 *   (rxq->nb_rx_desc % rxq->rx_free_thresh) == 0
41
42 *   rxq->nb_rx_desc  < (IXGBE_MAX_RING_DESC - RTE_PMD_IXGBE_RX_MAX_BURST)
43
44 These conditions are checked in the code.
45
46 Scattered packets are not supported in this mode.
47 If an incoming packet is greater than the maximum acceptable length of one "mbuf" data size (by default, the size is 2 KB),
48 vPMD for RX would be disabled.
49
50 By default, IXGBE_MAX_RING_DESC is set to 4096 and RTE_PMD_IXGBE_RX_MAX_BURST is set to 32.
51
52 Windows Prerequisites and Pre-conditions
53 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54
55 - Follow the :doc:`guide for Windows <../windows_gsg/run_apps>`
56   to setup the basic DPDK environment.
57
58 - Identify the Intel\ |reg| Ethernet adapter and get the latest NVM/FW version.
59
60 - To access any Intel\ |reg| Ethernet hardware,
61   load the NetUIO driver in place of existing built-in (inbox) driver.
62
63 - To load NetUIO driver, follow the steps mentioned in `dpdk-kmods repository
64   <https://git.dpdk.org/dpdk-kmods/tree/windows/netuio/README.rst>`_.
65
66 - Loading of private Dynamic Device Personalization (DDP) package
67   is not supported on Windows.
68
69
70 Feature not Supported by RX Vector PMD
71 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
73 Some features are not supported when trying to increase the throughput in vPMD.
74 They are:
75
76 *   IEEE1588
77
78 *   FDIR
79
80 *   Header split
81
82 *   RX checksum off load
83
84 Other features are supported using optional MACRO configuration. They include:
85
86 *   HW VLAN strip
87
88 *   HW extend dual VLAN
89
90 To guarantee the constraint, capabilities in dev_conf.rxmode.offloads will be checked:
91
92 *   RTE_ETH_RX_OFFLOAD_VLAN_STRIP
93
94 *   RTE_ETH_RX_OFFLOAD_VLAN_EXTEND
95
96 *   RTE_ETH_RX_OFFLOAD_CHECKSUM
97
98 *   RTE_ETH_RX_OFFLOAD_HEADER_SPLIT
99
100 *   dev_conf
101
102 fdir_conf->mode will also be checked.
103
104 Disable SDP3 TX_DISABLE for Fiber Links
105 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106
107 The following ``devargs`` option can be enabled at runtime.  It must
108 be passed as part of EAL arguments. For example,
109
110 .. code-block:: console
111
112    dpdk-testpmd -a fiber_sdp3_no_tx_disable=1 -- -i
113
114 - ``fiber_sdp3_no_tx_disable`` (default **0**)
115
116   Not all IXGBE implementations with SFP cages use the SDP3 signal as
117   TX_DISABLE as a means to disable the laser on fiber SFP modules.
118   This option informs the driver that in this case, SDP3 is not to be
119   used as a check for link up by testing for laser on/off.
120
121 VF Runtime Options
122 ^^^^^^^^^^^^^^^^^^
123
124 The following ``devargs`` options can be enabled at runtime. They must
125 be passed as part of EAL arguments. For example,
126
127 .. code-block:: console
128
129    dpdk-testpmd -a af:10.0,pflink_fullchk=1 -- -i
130
131 - ``pflink_fullchk`` (default **0**)
132
133   When calling ``rte_eth_link_get_nowait()`` to get VF link status,
134   this option is used to control how VF synchronizes its status with
135   PF's. If set, VF will not only check the PF's physical link status
136   by reading related register, but also check the mailbox status. We
137   call this behavior as fully checking. And checking mailbox will
138   trigger PF's mailbox interrupt generation. If unset, the application
139   can get the VF's link status quickly by just reading the PF's link
140   status register, this will avoid the whole system's mailbox interrupt
141   generation.
142
143   ``rte_eth_link_get()`` will still use the mailbox method regardless
144   of the pflink_fullchk setting.
145
146 RX Burst Size
147 ^^^^^^^^^^^^^
148
149 As vPMD is focused on high throughput, it assumes that the RX burst size is equal to or greater than 32 per burst.
150 It returns zero if using nb_pkt < 32 as the expected packet number in the receive handler.
151
152 TX Constraint
153 ~~~~~~~~~~~~~
154
155 Prerequisite
156 ^^^^^^^^^^^^
157
158 The only prerequisite is related to tx_rs_thresh.
159 The tx_rs_thresh value must be greater than or equal to RTE_PMD_IXGBE_TX_MAX_BURST,
160 but less or equal to RTE_IXGBE_TX_MAX_FREE_BUF_SZ.
161 Consequently, by default the tx_rs_thresh value is in the range 32 to 64.
162
163 Feature not Supported by TX Vector PMD
164 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
165
166 TX vPMD only works when offloads is set to 0
167
168 This means that it does not support any TX offload.
169
170 Application Programming Interface
171 ---------------------------------
172
173 In DPDK release v16.11 an API for ixgbe specific functions has been added to the ixgbe PMD.
174 The declarations for the API functions are in the header ``rte_pmd_ixgbe.h``.
175
176 Sample Application Notes
177 ------------------------
178
179 l3fwd
180 ~~~~~
181
182 When running l3fwd with vPMD, there is one thing to note.
183 In the configuration, ensure that RTE_ETH_RX_OFFLOAD_CHECKSUM in port_conf.rxmode.offloads is NOT set.
184 Otherwise, by default, RX vPMD is disabled.
185
186 load_balancer
187 ~~~~~~~~~~~~~
188
189 As in the case of l3fwd, to enable vPMD, do NOT set RTE_ETH_RX_OFFLOAD_CHECKSUM in port_conf.rxmode.offloads.
190 In addition, for improved performance, use -bsz "(32,32),(64,64),(32,32)" in load_balancer to avoid using the default burst size of 144.
191
192
193 Limitations or Known issues
194 ---------------------------
195
196 Malicious Driver Detection not Supported
197 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
198
199 The Intel x550 series NICs support a feature called MDD (Malicious
200 Driver Detection) which checks the behavior of the VF driver.
201 If this feature is enabled, the VF must use the advanced context descriptor
202 correctly and set the CC (Check Context) bit.
203 DPDK PF doesn't support MDD, but kernel PF does. We may hit problem in this
204 scenario kernel PF + DPDK VF. If user enables MDD in kernel PF, DPDK VF will
205 not work. Because kernel PF thinks the VF is malicious. But actually it's not.
206 The only reason is the VF doesn't act as MDD required.
207 There's significant performance impact to support MDD. DPDK should check if
208 the advanced context descriptor should be set and set it. And DPDK has to ask
209 the info about the header length from the upper layer, because parsing the
210 packet itself is not acceptable. So, it's too expensive to support MDD.
211 When using kernel PF + DPDK VF on x550, please make sure to use a kernel
212 PF driver that disables MDD or can disable MDD.
213
214 Some kernel drivers already disable MDD by default while some kernels can use
215 the command ``insmod ixgbe.ko MDD=0,0`` to disable MDD. Each "0" in the
216 command refers to a port. For example, if there are 6 ixgbe ports, the command
217 should be changed to ``insmod ixgbe.ko MDD=0,0,0,0,0,0``.
218
219
220 Statistics
221 ~~~~~~~~~~
222
223 The statistics of ixgbe hardware must be polled regularly in order for it to
224 remain consistent. Running a DPDK application without polling the statistics will
225 cause registers on hardware to count to the maximum value, and "stick" at
226 that value.
227
228 In order to avoid statistic registers every reaching the maximum value,
229 read the statistics from the hardware using ``rte_eth_stats_get()`` or
230 ``rte_eth_xstats_get()``.
231
232 The maximum time between statistics polls that ensures consistent results can
233 be calculated as follows:
234
235 .. code-block:: c
236
237   max_read_interval = UINT_MAX / max_packets_per_second
238   max_read_interval = 4294967295 / 14880952
239   max_read_interval = 288.6218096127183 (seconds)
240   max_read_interval = ~4 mins 48 sec.
241
242 In order to ensure valid results, it is recommended to poll every 4 minutes.
243
244 MTU setting
245 ~~~~~~~~~~~
246
247 Although the user can set the MTU separately on PF and VF ports, the ixgbe NIC
248 only supports one global MTU per physical port.
249 So when the user sets different MTUs on PF and VF ports in one physical port,
250 the real MTU for all these PF and VF ports is the largest value set.
251 This behavior is based on the kernel driver behavior.
252
253 VF MAC address setting
254 ~~~~~~~~~~~~~~~~~~~~~~
255
256 On ixgbe, the concept of "pool" can be used for different things depending on
257 the mode. In VMDq mode, "pool" means a VMDq pool. In IOV mode, "pool" means a
258 VF.
259
260 There is no RTE API to add a VF's MAC address from the PF. On ixgbe, the
261 ``rte_eth_dev_mac_addr_add()`` function can be used to add a VF's MAC address,
262 as a workaround.
263
264 X550 does not support legacy interrupt mode
265 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
266
267 Description
268 ^^^^^^^^^^^
269 X550 cannot get interrupts if using ``uio_pci_generic`` module or using legacy
270 interrupt mode of ``igb_uio`` or ``vfio``. Because the errata of X550 states
271 that the Interrupt Status bit is not implemented. The errata is the item #22
272 from `X550 spec update <https://www.intel.com/content/dam/www/public/us/en/
273 documents/specification-updates/ethernet-x550-spec-update.pdf>`_
274
275 Implication
276 ^^^^^^^^^^^
277 When using ``uio_pci_generic`` module or using legacy interrupt mode of
278 ``igb_uio`` or ``vfio``, the Interrupt Status bit would be checked if the
279 interrupt is coming. Since the bit is not implemented in X550, the irq cannot
280 be handled correctly and cannot report the event fd to DPDK apps. Then apps
281 cannot get interrupts and ``dmesg`` will show messages like ``irq #No.: ``
282 ``nobody cared.``
283
284 Workaround
285 ^^^^^^^^^^
286 Do not bind the ``uio_pci_generic`` module in X550 NICs.
287 Do not bind ``igb_uio`` with legacy mode in X550 NICs.
288 Before binding ``vfio`` with legacy mode in X550 NICs, use ``modprobe vfio ``
289 ``nointxmask=1`` to load ``vfio`` module if the intx is not shared with other
290 devices.
291
292 RSS isn't supported when QinQ is enabled
293 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
294
295 Due to FW limitation, IXGBE doesn't support RSS when QinQ is enabled currently.
296
297 UDP with zero checksum is reported as error
298 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
299
300 Intel 82599 10 Gigabit Ethernet Controller Specification Update (Revision 2.87)
301 Errata: 44 Integrity Error Reported for IPv4/UDP Packets With Zero Checksum
302
303 To support UDP zero checksum, the zero and bad UDP checksum packet is marked as
304 RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN, so the application needs to recompute the checksum to
305 validate it.
306
307 Inline crypto processing support
308 --------------------------------
309
310 Inline IPsec processing is supported for ``RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO``
311 mode for ESP packets only:
312
313 - ESP authentication only: AES-128-GMAC (128-bit key)
314 - ESP encryption and authentication: AES-128-GCM (128-bit key)
315
316 IPsec Security Gateway Sample Application supports inline IPsec processing for
317 ixgbe PMD.
318
319 For more details see the IPsec Security Gateway Sample Application and Security
320 library documentation.
321
322
323 Virtual Function Port Representors
324 ----------------------------------
325 The IXGBE PF PMD supports the creation of VF port representors for the control
326 and monitoring of IXGBE virtual function devices. Each port representor
327 corresponds to a single virtual function of that device. Using the ``devargs``
328 option ``representor`` the user can specify which virtual functions to create
329 port representors for on initialization of the PF PMD by passing the VF IDs of
330 the VFs which are required.::
331
332   -a DBDF,representor=[0,1,4]
333
334 Currently hot-plugging of representor ports is not supported so all required
335 representors must be specified on the creation of the PF.
336
337 Supported Chipsets and NICs
338 ---------------------------
339
340 - Intel 82599EB 10 Gigabit Ethernet Controller
341 - Intel 82598EB 10 Gigabit Ethernet Controller
342 - Intel 82599ES 10 Gigabit Ethernet Controller
343 - Intel 82599EN 10 Gigabit Ethernet Controller
344 - Intel Ethernet Controller X540-AT2
345 - Intel Ethernet Controller X550-BT2
346 - Intel Ethernet Controller X550-AT2
347 - Intel Ethernet Controller X550-AT
348 - Intel Ethernet Converged Network Adapter X520-SR1
349 - Intel Ethernet Converged Network Adapter X520-SR2
350 - Intel Ethernet Converged Network Adapter X520-LR1
351 - Intel Ethernet Converged Network Adapter X520-DA1
352 - Intel Ethernet Converged Network Adapter X520-DA2
353 - Intel Ethernet Converged Network Adapter X520-DA4
354 - Intel Ethernet Converged Network Adapter X520-QDA1
355 - Intel Ethernet Converged Network Adapter X520-T2
356 - Intel 10 Gigabit AF DA Dual Port Server Adapter
357 - Intel 10 Gigabit AT Server Adapter
358 - Intel 10 Gigabit AT2 Server Adapter
359 - Intel 10 Gigabit CX4 Dual Port Server Adapter
360 - Intel 10 Gigabit XF LR Server Adapter
361 - Intel 10 Gigabit XF SR Dual Port Server Adapter
362 - Intel 10 Gigabit XF SR Server Adapter
363 - Intel Ethernet Converged Network Adapter X540-T1
364 - Intel Ethernet Converged Network Adapter X540-T2
365 - Intel Ethernet Converged Network Adapter X550-T1
366 - Intel Ethernet Converged Network Adapter X550-T2