net/bnxt: fix FW version query
[dpdk.git] / drivers / net / i40e / i40e_rxtx.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2010-2015 Intel Corporation
3  */
4
5 #ifndef _I40E_RXTX_H_
6 #define _I40E_RXTX_H_
7
8 #define RTE_PMD_I40E_RX_MAX_BURST 32
9 #define RTE_PMD_I40E_TX_MAX_BURST 32
10
11 #define RTE_I40E_VPMD_RX_BURST        32
12 #define RTE_I40E_VPMD_TX_BURST        32
13 #define RTE_I40E_RXQ_REARM_THRESH      32
14 #define RTE_I40E_MAX_RX_BURST          RTE_I40E_RXQ_REARM_THRESH
15 #define RTE_I40E_TX_MAX_FREE_BUF_SZ    64
16 #define RTE_I40E_DESCS_PER_LOOP    4
17
18 #define I40E_RXBUF_SZ_1024 1024
19 #define I40E_RXBUF_SZ_2048 2048
20
21 /* In none-PXE mode QLEN must be whole number of 32 descriptors. */
22 #define I40E_ALIGN_RING_DESC    32
23
24 #define I40E_MIN_RING_DESC      64
25 #define I40E_MAX_RING_DESC      4096
26
27 #define I40E_MIN_TSO_MSS          256
28 #define I40E_MAX_TSO_MSS          9674
29
30 #define I40E_TX_MAX_SEG     UINT8_MAX
31 #define I40E_TX_MAX_MTU_SEG 8
32
33 #define I40E_TX_MIN_PKT_LEN 17
34
35 /* Shared FDIR masks between scalar / vector drivers */
36 #define I40E_RX_DESC_EXT_STATUS_FLEXBH_MASK   0x03
37 #define I40E_RX_DESC_EXT_STATUS_FLEXBH_FD_ID  0x01
38 #define I40E_RX_DESC_EXT_STATUS_FLEXBH_FLEX   0x02
39 #define I40E_RX_DESC_EXT_STATUS_FLEXBL_MASK   0x03
40 #define I40E_RX_DESC_EXT_STATUS_FLEXBL_FLEX   0x01
41
42 #undef container_of
43 #define container_of(ptr, type, member) ({ \
44                 typeof(((type *)0)->member)(*__mptr) = (ptr); \
45                 (type *)((char *)__mptr - offsetof(type, member)); })
46
47 #define I40E_TD_CMD (I40E_TX_DESC_CMD_ICRC |\
48                      I40E_TX_DESC_CMD_EOP)
49
50 enum i40e_header_split_mode {
51         i40e_header_split_none = 0,
52         i40e_header_split_enabled = 1,
53         i40e_header_split_always = 2,
54         i40e_header_split_reserved
55 };
56
57 #define I40E_HEADER_SPLIT_NONE    ((uint8_t)0)
58 #define I40E_HEADER_SPLIT_L2      ((uint8_t)(1 << 0))
59 #define I40E_HEADER_SPLIT_IP      ((uint8_t)(1 << 1))
60 #define I40E_HEADER_SPLIT_UDP_TCP ((uint8_t)(1 << 2))
61 #define I40E_HEADER_SPLIT_SCTP    ((uint8_t)(1 << 3))
62 #define I40E_HEADER_SPLIT_ALL (I40E_HEADER_SPLIT_L2 | \
63                                I40E_HEADER_SPLIT_IP | \
64                                I40E_HEADER_SPLIT_UDP_TCP | \
65                                I40E_HEADER_SPLIT_SCTP)
66
67 /* HW desc structure, both 16-byte and 32-byte types are supported */
68 #ifdef RTE_LIBRTE_I40E_16BYTE_RX_DESC
69 #define i40e_rx_desc i40e_16byte_rx_desc
70 #else
71 #define i40e_rx_desc i40e_32byte_rx_desc
72 #endif
73
74 struct i40e_rx_entry {
75         struct rte_mbuf *mbuf;
76 };
77
78 /*
79  * Structure associated with each RX queue.
80  */
81 struct i40e_rx_queue {
82         struct rte_mempool *mp; /**< mbuf pool to populate RX ring */
83         volatile union i40e_rx_desc *rx_ring;/**< RX ring virtual address */
84         uint64_t rx_ring_phys_addr; /**< RX ring DMA address */
85         struct i40e_rx_entry *sw_ring; /**< address of RX soft ring */
86         uint16_t nb_rx_desc; /**< number of RX descriptors */
87         uint16_t rx_free_thresh; /**< max free RX desc to hold */
88         uint16_t rx_tail; /**< current value of tail */
89         uint16_t nb_rx_hold; /**< number of held free RX desc */
90         struct rte_mbuf *pkt_first_seg; /**< first segment of current packet */
91         struct rte_mbuf *pkt_last_seg; /**< last segment of current packet */
92         struct rte_mbuf fake_mbuf; /**< dummy mbuf */
93 #ifdef RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC
94         uint16_t rx_nb_avail; /**< number of staged packets ready */
95         uint16_t rx_next_avail; /**< index of next staged packets */
96         uint16_t rx_free_trigger; /**< triggers rx buffer allocation */
97         struct rte_mbuf *rx_stage[RTE_PMD_I40E_RX_MAX_BURST * 2];
98 #endif
99
100         uint16_t rxrearm_nb;    /**< number of remaining to be re-armed */
101         uint16_t rxrearm_start; /**< the idx we start the re-arming from */
102         uint64_t mbuf_initializer; /**< value to init mbufs */
103
104         uint16_t port_id; /**< device port ID */
105         uint8_t crc_len; /**< 0 if CRC stripped, 4 otherwise */
106         uint8_t fdir_enabled; /**< 0 if FDIR disabled, 1 when enabled */
107         uint16_t queue_id; /**< RX queue index */
108         uint16_t reg_idx; /**< RX queue register index */
109         uint8_t drop_en; /**< if not 0, set register bit */
110         volatile uint8_t *qrx_tail; /**< register address of tail */
111         struct i40e_vsi *vsi; /**< the VSI this queue belongs to */
112         uint16_t rx_buf_len; /* The packet buffer size */
113         uint16_t rx_hdr_len; /* The header buffer size */
114         uint16_t max_pkt_len; /* Maximum packet length */
115         uint8_t hs_mode; /* Header Split mode */
116         bool q_set; /**< indicate if rx queue has been configured */
117         bool rx_deferred_start; /**< don't start this queue in dev start */
118         uint16_t rx_using_sse; /**<flag indicate the usage of vPMD for rx */
119         uint8_t dcb_tc;         /**< Traffic class of rx queue */
120         uint64_t offloads; /**< Rx offload flags of DEV_RX_OFFLOAD_* */
121 };
122
123 struct i40e_tx_entry {
124         struct rte_mbuf *mbuf;
125         uint16_t next_id;
126         uint16_t last_id;
127 };
128
129 /*
130  * Structure associated with each TX queue.
131  */
132 struct i40e_tx_queue {
133         uint16_t nb_tx_desc; /**< number of TX descriptors */
134         uint64_t tx_ring_phys_addr; /**< TX ring DMA address */
135         volatile struct i40e_tx_desc *tx_ring; /**< TX ring virtual address */
136         struct i40e_tx_entry *sw_ring; /**< virtual address of SW ring */
137         uint16_t tx_tail; /**< current value of tail register */
138         volatile uint8_t *qtx_tail; /**< register address of tail */
139         uint16_t nb_tx_used; /**< number of TX desc used since RS bit set */
140         /**< index to last TX descriptor to have been cleaned */
141         uint16_t last_desc_cleaned;
142         /**< Total number of TX descriptors ready to be allocated. */
143         uint16_t nb_tx_free;
144         /**< Start freeing TX buffers if there are less free descriptors than
145              this value. */
146         uint16_t tx_free_thresh;
147         /** Number of TX descriptors to use before RS bit is set. */
148         uint16_t tx_rs_thresh;
149         uint8_t pthresh; /**< Prefetch threshold register. */
150         uint8_t hthresh; /**< Host threshold register. */
151         uint8_t wthresh; /**< Write-back threshold reg. */
152         uint16_t port_id; /**< Device port identifier. */
153         uint16_t queue_id; /**< TX queue index. */
154         uint16_t reg_idx;
155         struct i40e_vsi *vsi; /**< the VSI this queue belongs to */
156         uint16_t tx_next_dd;
157         uint16_t tx_next_rs;
158         bool q_set; /**< indicate if tx queue has been configured */
159         bool tx_deferred_start; /**< don't start this queue in dev start */
160         uint8_t dcb_tc;         /**< Traffic class of tx queue */
161         uint64_t offloads; /**< Tx offload flags of DEV_RX_OFFLOAD_* */
162 };
163
164 /** Offload features */
165 union i40e_tx_offload {
166         uint64_t data;
167         struct {
168                 uint64_t l2_len:7; /**< L2 (MAC) Header Length. */
169                 uint64_t l3_len:9; /**< L3 (IP) Header Length. */
170                 uint64_t l4_len:8; /**< L4 Header Length. */
171                 uint64_t tso_segsz:16; /**< TCP TSO segment size */
172                 uint64_t outer_l2_len:8; /**< outer L2 Header Length */
173                 uint64_t outer_l3_len:16; /**< outer L3 Header Length */
174         };
175 };
176
177 int i40e_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);
178 int i40e_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);
179 int i40e_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id);
180 int i40e_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id);
181 const uint32_t *i40e_dev_supported_ptypes_get(struct rte_eth_dev *dev);
182 int i40e_dev_rx_queue_setup(struct rte_eth_dev *dev,
183                             uint16_t queue_idx,
184                             uint16_t nb_desc,
185                             unsigned int socket_id,
186                             const struct rte_eth_rxconf *rx_conf,
187                             struct rte_mempool *mp);
188 int i40e_dev_tx_queue_setup(struct rte_eth_dev *dev,
189                             uint16_t queue_idx,
190                             uint16_t nb_desc,
191                             unsigned int socket_id,
192                             const struct rte_eth_txconf *tx_conf);
193 void i40e_dev_rx_queue_release(void *rxq);
194 void i40e_dev_tx_queue_release(void *txq);
195 uint16_t i40e_recv_pkts(void *rx_queue,
196                         struct rte_mbuf **rx_pkts,
197                         uint16_t nb_pkts);
198 uint16_t i40e_recv_scattered_pkts(void *rx_queue,
199                                   struct rte_mbuf **rx_pkts,
200                                   uint16_t nb_pkts);
201 uint16_t i40e_xmit_pkts(void *tx_queue,
202                         struct rte_mbuf **tx_pkts,
203                         uint16_t nb_pkts);
204 uint16_t i40e_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
205                 uint16_t nb_pkts);
206 int i40e_tx_queue_init(struct i40e_tx_queue *txq);
207 int i40e_rx_queue_init(struct i40e_rx_queue *rxq);
208 void i40e_free_tx_resources(struct i40e_tx_queue *txq);
209 void i40e_free_rx_resources(struct i40e_rx_queue *rxq);
210 void i40e_dev_clear_queues(struct rte_eth_dev *dev);
211 void i40e_dev_free_queues(struct rte_eth_dev *dev);
212 void i40e_reset_rx_queue(struct i40e_rx_queue *rxq);
213 void i40e_reset_tx_queue(struct i40e_tx_queue *txq);
214 void i40e_tx_queue_release_mbufs(struct i40e_tx_queue *txq);
215 int i40e_tx_done_cleanup(void *txq, uint32_t free_cnt);
216 int i40e_alloc_rx_queue_mbufs(struct i40e_rx_queue *rxq);
217 void i40e_rx_queue_release_mbufs(struct i40e_rx_queue *rxq);
218
219 uint32_t i40e_dev_rx_queue_count(struct rte_eth_dev *dev,
220                                  uint16_t rx_queue_id);
221 int i40e_dev_rx_descriptor_done(void *rx_queue, uint16_t offset);
222 int i40e_dev_rx_descriptor_status(void *rx_queue, uint16_t offset);
223 int i40e_dev_tx_descriptor_status(void *tx_queue, uint16_t offset);
224
225 uint16_t i40e_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
226                             uint16_t nb_pkts);
227 uint16_t i40e_recv_scattered_pkts_vec(void *rx_queue,
228                                       struct rte_mbuf **rx_pkts,
229                                       uint16_t nb_pkts);
230 int i40e_rx_vec_dev_conf_condition_check(struct rte_eth_dev *dev);
231 int i40e_rxq_vec_setup(struct i40e_rx_queue *rxq);
232 int i40e_txq_vec_setup(struct i40e_tx_queue *txq);
233 void i40e_rx_queue_release_mbufs_vec(struct i40e_rx_queue *rxq);
234 uint16_t i40e_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
235                                    uint16_t nb_pkts);
236 void i40e_set_rx_function(struct rte_eth_dev *dev);
237 void i40e_set_tx_function_flag(struct rte_eth_dev *dev,
238                                struct i40e_tx_queue *txq);
239 void i40e_set_tx_function(struct rte_eth_dev *dev);
240 void i40e_set_default_ptype_table(struct rte_eth_dev *dev);
241 void i40e_set_default_pctype_table(struct rte_eth_dev *dev);
242 uint16_t i40e_recv_pkts_vec_avx2(void *rx_queue, struct rte_mbuf **rx_pkts,
243         uint16_t nb_pkts);
244 uint16_t i40e_recv_scattered_pkts_vec_avx2(void *rx_queue,
245         struct rte_mbuf **rx_pkts, uint16_t nb_pkts);
246 uint16_t i40e_xmit_pkts_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
247         uint16_t nb_pkts);
248
249 /* For each value it means, datasheet of hardware can tell more details
250  *
251  * @note: fix i40e_dev_supported_ptypes_get() if any change here.
252  */
253 static inline uint32_t
254 i40e_get_default_pkt_type(uint8_t ptype)
255 {
256         static const uint32_t type_table[UINT8_MAX + 1] __rte_cache_aligned = {
257                 /* L2 types */
258                 /* [0] reserved */
259                 [1] = RTE_PTYPE_L2_ETHER,
260                 [2] = RTE_PTYPE_L2_ETHER_TIMESYNC,
261                 /* [3] - [5] reserved */
262                 [6] = RTE_PTYPE_L2_ETHER_LLDP,
263                 /* [7] - [10] reserved */
264                 [11] = RTE_PTYPE_L2_ETHER_ARP,
265                 /* [12] - [21] reserved */
266
267                 /* Non tunneled IPv4 */
268                 [22] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
269                         RTE_PTYPE_L4_FRAG,
270                 [23] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
271                         RTE_PTYPE_L4_NONFRAG,
272                 [24] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
273                         RTE_PTYPE_L4_UDP,
274                 /* [25] reserved */
275                 [26] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
276                         RTE_PTYPE_L4_TCP,
277                 [27] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
278                         RTE_PTYPE_L4_SCTP,
279                 [28] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
280                         RTE_PTYPE_L4_ICMP,
281
282                 /* IPv4 --> IPv4 */
283                 [29] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
284                         RTE_PTYPE_TUNNEL_IP |
285                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
286                         RTE_PTYPE_INNER_L4_FRAG,
287                 [30] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
288                         RTE_PTYPE_TUNNEL_IP |
289                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
290                         RTE_PTYPE_INNER_L4_NONFRAG,
291                 [31] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
292                         RTE_PTYPE_TUNNEL_IP |
293                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
294                         RTE_PTYPE_INNER_L4_UDP,
295                 /* [32] reserved */
296                 [33] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
297                         RTE_PTYPE_TUNNEL_IP |
298                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
299                         RTE_PTYPE_INNER_L4_TCP,
300                 [34] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
301                         RTE_PTYPE_TUNNEL_IP |
302                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
303                         RTE_PTYPE_INNER_L4_SCTP,
304                 [35] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
305                         RTE_PTYPE_TUNNEL_IP |
306                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
307                         RTE_PTYPE_INNER_L4_ICMP,
308
309                 /* IPv4 --> IPv6 */
310                 [36] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
311                         RTE_PTYPE_TUNNEL_IP |
312                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
313                         RTE_PTYPE_INNER_L4_FRAG,
314                 [37] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
315                         RTE_PTYPE_TUNNEL_IP |
316                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
317                         RTE_PTYPE_INNER_L4_NONFRAG,
318                 [38] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
319                         RTE_PTYPE_TUNNEL_IP |
320                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
321                         RTE_PTYPE_INNER_L4_UDP,
322                 /* [39] reserved */
323                 [40] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
324                         RTE_PTYPE_TUNNEL_IP |
325                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
326                         RTE_PTYPE_INNER_L4_TCP,
327                 [41] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
328                         RTE_PTYPE_TUNNEL_IP |
329                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
330                         RTE_PTYPE_INNER_L4_SCTP,
331                 [42] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
332                         RTE_PTYPE_TUNNEL_IP |
333                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
334                         RTE_PTYPE_INNER_L4_ICMP,
335
336                 /* IPv4 --> GRE/Teredo/VXLAN */
337                 [43] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
338                         RTE_PTYPE_TUNNEL_GRENAT,
339
340                 /* IPv4 --> GRE/Teredo/VXLAN --> IPv4 */
341                 [44] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
342                         RTE_PTYPE_TUNNEL_GRENAT |
343                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
344                         RTE_PTYPE_INNER_L4_FRAG,
345                 [45] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
346                         RTE_PTYPE_TUNNEL_GRENAT |
347                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
348                         RTE_PTYPE_INNER_L4_NONFRAG,
349                 [46] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
350                         RTE_PTYPE_TUNNEL_GRENAT |
351                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
352                         RTE_PTYPE_INNER_L4_UDP,
353                 /* [47] reserved */
354                 [48] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
355                         RTE_PTYPE_TUNNEL_GRENAT |
356                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
357                         RTE_PTYPE_INNER_L4_TCP,
358                 [49] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
359                         RTE_PTYPE_TUNNEL_GRENAT |
360                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
361                         RTE_PTYPE_INNER_L4_SCTP,
362                 [50] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
363                         RTE_PTYPE_TUNNEL_GRENAT |
364                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
365                         RTE_PTYPE_INNER_L4_ICMP,
366
367                 /* IPv4 --> GRE/Teredo/VXLAN --> IPv6 */
368                 [51] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
369                         RTE_PTYPE_TUNNEL_GRENAT |
370                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
371                         RTE_PTYPE_INNER_L4_FRAG,
372                 [52] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
373                         RTE_PTYPE_TUNNEL_GRENAT |
374                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
375                         RTE_PTYPE_INNER_L4_NONFRAG,
376                 [53] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
377                         RTE_PTYPE_TUNNEL_GRENAT |
378                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
379                         RTE_PTYPE_INNER_L4_UDP,
380                 /* [54] reserved */
381                 [55] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
382                         RTE_PTYPE_TUNNEL_GRENAT |
383                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
384                         RTE_PTYPE_INNER_L4_TCP,
385                 [56] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
386                         RTE_PTYPE_TUNNEL_GRENAT |
387                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
388                         RTE_PTYPE_INNER_L4_SCTP,
389                 [57] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
390                         RTE_PTYPE_TUNNEL_GRENAT |
391                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
392                         RTE_PTYPE_INNER_L4_ICMP,
393
394                 /* IPv4 --> GRE/Teredo/VXLAN --> MAC */
395                 [58] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
396                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER,
397
398                 /* IPv4 --> GRE/Teredo/VXLAN --> MAC --> IPv4 */
399                 [59] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
400                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
401                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
402                         RTE_PTYPE_INNER_L4_FRAG,
403                 [60] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
404                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
405                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
406                         RTE_PTYPE_INNER_L4_NONFRAG,
407                 [61] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
408                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
409                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
410                         RTE_PTYPE_INNER_L4_UDP,
411                 /* [62] reserved */
412                 [63] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
413                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
414                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
415                         RTE_PTYPE_INNER_L4_TCP,
416                 [64] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
417                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
418                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
419                         RTE_PTYPE_INNER_L4_SCTP,
420                 [65] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
421                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
422                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
423                         RTE_PTYPE_INNER_L4_ICMP,
424
425                 /* IPv4 --> GRE/Teredo/VXLAN --> MAC --> IPv6 */
426                 [66] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
427                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
428                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
429                         RTE_PTYPE_INNER_L4_FRAG,
430                 [67] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
431                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
432                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
433                         RTE_PTYPE_INNER_L4_NONFRAG,
434                 [68] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
435                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
436                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
437                         RTE_PTYPE_INNER_L4_UDP,
438                 /* [69] reserved */
439                 [70] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
440                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
441                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
442                         RTE_PTYPE_INNER_L4_TCP,
443                 [71] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
444                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
445                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
446                         RTE_PTYPE_INNER_L4_SCTP,
447                 [72] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
448                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
449                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
450                         RTE_PTYPE_INNER_L4_ICMP,
451
452                 /* IPv4 --> GRE/Teredo/VXLAN --> MAC/VLAN */
453                 [73] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
454                         RTE_PTYPE_TUNNEL_GRENAT |
455                         RTE_PTYPE_INNER_L2_ETHER_VLAN,
456
457                 /* IPv4 --> GRE/Teredo/VXLAN --> MAC/VLAN --> IPv4 */
458                 [74] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
459                         RTE_PTYPE_TUNNEL_GRENAT |
460                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
461                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
462                         RTE_PTYPE_INNER_L4_FRAG,
463                 [75] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
464                         RTE_PTYPE_TUNNEL_GRENAT |
465                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
466                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
467                         RTE_PTYPE_INNER_L4_NONFRAG,
468                 [76] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
469                         RTE_PTYPE_TUNNEL_GRENAT |
470                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
471                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
472                         RTE_PTYPE_INNER_L4_UDP,
473                 /* [77] reserved */
474                 [78] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
475                         RTE_PTYPE_TUNNEL_GRENAT |
476                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
477                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
478                         RTE_PTYPE_INNER_L4_TCP,
479                 [79] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
480                         RTE_PTYPE_TUNNEL_GRENAT |
481                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
482                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
483                         RTE_PTYPE_INNER_L4_SCTP,
484                 [80] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
485                         RTE_PTYPE_TUNNEL_GRENAT |
486                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
487                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
488                         RTE_PTYPE_INNER_L4_ICMP,
489
490                 /* IPv4 --> GRE/Teredo/VXLAN --> MAC/VLAN --> IPv6 */
491                 [81] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
492                         RTE_PTYPE_TUNNEL_GRENAT |
493                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
494                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
495                         RTE_PTYPE_INNER_L4_FRAG,
496                 [82] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
497                         RTE_PTYPE_TUNNEL_GRENAT |
498                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
499                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
500                         RTE_PTYPE_INNER_L4_NONFRAG,
501                 [83] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
502                         RTE_PTYPE_TUNNEL_GRENAT |
503                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
504                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
505                         RTE_PTYPE_INNER_L4_UDP,
506                 /* [84] reserved */
507                 [85] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
508                         RTE_PTYPE_TUNNEL_GRENAT |
509                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
510                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
511                         RTE_PTYPE_INNER_L4_TCP,
512                 [86] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
513                         RTE_PTYPE_TUNNEL_GRENAT |
514                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
515                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
516                         RTE_PTYPE_INNER_L4_SCTP,
517                 [87] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
518                         RTE_PTYPE_TUNNEL_GRENAT |
519                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
520                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
521                         RTE_PTYPE_INNER_L4_ICMP,
522
523                 /* Non tunneled IPv6 */
524                 [88] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
525                         RTE_PTYPE_L4_FRAG,
526                 [89] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
527                         RTE_PTYPE_L4_NONFRAG,
528                 [90] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
529                         RTE_PTYPE_L4_UDP,
530                 /* [91] reserved */
531                 [92] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
532                         RTE_PTYPE_L4_TCP,
533                 [93] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
534                         RTE_PTYPE_L4_SCTP,
535                 [94] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
536                         RTE_PTYPE_L4_ICMP,
537
538                 /* IPv6 --> IPv4 */
539                 [95] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
540                         RTE_PTYPE_TUNNEL_IP |
541                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
542                         RTE_PTYPE_INNER_L4_FRAG,
543                 [96] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
544                         RTE_PTYPE_TUNNEL_IP |
545                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
546                         RTE_PTYPE_INNER_L4_NONFRAG,
547                 [97] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
548                         RTE_PTYPE_TUNNEL_IP |
549                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
550                         RTE_PTYPE_INNER_L4_UDP,
551                 /* [98] reserved */
552                 [99] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
553                         RTE_PTYPE_TUNNEL_IP |
554                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
555                         RTE_PTYPE_INNER_L4_TCP,
556                 [100] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
557                         RTE_PTYPE_TUNNEL_IP |
558                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
559                         RTE_PTYPE_INNER_L4_SCTP,
560                 [101] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
561                         RTE_PTYPE_TUNNEL_IP |
562                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
563                         RTE_PTYPE_INNER_L4_ICMP,
564
565                 /* IPv6 --> IPv6 */
566                 [102] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
567                         RTE_PTYPE_TUNNEL_IP |
568                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
569                         RTE_PTYPE_INNER_L4_FRAG,
570                 [103] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
571                         RTE_PTYPE_TUNNEL_IP |
572                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
573                         RTE_PTYPE_INNER_L4_NONFRAG,
574                 [104] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
575                         RTE_PTYPE_TUNNEL_IP |
576                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
577                         RTE_PTYPE_INNER_L4_UDP,
578                 /* [105] reserved */
579                 [106] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
580                         RTE_PTYPE_TUNNEL_IP |
581                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
582                         RTE_PTYPE_INNER_L4_TCP,
583                 [107] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
584                         RTE_PTYPE_TUNNEL_IP |
585                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
586                         RTE_PTYPE_INNER_L4_SCTP,
587                 [108] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
588                         RTE_PTYPE_TUNNEL_IP |
589                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
590                         RTE_PTYPE_INNER_L4_ICMP,
591
592                 /* IPv6 --> GRE/Teredo/VXLAN */
593                 [109] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
594                         RTE_PTYPE_TUNNEL_GRENAT,
595
596                 /* IPv6 --> GRE/Teredo/VXLAN --> IPv4 */
597                 [110] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
598                         RTE_PTYPE_TUNNEL_GRENAT |
599                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
600                         RTE_PTYPE_INNER_L4_FRAG,
601                 [111] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
602                         RTE_PTYPE_TUNNEL_GRENAT |
603                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
604                         RTE_PTYPE_INNER_L4_NONFRAG,
605                 [112] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
606                         RTE_PTYPE_TUNNEL_GRENAT |
607                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
608                         RTE_PTYPE_INNER_L4_UDP,
609                 /* [113] reserved */
610                 [114] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
611                         RTE_PTYPE_TUNNEL_GRENAT |
612                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
613                         RTE_PTYPE_INNER_L4_TCP,
614                 [115] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
615                         RTE_PTYPE_TUNNEL_GRENAT |
616                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
617                         RTE_PTYPE_INNER_L4_SCTP,
618                 [116] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
619                         RTE_PTYPE_TUNNEL_GRENAT |
620                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
621                         RTE_PTYPE_INNER_L4_ICMP,
622
623                 /* IPv6 --> GRE/Teredo/VXLAN --> IPv6 */
624                 [117] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
625                         RTE_PTYPE_TUNNEL_GRENAT |
626                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
627                         RTE_PTYPE_INNER_L4_FRAG,
628                 [118] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
629                         RTE_PTYPE_TUNNEL_GRENAT |
630                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
631                         RTE_PTYPE_INNER_L4_NONFRAG,
632                 [119] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
633                         RTE_PTYPE_TUNNEL_GRENAT |
634                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
635                         RTE_PTYPE_INNER_L4_UDP,
636                 /* [120] reserved */
637                 [121] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
638                         RTE_PTYPE_TUNNEL_GRENAT |
639                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
640                         RTE_PTYPE_INNER_L4_TCP,
641                 [122] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
642                         RTE_PTYPE_TUNNEL_GRENAT |
643                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
644                         RTE_PTYPE_INNER_L4_SCTP,
645                 [123] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
646                         RTE_PTYPE_TUNNEL_GRENAT |
647                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
648                         RTE_PTYPE_INNER_L4_ICMP,
649
650                 /* IPv6 --> GRE/Teredo/VXLAN --> MAC */
651                 [124] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
652                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER,
653
654                 /* IPv6 --> GRE/Teredo/VXLAN --> MAC --> IPv4 */
655                 [125] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
656                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
657                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
658                         RTE_PTYPE_INNER_L4_FRAG,
659                 [126] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
660                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
661                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
662                         RTE_PTYPE_INNER_L4_NONFRAG,
663                 [127] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
664                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
665                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
666                         RTE_PTYPE_INNER_L4_UDP,
667                 /* [128] reserved */
668                 [129] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
669                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
670                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
671                         RTE_PTYPE_INNER_L4_TCP,
672                 [130] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
673                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
674                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
675                         RTE_PTYPE_INNER_L4_SCTP,
676                 [131] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
677                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
678                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
679                         RTE_PTYPE_INNER_L4_ICMP,
680
681                 /* IPv6 --> GRE/Teredo/VXLAN --> MAC --> IPv6 */
682                 [132] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
683                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
684                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
685                         RTE_PTYPE_INNER_L4_FRAG,
686                 [133] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
687                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
688                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
689                         RTE_PTYPE_INNER_L4_NONFRAG,
690                 [134] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
691                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
692                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
693                         RTE_PTYPE_INNER_L4_UDP,
694                 /* [135] reserved */
695                 [136] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
696                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
697                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
698                         RTE_PTYPE_INNER_L4_TCP,
699                 [137] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
700                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
701                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
702                         RTE_PTYPE_INNER_L4_SCTP,
703                 [138] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
704                         RTE_PTYPE_TUNNEL_GRENAT | RTE_PTYPE_INNER_L2_ETHER |
705                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
706                         RTE_PTYPE_INNER_L4_ICMP,
707
708                 /* IPv6 --> GRE/Teredo/VXLAN --> MAC/VLAN */
709                 [139] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
710                         RTE_PTYPE_TUNNEL_GRENAT |
711                         RTE_PTYPE_INNER_L2_ETHER_VLAN,
712
713                 /* IPv6 --> GRE/Teredo/VXLAN --> MAC/VLAN --> IPv4 */
714                 [140] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
715                         RTE_PTYPE_TUNNEL_GRENAT |
716                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
717                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
718                         RTE_PTYPE_INNER_L4_FRAG,
719                 [141] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
720                         RTE_PTYPE_TUNNEL_GRENAT |
721                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
722                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
723                         RTE_PTYPE_INNER_L4_NONFRAG,
724                 [142] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
725                         RTE_PTYPE_TUNNEL_GRENAT |
726                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
727                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
728                         RTE_PTYPE_INNER_L4_UDP,
729                 /* [143] reserved */
730                 [144] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
731                         RTE_PTYPE_TUNNEL_GRENAT |
732                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
733                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
734                         RTE_PTYPE_INNER_L4_TCP,
735                 [145] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
736                         RTE_PTYPE_TUNNEL_GRENAT |
737                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
738                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
739                         RTE_PTYPE_INNER_L4_SCTP,
740                 [146] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
741                         RTE_PTYPE_TUNNEL_GRENAT |
742                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
743                         RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN |
744                         RTE_PTYPE_INNER_L4_ICMP,
745
746                 /* IPv6 --> GRE/Teredo/VXLAN --> MAC/VLAN --> IPv6 */
747                 [147] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
748                         RTE_PTYPE_TUNNEL_GRENAT |
749                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
750                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
751                         RTE_PTYPE_INNER_L4_FRAG,
752                 [148] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
753                         RTE_PTYPE_TUNNEL_GRENAT |
754                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
755                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
756                         RTE_PTYPE_INNER_L4_NONFRAG,
757                 [149] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
758                         RTE_PTYPE_TUNNEL_GRENAT |
759                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
760                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
761                         RTE_PTYPE_INNER_L4_UDP,
762                 /* [150] reserved */
763                 [151] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
764                         RTE_PTYPE_TUNNEL_GRENAT |
765                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
766                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
767                         RTE_PTYPE_INNER_L4_TCP,
768                 [152] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
769                         RTE_PTYPE_TUNNEL_GRENAT |
770                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
771                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
772                         RTE_PTYPE_INNER_L4_SCTP,
773                 [153] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
774                         RTE_PTYPE_TUNNEL_GRENAT |
775                         RTE_PTYPE_INNER_L2_ETHER_VLAN |
776                         RTE_PTYPE_INNER_L3_IPV6_EXT_UNKNOWN |
777                         RTE_PTYPE_INNER_L4_ICMP,
778
779                 /* L2 NSH packet type */
780                 [154] = RTE_PTYPE_L2_ETHER_NSH,
781                 [155] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
782                         RTE_PTYPE_L4_FRAG,
783                 [156] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
784                         RTE_PTYPE_L4_NONFRAG,
785                 [157] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
786                         RTE_PTYPE_L4_UDP,
787                 [158] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
788                         RTE_PTYPE_L4_TCP,
789                 [159] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
790                         RTE_PTYPE_L4_SCTP,
791                 [160] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN |
792                         RTE_PTYPE_L4_ICMP,
793                 [161] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
794                         RTE_PTYPE_L4_FRAG,
795                 [162] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
796                         RTE_PTYPE_L4_NONFRAG,
797                 [163] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
798                         RTE_PTYPE_L4_UDP,
799                 [164] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
800                         RTE_PTYPE_L4_TCP,
801                 [165] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
802                         RTE_PTYPE_L4_SCTP,
803                 [166] = RTE_PTYPE_L2_ETHER_NSH | RTE_PTYPE_L3_IPV6_EXT_UNKNOWN |
804                         RTE_PTYPE_L4_ICMP,
805
806                 /* All others reserved */
807         };
808
809         return type_table[ptype];
810 }
811
812 #endif /* _I40E_RXTX_H_ */