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