e92631057e206e6a02d07e9176cb651ff98b54f2
[dpdk.git] / doc / guides / nics / octeontx2.rst
1 ..  SPDX-License-Identifier: BSD-3-Clause
2     Copyright(C) 2019 Marvell International Ltd.
3
4 OCTEON TX2 Poll Mode driver
5 ===========================
6
7 The OCTEON TX2 ETHDEV PMD (**librte_pmd_octeontx2**) provides poll mode ethdev
8 driver support for the inbuilt network device found in **Marvell OCTEON TX2**
9 SoC family as well as for their virtual functions (VF) in SR-IOV context.
10
11 More information can be found at `Marvell Official Website
12 <https://www.marvell.com/embedded-processors/infrastructure-processors>`_.
13
14 Features
15 --------
16
17 Features of the OCTEON TX2 Ethdev PMD are:
18
19 - Packet type information
20 - Promiscuous mode
21 - Jumbo frames
22 - SR-IOV VF
23 - Lock-free Tx queue
24 - Multiple queues for TX and RX
25 - Receiver Side Scaling (RSS)
26 - MAC/VLAN filtering
27 - Generic flow API
28 - Inner and Outer Checksum offload
29 - VLAN/QinQ stripping and insertion
30 - Port hardware statistics
31 - Link state information
32 - Link flow control
33 - Scatter-Gather IO support
34 - Vector Poll mode driver
35 - Debug utilities - Context dump and error interrupt support
36 - IEEE1588 timestamping
37
38 Prerequisites
39 -------------
40
41 See :doc:`../platform/octeontx2` for setup information.
42
43 Compile time Config Options
44 ---------------------------
45
46 The following options may be modified in the ``config`` file.
47
48 - ``CONFIG_RTE_LIBRTE_OCTEONTX2_PMD`` (default ``y``)
49
50   Toggle compilation of the ``librte_pmd_octeontx2`` driver.
51
52 Runtime Config Options
53 ----------------------
54
55 - ``HW offload ptype parsing disable`` (default ``0``)
56
57    Packet type parsing is HW offloaded by default and this feature may be toggled
58    using ``ptype_disable`` ``devargs`` parameter.
59
60 - ``Rx&Tx scalar mode enable`` (default ``0``)
61
62    Ethdev supports both scalar and vector mode, it may be selected at runtime
63    using ``scalar_enable`` ``devargs`` parameter.
64
65 - ``RSS reta size`` (default ``64``)
66
67    RSS redirection table size may be configured during runtime using ``reta_size``
68    ``devargs`` parameter.
69
70    For example::
71
72       -w 0002:02:00.0,reta_size=256
73
74    With the above configuration, reta table of size 256 is populated.
75
76 - ``Flow priority levels`` (default ``3``)
77
78    RTE Flow priority levels can be configured during runtime using
79    ``flow_max_priority`` ``devargs`` parameter.
80
81    For example::
82
83       -w 0002:02:00.0,flow_max_priority=10
84
85    With the above configuration, priority level was set to 10 (0-9). Max
86    priority level supported is 32.
87
88 - ``Reserve Flow entries`` (default ``8``)
89
90    RTE flow entries can be pre allocated and the size of pre allocation can be
91    selected runtime using ``flow_prealloc_size`` ``devargs`` parameter.
92
93    For example::
94
95       -w 0002:02:00.0,flow_prealloc_size=4
96
97    With the above configuration, pre alloc size was set to 4. Max pre alloc
98    size supported is 32.
99
100 - ``Max SQB buffer count`` (default ``512``)
101
102    Send queue descriptor buffer count may be limited during runtime using
103    ``max_sqb_count`` ``devargs`` parameter.
104
105    For example::
106
107       -w 0002:02:00.0,max_sqb_count=64
108
109    With the above configuration, each send queue's decscriptor buffer count is
110    limited to a maximum of 64 buffers.
111
112
113 .. note::
114
115    Above devarg parameters are configurable per device, user needs to pass the
116    parameters to all the PCIe devices if application requires to configure on
117    all the ethdev ports.
118
119 RTE Flow Support
120 ----------------
121
122 The OCTEON TX2 SoC family NIC has support for the following patterns and
123 actions.
124
125 Patterns:
126
127 .. _table_octeontx2_supported_flow_item_types:
128
129 .. table:: Item types
130
131    +----+--------------------------------+
132    | #  | Pattern Type                   |
133    +====+================================+
134    | 1  | RTE_FLOW_ITEM_TYPE_ETH         |
135    +----+--------------------------------+
136    | 2  | RTE_FLOW_ITEM_TYPE_VLAN        |
137    +----+--------------------------------+
138    | 3  | RTE_FLOW_ITEM_TYPE_E_TAG       |
139    +----+--------------------------------+
140    | 4  | RTE_FLOW_ITEM_TYPE_IPV4        |
141    +----+--------------------------------+
142    | 5  | RTE_FLOW_ITEM_TYPE_IPV6        |
143    +----+--------------------------------+
144    | 6  | RTE_FLOW_ITEM_TYPE_ARP_ETH_IPV4|
145    +----+--------------------------------+
146    | 7  | RTE_FLOW_ITEM_TYPE_MPLS        |
147    +----+--------------------------------+
148    | 8  | RTE_FLOW_ITEM_TYPE_ICMP        |
149    +----+--------------------------------+
150    | 9  | RTE_FLOW_ITEM_TYPE_UDP         |
151    +----+--------------------------------+
152    | 10 | RTE_FLOW_ITEM_TYPE_TCP         |
153    +----+--------------------------------+
154    | 11 | RTE_FLOW_ITEM_TYPE_SCTP        |
155    +----+--------------------------------+
156    | 12 | RTE_FLOW_ITEM_TYPE_ESP         |
157    +----+--------------------------------+
158    | 13 | RTE_FLOW_ITEM_TYPE_GRE         |
159    +----+--------------------------------+
160    | 14 | RTE_FLOW_ITEM_TYPE_NVGRE       |
161    +----+--------------------------------+
162    | 15 | RTE_FLOW_ITEM_TYPE_VXLAN       |
163    +----+--------------------------------+
164    | 16 | RTE_FLOW_ITEM_TYPE_GTPC        |
165    +----+--------------------------------+
166    | 17 | RTE_FLOW_ITEM_TYPE_GTPU        |
167    +----+--------------------------------+
168    | 18 | RTE_FLOW_ITEM_TYPE_GENEVE      |
169    +----+--------------------------------+
170    | 19 | RTE_FLOW_ITEM_TYPE_VXLAN_GPE   |
171    +----+--------------------------------+
172    | 20 | RTE_FLOW_ITEM_TYPE_VOID        |
173    +----+--------------------------------+
174    | 21 | RTE_FLOW_ITEM_TYPE_ANY         |
175    +----+--------------------------------+
176
177 Actions:
178
179 .. _table_octeontx2_supported_ingress_action_types:
180
181 .. table:: Ingress action types
182
183    +----+--------------------------------+
184    | #  | Action Type                    |
185    +====+================================+
186    | 1  | RTE_FLOW_ACTION_TYPE_VOID      |
187    +----+--------------------------------+
188    | 2  | RTE_FLOW_ACTION_TYPE_MARK      |
189    +----+--------------------------------+
190    | 3  | RTE_FLOW_ACTION_TYPE_FLAG      |
191    +----+--------------------------------+
192    | 4  | RTE_FLOW_ACTION_TYPE_COUNT     |
193    +----+--------------------------------+
194    | 5  | RTE_FLOW_ACTION_TYPE_DROP      |
195    +----+--------------------------------+
196    | 6  | RTE_FLOW_ACTION_TYPE_QUEUE     |
197    +----+--------------------------------+
198    | 7  | RTE_FLOW_ACTION_TYPE_RSS       |
199    +----+--------------------------------+
200    | 8  | RTE_FLOW_ACTION_TYPE_SECURITY  |
201    +----+--------------------------------+
202
203 .. _table_octeontx2_supported_egress_action_types:
204
205 .. table:: Egress action types
206
207    +----+--------------------------------+
208    | #  | Action Type                    |
209    +====+================================+
210    | 1  | RTE_FLOW_ACTION_TYPE_COUNT     |
211    +----+--------------------------------+
212    | 2  | RTE_FLOW_ACTION_TYPE_DROP      |
213    +----+--------------------------------+