xref: /dpdk/doc/guides/nics/octeontx.rst (revision d80e42cce4c7017ed8c99dabb8ae444a492acc1c)
1..  SPDX-License-Identifier: BSD-3-Clause
2    Copyright(c) 2017 Cavium, Inc
3
4OCTEONTX Poll Mode driver
5=========================
6
7The OCTEONTX ETHDEV PMD (**librte_pmd_octeontx**) provides poll mode ethdev
8driver support for the inbuilt network device found in the **Cavium OCTEONTX**
9SoC family as well as their virtual functions (VF) in SR-IOV context.
10
11More information can be found at `Cavium, Inc Official Website
12<http://www.cavium.com/OCTEON-TX_ARM_Processors.html>`_.
13
14Features
15--------
16
17Features of the OCTEONTX Ethdev PMD are:
18
19- Packet type information
20- Promiscuous mode
21- Port hardware statistics
22- Jumbo frames
23- Link state information
24- SR-IOV VF
25- Multiple queues for TX
26- Lock-free Tx queue
27- HW offloaded `ethdev Rx queue` to `eventdev event queue` packet injection
28
29Supported OCTEONTX SoCs
30-----------------------
31
32- CN83xx
33
34Unsupported features
35--------------------
36
37The features supported by the device and not yet supported by this PMD include:
38
39- Receive Side Scaling (RSS)
40- Scattered and gather for TX and RX
41- Ingress classification support
42- Egress hierarchical scheduling, traffic shaping, and marking
43
44Prerequisites
45-------------
46
47See :doc:`../platform/octeontx` for setup information.
48
49Pre-Installation Configuration
50------------------------------
51
52Config File Options
53~~~~~~~~~~~~~~~~~~~
54
55The following options can be modified in the ``config`` file.
56Please note that enabling debugging options may affect system performance.
57
58- ``CONFIG_RTE_LIBRTE_OCTEONTX_PMD`` (default ``y``)
59
60  Toggle compilation of the ``librte_pmd_octeontx`` driver.
61
62Driver compilation and testing
63~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64
65Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
66for details.
67
68To compile the OCTEONTX PMD for Linux arm64 gcc target, run the
69following ``make`` command:
70
71.. code-block:: console
72
73   cd <DPDK-source-directory>
74   make config T=arm64-thunderx-linuxapp-gcc install
75
76#. Running testpmd:
77
78   Follow instructions available in the document
79   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
80   to run testpmd.
81
82   Example output:
83
84   .. code-block:: console
85
86      ./arm64-thunderx-linuxapp-gcc/app/testpmd -c 700 \
87                --base-virtaddr=0x100000000000 \
88                --mbuf-pool-ops-name="octeontx_fpavf" \
89                --vdev='event_octeontx' \
90                --vdev='eth_octeontx,nr_port=2' \
91                -- --rxq=1 --txq=1 --nb-core=2 \
92                --total-num-mbufs=16384 -i
93      .....
94      EAL: Detected 24 lcore(s)
95      EAL: Probing VFIO support...
96      EAL: VFIO support initialized
97      .....
98      EAL: PCI device 0000:07:00.1 on NUMA socket 0
99      EAL:   probe driver: 177d:a04b octeontx_ssovf
100      .....
101      EAL: PCI device 0001:02:00.7 on NUMA socket 0
102      EAL:   probe driver: 177d:a0dd octeontx_pkivf
103      .....
104      EAL: PCI device 0001:03:01.0 on NUMA socket 0
105      EAL:   probe driver: 177d:a049 octeontx_pkovf
106      .....
107      PMD: octeontx_probe(): created ethdev eth_octeontx for port 0
108      PMD: octeontx_probe(): created ethdev eth_octeontx for port 1
109      .....
110      Configuring Port 0 (socket 0)
111      Port 0: 00:0F:B7:11:94:46
112      Configuring Port 1 (socket 0)
113      Port 1: 00:0F:B7:11:94:47
114      .....
115      Checking link statuses...
116      Port 0 Link Up - speed 40000 Mbps - full-duplex
117      Port 1 Link Up - speed 40000 Mbps - full-duplex
118      Done
119      testpmd>
120
121
122Initialization
123--------------
124
125The octeontx ethdev pmd is exposed as a vdev device which consists of a set
126of PKI and PKO PCIe VF devices. On EAL initialization,
127PKI/PKO PCIe VF devices will be probed and then the vdev device can be created
128from the application code, or from the EAL command line based on
129the number of probed/bound PKI/PKO PCIe VF device to DPDK by
130
131* Invoking ``rte_vdev_init("eth_octeontx")`` from the application
132
133* Using ``--vdev="eth_octeontx"`` in the EAL options, which will call
134  rte_vdev_init() internally
135
136Device arguments
137~~~~~~~~~~~~~~~~
138Each ethdev port is mapped to a physical port(LMAC), Application can specify
139the number of interesting ports with ``nr_ports`` argument.
140
141Dependency
142~~~~~~~~~~
143``eth_octeontx`` pmd is depend on ``event_octeontx`` eventdev device and
144``octeontx_fpavf`` external mempool handler.
145
146Example:
147
148.. code-block:: console
149
150    ./your_dpdk_application --mbuf-pool-ops-name="octeontx_fpavf" \
151                --vdev='event_octeontx' \
152                --vdev="eth_octeontx,nr_port=2"
153
154Limitations
155-----------
156
157``octeontx_fpavf`` external mempool handler dependency
158~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
159The OCTEONTX SoC family NIC has inbuilt HW assisted external mempool manager.
160This driver will only work with ``octeontx_fpavf`` external mempool handler
161as it is the most performance effective way for packet allocation and Tx buffer
162recycling on OCTEONTX SoC platform.
163
164CRC striping
165~~~~~~~~~~~~
166
167The OCTEONTX SoC family NICs strip the CRC for every packets coming into the
168host interface irrespective of the offload configuration.
169
170Maximum packet length
171~~~~~~~~~~~~~~~~~~~~~
172
173The OCTEONTX SoC family NICs support a maximum of a 32K jumbo frame. The value
174is fixed and cannot be changed. So, even when the ``rxmode.max_rx_pkt_len``
175member of ``struct rte_eth_conf`` is set to a value lower than 32k, frames
176up to 32k bytes can still reach the host interface.
177