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