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