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