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_net_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 14Supported OCTEON TX SoCs 15------------------------ 16 17- CN83xx 18 19Features 20-------- 21 22Features of the OCTEON TX Ethdev PMD are: 23 24- Packet type information 25- Promiscuous mode 26- Port hardware statistics 27- Jumbo frames 28- Scatter-Gather IO support 29- Link state information 30- MAC/VLAN filtering 31- MTU update 32- SR-IOV VF 33- Multiple queues for TX 34- Lock-free Tx queue 35- HW offloaded `ethdev Rx queue` to `eventdev event queue` packet injection 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 52Configuration 53------------- 54 55Driver compilation and testing 56~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 57 58Refer to the document :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>` 59for details. 60 61#. Running testpmd: 62 63 Follow instructions available in the document 64 :ref:`compiling and testing a PMD for a NIC <pmd_build_and_test>` 65 to run testpmd. 66 67 Example output: 68 69 .. code-block:: console 70 71 ./<build_dir>/app/dpdk-testpmd -c 700 \ 72 --base-virtaddr=0x100000000000 \ 73 --mbuf-pool-ops-name="octeontx_fpavf" \ 74 --vdev='event_octeontx' \ 75 --vdev='eth_octeontx,nr_port=2' \ 76 -- --rxq=1 --txq=1 --nb-core=2 \ 77 --total-num-mbufs=16384 -i 78 ..... 79 EAL: Detected 24 lcore(s) 80 EAL: Probing VFIO support... 81 EAL: VFIO support initialized 82 ..... 83 EAL: PCI device 0000:07:00.1 on NUMA socket 0 84 EAL: probe driver: 177d:a04b octeontx_ssovf 85 ..... 86 EAL: PCI device 0001:02:00.7 on NUMA socket 0 87 EAL: probe driver: 177d:a0dd octeontx_pkivf 88 ..... 89 EAL: PCI device 0001:03:01.0 on NUMA socket 0 90 EAL: probe driver: 177d:a049 octeontx_pkovf 91 ..... 92 PMD: octeontx_probe(): created ethdev eth_octeontx for port 0 93 PMD: octeontx_probe(): created ethdev eth_octeontx for port 1 94 ..... 95 Configuring Port 0 (socket 0) 96 Port 0: 00:0F:B7:11:94:46 97 Configuring Port 1 (socket 0) 98 Port 1: 00:0F:B7:11:94:47 99 ..... 100 Checking link statuses... 101 Port 0 Link Up - speed 40000 Mbps - full-duplex 102 Port 1 Link Up - speed 40000 Mbps - full-duplex 103 Done 104 testpmd> 105 106 107Initialization 108-------------- 109 110The OCTEON TX ethdev PMD is exposed as a vdev device which consists of a set 111of PKI and PKO PCIe VF devices. On EAL initialization, 112PKI/PKO PCIe VF devices will be probed and then the vdev device can be created 113from the application code, or from the EAL command line based on 114the number of probed/bound PKI/PKO PCIe VF device to DPDK by 115 116* Invoking ``rte_vdev_init("eth_octeontx")`` from the application 117 118* Using ``--vdev="eth_octeontx"`` in the EAL options, which will call 119 rte_vdev_init() internally 120 121Device arguments 122~~~~~~~~~~~~~~~~ 123Each ethdev port is mapped to a physical port(LMAC), Application can specify 124the number of interesting ports with ``nr_ports`` argument. 125 126Dependency 127~~~~~~~~~~ 128``eth_octeontx`` PMD is depend on ``event_octeontx`` eventdev device and 129``octeontx_fpavf`` external mempool handler. 130 131Example: 132 133.. code-block:: console 134 135 ./your_dpdk_application --mbuf-pool-ops-name="octeontx_fpavf" \ 136 --vdev='event_octeontx' \ 137 --vdev="eth_octeontx,nr_port=2" 138 139Limitations 140----------- 141 142``octeontx_fpavf`` external mempool handler dependency 143~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 144The OCTEON TX SoC family NIC has inbuilt HW assisted external mempool manager. 145This driver will only work with ``octeontx_fpavf`` external mempool handler 146as it is the most performance effective way for packet allocation and Tx buffer 147recycling on OCTEON TX SoC platform. 148 149CRC stripping 150~~~~~~~~~~~~~ 151 152The OCTEON TX SoC family NICs strip the CRC for every packets coming into the 153host interface irrespective of the offload configuration. 154 155Maximum packet length 156~~~~~~~~~~~~~~~~~~~~~ 157 158The OCTEON TX SoC family NICs support a maximum of a 32K jumbo frame. The value 159is fixed and cannot be changed. So, even when the ``rxmode.mtu`` 160member of ``struct rte_eth_conf`` is set to a value lower than 32k, frames 161up to 32k bytes can still reach the host interface. 162 163Maximum mempool size 164~~~~~~~~~~~~~~~~~~~~ 165 166The maximum mempool size supplied to Rx queue setup should be less than 128K. 167When running testpmd on OCTEON TX the application can limit the number of mbufs 168by using the option ``--total-num-mbufs=131072``. 169