xref: /dpdk/doc/guides/nics/thunderx.rst (revision b583b9a1bb49e86aa0937d55415713282000c536)
1a9263e3cSJerin Jacob..  SPDX-License-Identifier: BSD-3-Clause
2a9263e3cSJerin Jacob    Copyright(c) 2016 Cavium, Inc
3f994cecaSJerin Jacob
4f994cecaSJerin JacobThunderX NICVF Poll Mode Driver
5f994cecaSJerin Jacob===============================
6f994cecaSJerin Jacob
78809f78cSBruce RichardsonThe ThunderX NICVF PMD (**librte_net_thunderx**) provides poll mode driver
8f994cecaSJerin Jacobsupport for the inbuilt NIC found in the **Cavium ThunderX** SoC family
9f994cecaSJerin Jacobas well as their virtual functions (VF) in SR-IOV context.
10f994cecaSJerin Jacob
113abcd29fSJerin JacobMore information can be found at `Cavium, Inc Official Website
12f994cecaSJerin Jacob<http://www.cavium.com/ThunderX_ARM_Processors.html>`_.
13f994cecaSJerin Jacob
14*b583b9a1SFerruh YigitSupported ThunderX SoCs
15*b583b9a1SFerruh Yigit-----------------------
16*b583b9a1SFerruh Yigit- CN88xx
17*b583b9a1SFerruh Yigit- CN81xx
18*b583b9a1SFerruh Yigit- CN83xx
19*b583b9a1SFerruh Yigit
20f994cecaSJerin JacobFeatures
21f994cecaSJerin Jacob--------
22f994cecaSJerin Jacob
23f994cecaSJerin JacobFeatures of the ThunderX PMD are:
24f994cecaSJerin Jacob
25f994cecaSJerin Jacob- Multiple queues for TX and RX
26f994cecaSJerin Jacob- Receive Side Scaling (RSS)
27f994cecaSJerin Jacob- Packet type information
28f994cecaSJerin Jacob- Checksum offload
29f994cecaSJerin Jacob- Promiscuous mode
30f994cecaSJerin Jacob- Multicast mode
31f994cecaSJerin Jacob- Port hardware statistics
32f994cecaSJerin Jacob- Jumbo frames
33f994cecaSJerin Jacob- Link state information
345d24d6a5SHarman Kalra- Setting up link state.
35f994cecaSJerin Jacob- Scattered and gather for TX and RX
36f994cecaSJerin Jacob- VLAN stripping
37f994cecaSJerin Jacob- SR-IOV VF
38f994cecaSJerin Jacob- NUMA support
39428aa429SKamil Rytarowski- Multi queue set support (up to 96 queues (12 queue sets)) per port
40279d3319SRakesh Kudurumalla- Skip data bytes
41f994cecaSJerin Jacob
42f994cecaSJerin JacobPrerequisites
43f994cecaSJerin Jacob-------------
44f994cecaSJerin Jacob- Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment.
45f994cecaSJerin Jacob
46f994cecaSJerin Jacob
472c8f1396SShijith ThottonDriver compilation and testing
482c8f1396SShijith Thotton------------------------------
49f994cecaSJerin Jacob
502c8f1396SShijith ThottonRefer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
512c8f1396SShijith Thottonfor details.
52f994cecaSJerin Jacob
5368d99d00SCiara PowerUse config/arm/arm64-thunderx-linux-gcc as a meson cross-file when cross-compiling.
54f994cecaSJerin Jacob
55f994cecaSJerin JacobLinux
56f994cecaSJerin Jacob-----
57f994cecaSJerin Jacob
58f994cecaSJerin JacobSR-IOV: Prerequisites and sample Application Notes
59f994cecaSJerin Jacob~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60f994cecaSJerin Jacob
61f994cecaSJerin JacobCurrent ThunderX NIC PF/VF kernel modules maps each physical Ethernet port
62f994cecaSJerin Jacobautomatically to virtual function (VF) and presented them as PCIe-like SR-IOV device.
63f994cecaSJerin JacobThis section provides instructions to configure SR-IOV with Linux OS.
64f994cecaSJerin Jacob
65f994cecaSJerin Jacob#. Verify PF devices capabilities using ``lspci``:
66f994cecaSJerin Jacob
67f994cecaSJerin Jacob   .. code-block:: console
68f994cecaSJerin Jacob
69f994cecaSJerin Jacob      lspci -vvv
70f994cecaSJerin Jacob
71f994cecaSJerin Jacob   Example output:
72f994cecaSJerin Jacob
73f994cecaSJerin Jacob   .. code-block:: console
74f994cecaSJerin Jacob
75f994cecaSJerin Jacob      0002:01:00.0 Ethernet controller: Cavium Networks Device a01e (rev 01)
76f994cecaSJerin Jacob      ...
77f994cecaSJerin Jacob      Capabilities: [100 v1] Alternative Routing-ID Interpretation (ARI)
78f994cecaSJerin Jacob      ...
79f994cecaSJerin Jacob      Capabilities: [180 v1] Single Root I/O Virtualization (SR-IOV)
80f994cecaSJerin Jacob      ...
81f994cecaSJerin Jacob      Kernel driver in use: thunder-nic
82f994cecaSJerin Jacob      ...
83f994cecaSJerin Jacob
84f994cecaSJerin Jacob   .. note::
85f994cecaSJerin Jacob
86f994cecaSJerin Jacob      Unless ``thunder-nic`` driver is in use make sure your kernel config includes ``CONFIG_THUNDER_NIC_PF`` setting.
87f994cecaSJerin Jacob
88f994cecaSJerin Jacob#. Verify VF devices capabilities and drivers using ``lspci``:
89f994cecaSJerin Jacob
90f994cecaSJerin Jacob   .. code-block:: console
91f994cecaSJerin Jacob
92f994cecaSJerin Jacob      lspci -vvv
93f994cecaSJerin Jacob
94f994cecaSJerin Jacob   Example output:
95f994cecaSJerin Jacob
96f994cecaSJerin Jacob   .. code-block:: console
97f994cecaSJerin Jacob
98f994cecaSJerin Jacob      0002:01:00.1 Ethernet controller: Cavium Networks Device 0011 (rev 01)
99f994cecaSJerin Jacob      ...
100f994cecaSJerin Jacob      Capabilities: [100 v1] Alternative Routing-ID Interpretation (ARI)
101f994cecaSJerin Jacob      ...
102f994cecaSJerin Jacob      Kernel driver in use: thunder-nicvf
103f994cecaSJerin Jacob      ...
104f994cecaSJerin Jacob
105f994cecaSJerin Jacob      0002:01:00.2 Ethernet controller: Cavium Networks Device 0011 (rev 01)
106f994cecaSJerin Jacob      ...
107f994cecaSJerin Jacob      Capabilities: [100 v1] Alternative Routing-ID Interpretation (ARI)
108f994cecaSJerin Jacob      ...
109f994cecaSJerin Jacob      Kernel driver in use: thunder-nicvf
110f994cecaSJerin Jacob      ...
111f994cecaSJerin Jacob
112f994cecaSJerin Jacob   .. note::
113f994cecaSJerin Jacob
114f994cecaSJerin Jacob      Unless ``thunder-nicvf`` driver is in use make sure your kernel config includes ``CONFIG_THUNDER_NIC_VF`` setting.
115f994cecaSJerin Jacob
116f994cecaSJerin Jacob#. Pass VF device to VM context (PCIe Passthrough):
117f994cecaSJerin Jacob
118f994cecaSJerin Jacob   The VF devices may be passed through to the guest VM using qemu or
119f994cecaSJerin Jacob   virt-manager or virsh etc.
120f994cecaSJerin Jacob
121f994cecaSJerin Jacob   Example qemu guest launch command:
122f994cecaSJerin Jacob
123f994cecaSJerin Jacob   .. code-block:: console
124f994cecaSJerin Jacob
125f994cecaSJerin Jacob      sudo qemu-system-aarch64 -name vm1 \
126f994cecaSJerin Jacob      -machine virt,gic_version=3,accel=kvm,usb=off \
127f994cecaSJerin Jacob      -cpu host -m 4096 \
128f994cecaSJerin Jacob      -smp 4,sockets=1,cores=8,threads=1 \
129f994cecaSJerin Jacob      -nographic -nodefaults \
130f994cecaSJerin Jacob      -kernel <kernel image> \
131f994cecaSJerin Jacob      -append "root=/dev/vda console=ttyAMA0 rw hugepagesz=512M hugepages=3" \
132f994cecaSJerin Jacob      -device vfio-pci,host=0002:01:00.1 \
133f994cecaSJerin Jacob      -drive file=<rootfs.ext3>,if=none,id=disk1,format=raw  \
134f994cecaSJerin Jacob      -device virtio-blk-device,scsi=off,drive=disk1,id=virtio-disk1,bootindex=1 \
135f994cecaSJerin Jacob      -netdev tap,id=net0,ifname=tap0,script=/etc/qemu-ifup_thunder \
136f994cecaSJerin Jacob      -device virtio-net-device,netdev=net0 \
137f994cecaSJerin Jacob      -serial stdio \
138c14ef1ecSSarosh Arif      -mem-path /dev/hugepages
139f994cecaSJerin Jacob
1402c8f1396SShijith Thotton#. Enable **VFIO-NOIOMMU** mode (optional):
1412c8f1396SShijith Thotton
1422c8f1396SShijith Thotton   .. code-block:: console
1432c8f1396SShijith Thotton
1442c8f1396SShijith Thotton      echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode
1452c8f1396SShijith Thotton
1462c8f1396SShijith Thotton   .. note::
1472c8f1396SShijith Thotton
1482c8f1396SShijith Thotton      **VFIO-NOIOMMU** is required only when running in VM context and should not be enabled otherwise.
1492c8f1396SShijith Thotton
1502c8f1396SShijith Thotton#. Running testpmd:
1512c8f1396SShijith Thotton
1522c8f1396SShijith Thotton   Follow instructions available in the document
1532c8f1396SShijith Thotton   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
1542c8f1396SShijith Thotton   to run testpmd.
1552c8f1396SShijith Thotton
1562c8f1396SShijith Thotton   Example output:
1572c8f1396SShijith Thotton
1582c8f1396SShijith Thotton   .. code-block:: console
1592c8f1396SShijith Thotton
160db27370bSStephen Hemminger      ./<build_dir>/app/dpdk-testpmd -l 0-3 -n 4 -a 0002:01:00.2 \
1618b9bd0efSMoti Haimovsky        -- -i --no-flush-rx \
1622c8f1396SShijith Thotton        --port-topology=loop
1632c8f1396SShijith Thotton
1642c8f1396SShijith Thotton      ...
1652c8f1396SShijith Thotton
1668809f78cSBruce Richardson      PMD: rte_nicvf_pmd_init(): librte_net_thunderx nicvf version 1.0
1672c8f1396SShijith Thotton
1682c8f1396SShijith Thotton      ...
1692c8f1396SShijith Thotton      EAL:   probe driver: 177d:11 rte_nicvf_pmd
1702c8f1396SShijith Thotton      EAL:   using IOMMU type 1 (Type 1)
1712c8f1396SShijith Thotton      EAL:   PCI memory mapped at 0x3ffade50000
1722c8f1396SShijith Thotton      EAL: Trying to map BAR 4 that contains the MSI-X table.
1732c8f1396SShijith Thotton           Trying offsets: 0x40000000000:0x0000, 0x10000:0x1f0000
1742c8f1396SShijith Thotton      EAL:   PCI memory mapped at 0x3ffadc60000
1752c8f1396SShijith Thotton      PMD: nicvf_eth_dev_init(): nicvf: device (177d:11) 2:1:0:2
1762c8f1396SShijith Thotton      PMD: nicvf_eth_dev_init(): node=0 vf=1 mode=tns-bypass sqs=false
1772c8f1396SShijith Thotton           loopback_supported=true
1782c8f1396SShijith Thotton      PMD: nicvf_eth_dev_init(): Port 0 (177d:11) mac=a6:c6:d9:17:78:01
1792c8f1396SShijith Thotton      Interactive-mode selected
1802c8f1396SShijith Thotton      Configuring Port 0 (socket 0)
1812c8f1396SShijith Thotton      ...
1822c8f1396SShijith Thotton
1832c8f1396SShijith Thotton      PMD: nicvf_dev_configure(): Configured ethdev port0 hwcap=0x0
1842c8f1396SShijith Thotton      Port 0: A6:C6:D9:17:78:01
1852c8f1396SShijith Thotton      Checking link statuses...
1862c8f1396SShijith Thotton      Port 0 Link Up - speed 10000 Mbps - full-duplex
1872c8f1396SShijith Thotton      Done
1882c8f1396SShijith Thotton      testpmd>
189f994cecaSJerin Jacob
190428aa429SKamil RytarowskiMultiple Queue Set per DPDK port configuration
191428aa429SKamil Rytarowski~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
192428aa429SKamil Rytarowski
193428aa429SKamil RytarowskiThere are two types of VFs:
194428aa429SKamil Rytarowski
195428aa429SKamil Rytarowski- Primary VF
196428aa429SKamil Rytarowski- Secondary VF
197428aa429SKamil Rytarowski
198428aa429SKamil RytarowskiEach port consists of a primary VF and n secondary VF(s). Each VF provides 8 Tx/Rx queues to a port.
199428aa429SKamil RytarowskiWhen a given port is configured to use more than 8 queues, it requires one (or more) secondary VF.
200428aa429SKamil RytarowskiEach secondary VF adds 8 additional queues to the queue set.
201428aa429SKamil Rytarowski
202f8dbaebbSSean MorrisseyDuring PMD initialization, the primary VF's are enumerated by checking the
203428aa429SKamil Rytarowskispecific flag (see sqs message in DPDK boot log - sqs indicates secondary queue set).
204428aa429SKamil RytarowskiThey are at the beginning of VF list (the remain ones are secondary VF's).
205428aa429SKamil Rytarowski
206428aa429SKamil RytarowskiThe primary VFs are used as master queue sets. Secondary VFs provide
207428aa429SKamil Rytarowskiadditional queue sets for primary ones. If a port is configured for more then
208428aa429SKamil Rytarowski8 queues than it will request for additional queues from secondary VFs.
209428aa429SKamil Rytarowski
210428aa429SKamil RytarowskiSecondary VFs cannot be shared between primary VFs.
211428aa429SKamil Rytarowski
212428aa429SKamil RytarowskiPrimary VFs are present on the beginning of the 'Network devices using kernel
213428aa429SKamil Rytarowskidriver' list, secondary VFs are on the remaining on the remaining part of the list.
214428aa429SKamil Rytarowski
215428aa429SKamil Rytarowski   .. note::
216428aa429SKamil Rytarowski
217428aa429SKamil Rytarowski      The VNIC driver in the multiqueue setup works differently than other drivers like `ixgbe`.
218c6dab2a8SThomas Monjalon      We need to bind separately each specific queue set device with the ``usertools/dpdk-devbind.py`` utility.
219428aa429SKamil Rytarowski
220428aa429SKamil Rytarowski   .. note::
221428aa429SKamil Rytarowski
222428aa429SKamil Rytarowski      Depending on the hardware used, the kernel driver sets a threshold ``vf_id``. VFs that try to attached with an id below or equal to
223428aa429SKamil Rytarowski      this boundary are considered primary VFs. VFs that try to attach with an id above this boundary are considered secondary VFs.
224428aa429SKamil Rytarowski
2255d24d6a5SHarman KalraLBK HW Access
2265d24d6a5SHarman Kalra~~~~~~~~~~~~~
2275d24d6a5SHarman Kalra
2285d24d6a5SHarman KalraLoopback HW Unit (LBK) receives packets from NIC-RX and sends packets back to NIC-TX.
2295d24d6a5SHarman KalraThe loopback block has N channels and contains data buffering that is shared across
2305d24d6a5SHarman Kalraall channels. Four primary VFs are reserved as loopback ports.
231428aa429SKamil Rytarowski
232428aa429SKamil RytarowskiExample device binding
233428aa429SKamil Rytarowski~~~~~~~~~~~~~~~~~~~~~~
234428aa429SKamil Rytarowski
235428aa429SKamil RytarowskiIf a system has three interfaces, a total of 18 VF devices will be created
236428aa429SKamil Rytarowskion a non-NUMA machine.
237428aa429SKamil Rytarowski
238428aa429SKamil Rytarowski   .. note::
239428aa429SKamil Rytarowski
240428aa429SKamil Rytarowski      NUMA systems have 12 VFs per port and non-NUMA 6 VFs per port.
241428aa429SKamil Rytarowski
242428aa429SKamil Rytarowski   .. code-block:: console
243428aa429SKamil Rytarowski
244c6dab2a8SThomas Monjalon      # usertools/dpdk-devbind.py --status
245428aa429SKamil Rytarowski
246428aa429SKamil Rytarowski      Network devices using DPDK-compatible driver
247428aa429SKamil Rytarowski      ============================================
248428aa429SKamil Rytarowski      <none>
249428aa429SKamil Rytarowski
250428aa429SKamil Rytarowski      Network devices using kernel driver
251428aa429SKamil Rytarowski      ===================================
2525d24d6a5SHarman Kalra      0000:01:10.0 'THUNDERX BGX (Common Ethernet Interface) a026' if= drv=thunder-BGX unused=vfio-pci
2535d24d6a5SHarman Kalra      0000:01:10.1 'THUNDERX BGX (Common Ethernet Interface) a026' if= drv=thunder-BGX unused=vfio-pci
2545d24d6a5SHarman Kalra      0001:01:00.0 'THUNDERX Network Interface Controller a01e' if= drv=thunder-nic unused=vfio-pci
2555d24d6a5SHarman Kalra      0001:01:00.1 'Device a034' if=eth0 drv=thunder-nicvf unused=vfio-pci
2565d24d6a5SHarman Kalra      0001:01:00.2 'Device a034' if=eth1 drv=thunder-nicvf unused=vfio-pci
2575d24d6a5SHarman Kalra      0001:01:00.3 'Device a034' if=eth2 drv=thunder-nicvf unused=vfio-pci
2585d24d6a5SHarman Kalra      0001:01:00.4 'Device a034' if=eth3 drv=thunder-nicvf unused=vfio-pci
2595d24d6a5SHarman Kalra      0001:01:00.5 'Device a034' if=eth4 drv=thunder-nicvf unused=vfio-pci
2605d24d6a5SHarman Kalra      0001:01:00.6 'Device a034' if=lbk0 drv=thunder-nicvf unused=vfio-pci
2615d24d6a5SHarman Kalra      0001:01:00.7 'Device a034' if=lbk1 drv=thunder-nicvf unused=vfio-pci
2625d24d6a5SHarman Kalra      0001:01:01.0 'Device a034' if=lbk2 drv=thunder-nicvf unused=vfio-pci
2635d24d6a5SHarman Kalra      0001:01:01.1 'Device a034' if=lbk3 drv=thunder-nicvf unused=vfio-pci
2645d24d6a5SHarman Kalra      0001:01:01.2 'Device a034' if= drv=thunder-nicvf unused=vfio-pci
2655d24d6a5SHarman Kalra      0001:01:01.3 'Device a034' if= drv=thunder-nicvf unused=vfio-pci
2665d24d6a5SHarman Kalra      0001:01:01.4 'Device a034' if= drv=thunder-nicvf unused=vfio-pci
2675d24d6a5SHarman Kalra      0001:01:01.5 'Device a034' if= drv=thunder-nicvf unused=vfio-pci
2685d24d6a5SHarman Kalra      0001:01:01.6 'Device a034' if= drv=thunder-nicvf unused=vfio-pci
2695d24d6a5SHarman Kalra      0001:01:01.7 'Device a034' if= drv=thunder-nicvf unused=vfio-pci
2705d24d6a5SHarman Kalra      0001:01:02.0 'Device a034' if= drv=thunder-nicvf unused=vfio-pci
2715d24d6a5SHarman Kalra      0001:01:02.1 'Device a034' if= drv=thunder-nicvf unused=vfio-pci
2725d24d6a5SHarman Kalra      0001:01:02.2 'Device a034' if= drv=thunder-nicvf unused=vfio-pci
273428aa429SKamil Rytarowski
274428aa429SKamil Rytarowski      Other network devices
275428aa429SKamil Rytarowski      =====================
276428aa429SKamil Rytarowski      0002:00:03.0 'Device a01f' unused=vfio-pci,uio_pci_generic
277428aa429SKamil Rytarowski
2785d24d6a5SHarman Kalra   .. note::
2795d24d6a5SHarman Kalra
2805d24d6a5SHarman Kalra      Here total no of primary VFs = 5 (variable, depends on no of ethernet ports present) + 4 (fixed, loopback ports).
2815d24d6a5SHarman Kalra      Ethernet ports are indicated as `if=eth0` while loopback ports as `if=lbk0`.
282428aa429SKamil Rytarowski
283428aa429SKamil RytarowskiWe want to bind two physical interfaces with 24 queues each device, we attach two primary VFs
2845d24d6a5SHarman Kalraand four secondary VFs. In our example we choose two 10G interfaces eth1 (0002:01:00.2) and eth2 (0002:01:00.3).
2855d24d6a5SHarman KalraWe will choose four secondary queue sets from the ending of the list (0001:01:01.2-0002:01:02.2).
286428aa429SKamil Rytarowski
287428aa429SKamil Rytarowski
288428aa429SKamil Rytarowski#. Bind two primary VFs to the ``vfio-pci`` driver:
289428aa429SKamil Rytarowski
290428aa429SKamil Rytarowski   .. code-block:: console
291428aa429SKamil Rytarowski
292c6dab2a8SThomas Monjalon      usertools/dpdk-devbind.py -b vfio-pci 0002:01:00.2
293c6dab2a8SThomas Monjalon      usertools/dpdk-devbind.py -b vfio-pci 0002:01:00.3
294428aa429SKamil Rytarowski
295428aa429SKamil Rytarowski#. Bind four primary VFs to the ``vfio-pci`` driver:
296428aa429SKamil Rytarowski
297428aa429SKamil Rytarowski   .. code-block:: console
298428aa429SKamil Rytarowski
299c6dab2a8SThomas Monjalon      usertools/dpdk-devbind.py -b vfio-pci 0002:01:01.7
300c6dab2a8SThomas Monjalon      usertools/dpdk-devbind.py -b vfio-pci 0002:01:02.0
301c6dab2a8SThomas Monjalon      usertools/dpdk-devbind.py -b vfio-pci 0002:01:02.1
302c6dab2a8SThomas Monjalon      usertools/dpdk-devbind.py -b vfio-pci 0002:01:02.2
303428aa429SKamil Rytarowski
304428aa429SKamil RytarowskiThe nicvf thunderx driver will make use of attached secondary VFs automatically during the interface configuration stage.
305428aa429SKamil Rytarowski
3065d24d6a5SHarman KalraThunder-nic VF's
3075d24d6a5SHarman Kalra~~~~~~~~~~~~~~~~
308b47e7a11SKrzysztof Kanas
309b47e7a11SKrzysztof KanasUse sysfs to distinguish thunder-nic primary VFs and secondary VFs.
310b47e7a11SKrzysztof Kanas   .. code-block:: console
311b47e7a11SKrzysztof Kanas
3125d24d6a5SHarman Kalra      ls -l /sys/bus/pci/drivers/thunder-nic/
313b47e7a11SKrzysztof Kanas      total 0
314b47e7a11SKrzysztof Kanas      drwxr-xr-x  2 root root     0 Jan 22 11:19 ./
315b47e7a11SKrzysztof Kanas      drwxr-xr-x 86 root root     0 Jan 22 11:07 ../
316b47e7a11SKrzysztof Kanas      lrwxrwxrwx  1 root root     0 Jan 22 11:19 0001:01:00.0 -> '../../../../devices/platform/soc@0/849000000000.pci/pci0001:00/0001:00:10.0/0001:01:00.0'/
317b47e7a11SKrzysztof Kanas
3185d24d6a5SHarman Kalra   .. code-block:: console
3195d24d6a5SHarman Kalra
320b47e7a11SKrzysztof Kanas      cat /sys/bus/pci/drivers/thunder-nic/0001\:01\:00.0/sriov_sqs_assignment
321b47e7a11SKrzysztof Kanas      12
322b47e7a11SKrzysztof Kanas      0 0001:01:00.1 vfio-pci +: 12 13
323b47e7a11SKrzysztof Kanas      1 0001:01:00.2 thunder-nicvf -:
324b47e7a11SKrzysztof Kanas      2 0001:01:00.3 thunder-nicvf -:
325b47e7a11SKrzysztof Kanas      3 0001:01:00.4 thunder-nicvf -:
326b47e7a11SKrzysztof Kanas      4 0001:01:00.5 thunder-nicvf -:
327b47e7a11SKrzysztof Kanas      5 0001:01:00.6 thunder-nicvf -:
328b47e7a11SKrzysztof Kanas      6 0001:01:00.7 thunder-nicvf -:
329b47e7a11SKrzysztof Kanas      7 0001:01:01.0 thunder-nicvf -:
330b47e7a11SKrzysztof Kanas      8 0001:01:01.1 thunder-nicvf -:
331b47e7a11SKrzysztof Kanas      9 0001:01:01.2 thunder-nicvf -:
332b47e7a11SKrzysztof Kanas      10 0001:01:01.3 thunder-nicvf -:
333b47e7a11SKrzysztof Kanas      11 0001:01:01.4 thunder-nicvf -:
334b47e7a11SKrzysztof Kanas      12 0001:01:01.5 vfio-pci: 0
335b47e7a11SKrzysztof Kanas      13 0001:01:01.6 vfio-pci: 0
336b47e7a11SKrzysztof Kanas      14 0001:01:01.7 thunder-nicvf: 255
337b47e7a11SKrzysztof Kanas      15 0001:01:02.0 thunder-nicvf: 255
338b47e7a11SKrzysztof Kanas      16 0001:01:02.1 thunder-nicvf: 255
339b47e7a11SKrzysztof Kanas      17 0001:01:02.2 thunder-nicvf: 255
340b47e7a11SKrzysztof Kanas      18 0001:01:02.3 thunder-nicvf: 255
341b47e7a11SKrzysztof Kanas      19 0001:01:02.4 thunder-nicvf: 255
342b47e7a11SKrzysztof Kanas      20 0001:01:02.5 thunder-nicvf: 255
343b47e7a11SKrzysztof Kanas      21 0001:01:02.6 thunder-nicvf: 255
344b47e7a11SKrzysztof Kanas      22 0001:01:02.7 thunder-nicvf: 255
345b47e7a11SKrzysztof Kanas      23 0001:01:03.0 thunder-nicvf: 255
346b47e7a11SKrzysztof Kanas      24 0001:01:03.1 thunder-nicvf: 255
347b47e7a11SKrzysztof Kanas      25 0001:01:03.2 thunder-nicvf: 255
348b47e7a11SKrzysztof Kanas      26 0001:01:03.3 thunder-nicvf: 255
349b47e7a11SKrzysztof Kanas      27 0001:01:03.4 thunder-nicvf: 255
350b47e7a11SKrzysztof Kanas      28 0001:01:03.5 thunder-nicvf: 255
351b47e7a11SKrzysztof Kanas      29 0001:01:03.6 thunder-nicvf: 255
352b47e7a11SKrzysztof Kanas      30 0001:01:03.7 thunder-nicvf: 255
353b47e7a11SKrzysztof Kanas      31 0001:01:04.0 thunder-nicvf: 255
354b47e7a11SKrzysztof Kanas
355b47e7a11SKrzysztof KanasEvery column that ends with 'thunder-nicvf: number' can be used as secondary VF.
356b47e7a11SKrzysztof KanasIn printout above all entres after '14 0001:01:01.7 thunder-nicvf: 255' can be used as secondary VF.
357279d3319SRakesh Kudurumalla
3585d24d6a5SHarman KalraDebugging Options
3595d24d6a5SHarman Kalra-----------------
3605d24d6a5SHarman Kalra
3615d24d6a5SHarman KalraEAL command option to change  log level
3625d24d6a5SHarman Kalra   .. code-block:: console
3635d24d6a5SHarman Kalra
3645d24d6a5SHarman Kalra      --log-level=pmd.net.thunderx.driver:info
3655d24d6a5SHarman Kalra      or
3665d24d6a5SHarman Kalra      --log-level=pmd.net.thunderx.driver,7
3675d24d6a5SHarman Kalra
368*b583b9a1SFerruh YigitRuntime Configuration
369*b583b9a1SFerruh Yigit---------------------
370279d3319SRakesh Kudurumalla
371279d3319SRakesh Kudurumallaskip_data_bytes
372279d3319SRakesh Kudurumalla~~~~~~~~~~~~~~~
373279d3319SRakesh KudurumallaThis feature is used to create a hole between HEADROOM and actual data. Size of hole is specified
37435bd0a5cSSean Morrisseyin bytes as module param("skip_data_bytes") to PMD.
375279d3319SRakesh KudurumallaThis scheme is useful when application would like to insert vlan header without disturbing HEADROOM.
376279d3319SRakesh Kudurumalla
377279d3319SRakesh KudurumallaExample:
378279d3319SRakesh Kudurumalla   .. code-block:: console
379279d3319SRakesh Kudurumalla
380db27370bSStephen Hemminger      -a 0002:01:00.2,skip_data_bytes=8
381279d3319SRakesh Kudurumalla
382f994cecaSJerin JacobLimitations
383f994cecaSJerin Jacob-----------
384f994cecaSJerin Jacob
385e599bbf4SThierry HerbelotCRC stripping
386e599bbf4SThierry Herbelot~~~~~~~~~~~~~
387f994cecaSJerin Jacob
388f994cecaSJerin JacobThe ThunderX SoC family NICs strip the CRC for every packets coming into the
3896e2320beSJerin Jacobhost interface irrespective of the offload configuration.
390f994cecaSJerin Jacob
391f994cecaSJerin JacobMaximum packet length
392f994cecaSJerin Jacob~~~~~~~~~~~~~~~~~~~~~
393f994cecaSJerin Jacob
394f994cecaSJerin JacobThe ThunderX SoC family NICs support a maximum of a 9K jumbo frame. The value
3951bb4a528SFerruh Yigitis fixed and cannot be changed. So, even when the ``rxmode.mtu``
396f994cecaSJerin Jacobmember of ``struct rte_eth_conf`` is set to a value lower than 9200, frames
397f994cecaSJerin Jacobup to 9200 bytes can still reach the host interface.
398f994cecaSJerin Jacob
399f994cecaSJerin JacobMaximum packet segments
400f994cecaSJerin Jacob~~~~~~~~~~~~~~~~~~~~~~~
401f994cecaSJerin Jacob
402f994cecaSJerin JacobThe ThunderX SoC family NICs support up to 12 segments per packet when working
403f994cecaSJerin Jacobin scatter/gather mode. So, setting MTU will result with ``EINVAL`` when the
404f994cecaSJerin Jacobframe size does not fit in the maximum number of segments.
405279d3319SRakesh Kudurumalla
406279d3319SRakesh Kudurumallaskip_data_bytes
407279d3319SRakesh Kudurumalla~~~~~~~~~~~~~~~
408279d3319SRakesh Kudurumalla
409279d3319SRakesh KudurumallaMaximum limit of skip_data_bytes is 128 bytes and number of bytes should be multiple of 8.
410