xref: /dpdk/doc/guides/nics/octeontx.rst (revision b583b9a1bb49e86aa0937d55415713282000c536)
1a9263e3cSJerin Jacob..  SPDX-License-Identifier: BSD-3-Clause
2a9263e3cSJerin Jacob    Copyright(c) 2017 Cavium, Inc
3f820b589SJerin Jacob
4f820b589SJerin JacobOCTEON TX Poll Mode driver
595a6b04fSAnoob Joseph==========================
6f820b589SJerin Jacob
78809f78cSBruce RichardsonThe OCTEON TX ETHDEV PMD (**librte_net_octeontx**) provides poll mode ethdev
8f820b589SJerin Jacobdriver support for the inbuilt network device found in the **Cavium OCTEON TX**
9f820b589SJerin JacobSoC family as well as their virtual functions (VF) in SR-IOV context.
10f820b589SJerin Jacob
11f820b589SJerin JacobMore information can be found at `Cavium, Inc Official Website
12f820b589SJerin Jacob<http://www.cavium.com/OCTEON-TX_ARM_Processors.html>`_.
13f820b589SJerin Jacob
14*b583b9a1SFerruh YigitSupported OCTEON TX SoCs
15*b583b9a1SFerruh Yigit------------------------
16*b583b9a1SFerruh Yigit
17*b583b9a1SFerruh Yigit- CN83xx
18*b583b9a1SFerruh Yigit
19f820b589SJerin JacobFeatures
20f820b589SJerin Jacob--------
21f820b589SJerin Jacob
22f820b589SJerin JacobFeatures of the OCTEON TX Ethdev PMD are:
23f820b589SJerin Jacob
24f820b589SJerin Jacob- Packet type information
25f820b589SJerin Jacob- Promiscuous mode
26f820b589SJerin Jacob- Port hardware statistics
27f820b589SJerin Jacob- Jumbo frames
2885221a0cSHarman Kalra- Scatter-Gather IO support
29f820b589SJerin Jacob- Link state information
3056139e85SVamsi Attunuru- MAC/VLAN filtering
313151e6a6SHarman Kalra- MTU update
32f820b589SJerin Jacob- SR-IOV VF
33f820b589SJerin Jacob- Multiple queues for TX
34f820b589SJerin Jacob- Lock-free Tx queue
35f820b589SJerin Jacob- HW offloaded `ethdev Rx queue` to `eventdev event queue` packet injection
36f820b589SJerin Jacob
37f820b589SJerin JacobUnsupported features
38f820b589SJerin Jacob--------------------
39f820b589SJerin Jacob
40f820b589SJerin JacobThe features supported by the device and not yet supported by this PMD include:
41f820b589SJerin Jacob
42f820b589SJerin Jacob- Receive Side Scaling (RSS)
43f820b589SJerin Jacob- Scattered and gather for TX and RX
44f820b589SJerin Jacob- Ingress classification support
45f820b589SJerin Jacob- Egress hierarchical scheduling, traffic shaping, and marking
46f820b589SJerin Jacob
47f820b589SJerin JacobPrerequisites
48f820b589SJerin Jacob-------------
49f820b589SJerin Jacob
5026cb0a72SSantosh ShuklaSee :doc:`../platform/octeontx` for setup information.
51f820b589SJerin Jacob
52*b583b9a1SFerruh YigitConfiguration
53*b583b9a1SFerruh Yigit-------------
54f820b589SJerin Jacob
55f820b589SJerin JacobDriver compilation and testing
56f820b589SJerin Jacob~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57f820b589SJerin Jacob
58f820b589SJerin JacobRefer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
59f820b589SJerin Jacobfor details.
60f820b589SJerin Jacob
61f820b589SJerin Jacob#. Running testpmd:
62f820b589SJerin Jacob
63f820b589SJerin Jacob   Follow instructions available in the document
64f820b589SJerin Jacob   :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>`
65f820b589SJerin Jacob   to run testpmd.
66f820b589SJerin Jacob
67f820b589SJerin Jacob   Example output:
68f820b589SJerin Jacob
69f820b589SJerin Jacob   .. code-block:: console
70f820b589SJerin Jacob
7168d99d00SCiara Power      ./<build_dir>/app/dpdk-testpmd -c 700 \
72f820b589SJerin Jacob                --base-virtaddr=0x100000000000 \
73f820b589SJerin Jacob                --mbuf-pool-ops-name="octeontx_fpavf" \
74f820b589SJerin Jacob                --vdev='event_octeontx' \
75f820b589SJerin Jacob                --vdev='eth_octeontx,nr_port=2' \
768b9bd0efSMoti Haimovsky                -- --rxq=1 --txq=1 --nb-core=2 \
778b9bd0efSMoti Haimovsky                --total-num-mbufs=16384 -i
78f820b589SJerin Jacob      .....
79f820b589SJerin Jacob      EAL: Detected 24 lcore(s)
80f820b589SJerin Jacob      EAL: Probing VFIO support...
81f820b589SJerin Jacob      EAL: VFIO support initialized
82f820b589SJerin Jacob      .....
83f820b589SJerin Jacob      EAL: PCI device 0000:07:00.1 on NUMA socket 0
84f820b589SJerin Jacob      EAL:   probe driver: 177d:a04b octeontx_ssovf
85f820b589SJerin Jacob      .....
86f820b589SJerin Jacob      EAL: PCI device 0001:02:00.7 on NUMA socket 0
87f820b589SJerin Jacob      EAL:   probe driver: 177d:a0dd octeontx_pkivf
88f820b589SJerin Jacob      .....
89f820b589SJerin Jacob      EAL: PCI device 0001:03:01.0 on NUMA socket 0
90f820b589SJerin Jacob      EAL:   probe driver: 177d:a049 octeontx_pkovf
91f820b589SJerin Jacob      .....
92f820b589SJerin Jacob      PMD: octeontx_probe(): created ethdev eth_octeontx for port 0
93f820b589SJerin Jacob      PMD: octeontx_probe(): created ethdev eth_octeontx for port 1
94f820b589SJerin Jacob      .....
95f820b589SJerin Jacob      Configuring Port 0 (socket 0)
96f820b589SJerin Jacob      Port 0: 00:0F:B7:11:94:46
97f820b589SJerin Jacob      Configuring Port 1 (socket 0)
98f820b589SJerin Jacob      Port 1: 00:0F:B7:11:94:47
99f820b589SJerin Jacob      .....
100f820b589SJerin Jacob      Checking link statuses...
101f820b589SJerin Jacob      Port 0 Link Up - speed 40000 Mbps - full-duplex
102f820b589SJerin Jacob      Port 1 Link Up - speed 40000 Mbps - full-duplex
103f820b589SJerin Jacob      Done
104f820b589SJerin Jacob      testpmd>
105f820b589SJerin Jacob
106f820b589SJerin Jacob
107f820b589SJerin JacobInitialization
108f820b589SJerin Jacob--------------
109f820b589SJerin Jacob
11035bd0a5cSSean MorrisseyThe OCTEON TX ethdev PMD is exposed as a vdev device which consists of a set
111f820b589SJerin Jacobof PKI and PKO PCIe VF devices. On EAL initialization,
112f820b589SJerin JacobPKI/PKO PCIe VF devices will be probed and then the vdev device can be created
113f820b589SJerin Jacobfrom the application code, or from the EAL command line based on
114f820b589SJerin Jacobthe number of probed/bound PKI/PKO PCIe VF device to DPDK by
115f820b589SJerin Jacob
116f820b589SJerin Jacob* Invoking ``rte_vdev_init("eth_octeontx")`` from the application
117f820b589SJerin Jacob
118f820b589SJerin Jacob* Using ``--vdev="eth_octeontx"`` in the EAL options, which will call
119f820b589SJerin Jacob  rte_vdev_init() internally
120f820b589SJerin Jacob
121f820b589SJerin JacobDevice arguments
122f820b589SJerin Jacob~~~~~~~~~~~~~~~~
123f820b589SJerin JacobEach ethdev port is mapped to a physical port(LMAC), Application can specify
124f820b589SJerin Jacobthe number of interesting ports with ``nr_ports`` argument.
125f820b589SJerin Jacob
126f820b589SJerin JacobDependency
127f820b589SJerin Jacob~~~~~~~~~~
12835bd0a5cSSean Morrissey``eth_octeontx`` PMD is depend on ``event_octeontx`` eventdev device and
129f820b589SJerin Jacob``octeontx_fpavf`` external mempool handler.
130f820b589SJerin Jacob
131f820b589SJerin JacobExample:
132f820b589SJerin Jacob
133f820b589SJerin Jacob.. code-block:: console
134f820b589SJerin Jacob
1354e8c3c55SSantosh Shukla    ./your_dpdk_application --mbuf-pool-ops-name="octeontx_fpavf" \
136f820b589SJerin Jacob                --vdev='event_octeontx' \
137f820b589SJerin Jacob                --vdev="eth_octeontx,nr_port=2"
138f820b589SJerin Jacob
139f820b589SJerin JacobLimitations
140f820b589SJerin Jacob-----------
141f820b589SJerin Jacob
142f820b589SJerin Jacob``octeontx_fpavf`` external mempool handler dependency
143f820b589SJerin Jacob~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144f820b589SJerin JacobThe OCTEON TX SoC family NIC has inbuilt HW assisted external mempool manager.
145f820b589SJerin JacobThis driver will only work with ``octeontx_fpavf`` external mempool handler
146f820b589SJerin Jacobas it is the most performance effective way for packet allocation and Tx buffer
147f820b589SJerin Jacobrecycling on OCTEON TX SoC platform.
148f820b589SJerin Jacob
149e599bbf4SThierry HerbelotCRC stripping
150e599bbf4SThierry Herbelot~~~~~~~~~~~~~
151f820b589SJerin Jacob
152f820b589SJerin JacobThe OCTEON TX SoC family NICs strip the CRC for every packets coming into the
1538db1caa9SJerin Jacobhost interface irrespective of the offload configuration.
154f820b589SJerin Jacob
155f820b589SJerin JacobMaximum packet length
156f820b589SJerin Jacob~~~~~~~~~~~~~~~~~~~~~
157f820b589SJerin Jacob
158f820b589SJerin JacobThe OCTEON TX SoC family NICs support a maximum of a 32K jumbo frame. The value
1591bb4a528SFerruh Yigitis fixed and cannot be changed. So, even when the ``rxmode.mtu``
160f820b589SJerin Jacobmember of ``struct rte_eth_conf`` is set to a value lower than 32k, frames
161f820b589SJerin Jacobup to 32k bytes can still reach the host interface.
162b4134b2dSPavan Nikhilesh
163b4134b2dSPavan NikhileshMaximum mempool size
164b4134b2dSPavan Nikhilesh~~~~~~~~~~~~~~~~~~~~
165b4134b2dSPavan Nikhilesh
166b4134b2dSPavan NikhileshThe maximum mempool size supplied to Rx queue setup should be less than 128K.
167b4134b2dSPavan NikhileshWhen running testpmd on OCTEON TX the application can limit the number of mbufs
168b4134b2dSPavan Nikhileshby using the option ``--total-num-mbufs=131072``.
169