1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2019 Marvell International Ltd.
10 #include "otx2_common.h"
11 #include "otx2_ethdev_sec.h"
12 #include "otx2_ipsec_fp.h"
14 /* Default mark value used when none is provided. */
15 #define OTX2_FLOW_ACTION_FLAG_DEFAULT 0xffff
17 #define PTYPE_NON_TUNNEL_WIDTH 16
18 #define PTYPE_TUNNEL_WIDTH 12
19 #define PTYPE_NON_TUNNEL_ARRAY_SZ BIT(PTYPE_NON_TUNNEL_WIDTH)
20 #define PTYPE_TUNNEL_ARRAY_SZ BIT(PTYPE_TUNNEL_WIDTH)
21 #define PTYPE_ARRAY_SZ ((PTYPE_NON_TUNNEL_ARRAY_SZ +\
22 PTYPE_TUNNEL_ARRAY_SZ) *\
25 #define NIX_RX_OFFLOAD_NONE (0)
26 #define NIX_RX_OFFLOAD_RSS_F BIT(0)
27 #define NIX_RX_OFFLOAD_PTYPE_F BIT(1)
28 #define NIX_RX_OFFLOAD_CHECKSUM_F BIT(2)
29 #define NIX_RX_OFFLOAD_VLAN_STRIP_F BIT(3)
30 #define NIX_RX_OFFLOAD_MARK_UPDATE_F BIT(4)
31 #define NIX_RX_OFFLOAD_TSTAMP_F BIT(5)
32 #define NIX_RX_OFFLOAD_SECURITY_F BIT(6)
34 /* Flags to control cqe_to_mbuf conversion function.
35 * Defining it from backwards to denote its been
36 * not used as offload flags to pick function
38 #define NIX_RX_MULTI_SEG_F BIT(15)
39 #define NIX_TIMESYNC_RX_OFFSET 8
41 /* Inline IPsec offsets */
43 #define INLINE_INB_RPTR_HDR 16
44 /* nix_cqe_hdr_s + nix_rx_parse_s + nix_rx_sg_s + nix_iova_s */
45 #define INLINE_CPT_RESULT_OFFSET 80
47 struct otx2_timesync_info {
49 rte_iova_t tx_tstamp_iova;
53 } __rte_cache_aligned;
55 union mbuf_initializer {
65 static __rte_always_inline void
66 otx2_nix_mbuf_to_tstamp(struct rte_mbuf *mbuf,
67 struct otx2_timesync_info *tstamp, const uint16_t flag,
70 if ((flag & NIX_RX_OFFLOAD_TSTAMP_F) &&
71 (mbuf->data_off == RTE_PKTMBUF_HEADROOM +
72 NIX_TIMESYNC_RX_OFFSET)) {
74 mbuf->pkt_len -= NIX_TIMESYNC_RX_OFFSET;
76 /* Reading the rx timestamp inserted by CGX, viz at
77 * starting of the packet data.
79 mbuf->timestamp = rte_be_to_cpu_64(*tstamp_ptr);
80 /* PKT_RX_IEEE1588_TMST flag needs to be set only in case
81 * PTP packets are received.
83 if (mbuf->packet_type == RTE_PTYPE_L2_ETHER_TIMESYNC) {
84 tstamp->rx_tstamp = mbuf->timestamp;
86 mbuf->ol_flags |= PKT_RX_IEEE1588_PTP |
87 PKT_RX_IEEE1588_TMST | PKT_RX_TIMESTAMP;
92 static __rte_always_inline uint64_t
93 nix_clear_data_off(uint64_t oldval)
95 union mbuf_initializer mbuf_init = { .value = oldval };
97 mbuf_init.fields.data_off = 0;
98 return mbuf_init.value;
101 static __rte_always_inline struct rte_mbuf *
102 nix_get_mbuf_from_cqe(void *cq, const uint64_t data_off)
106 /* Skip CQE, NIX_RX_PARSE_S and SG HDR(9 DWORDs) and peek buff addr */
107 buff = *((rte_iova_t *)((uint64_t *)cq + 9));
108 return (struct rte_mbuf *)(buff - data_off);
112 static __rte_always_inline uint32_t
113 nix_ptype_get(const void * const lookup_mem, const uint64_t in)
115 const uint16_t * const ptype = lookup_mem;
116 const uint16_t lh_lg_lf = (in & 0xFFF0000000000000) >> 52;
117 const uint16_t tu_l2 = ptype[(in & 0x000FFFF000000000) >> 36];
118 const uint16_t il4_tu = ptype[PTYPE_NON_TUNNEL_ARRAY_SZ + lh_lg_lf];
120 return (il4_tu << PTYPE_NON_TUNNEL_WIDTH) | tu_l2;
123 static __rte_always_inline uint32_t
124 nix_rx_olflags_get(const void * const lookup_mem, const uint64_t in)
126 const uint32_t * const ol_flags = (const uint32_t *)
127 ((const uint8_t *)lookup_mem + PTYPE_ARRAY_SZ);
129 return ol_flags[(in & 0xfff00000) >> 20];
132 static inline uint64_t
133 nix_update_match_id(const uint16_t match_id, uint64_t ol_flags,
134 struct rte_mbuf *mbuf)
136 /* There is no separate bit to check match_id
137 * is valid or not? and no flag to identify it is an
138 * RTE_FLOW_ACTION_TYPE_FLAG vs RTE_FLOW_ACTION_TYPE_MARK
139 * action. The former case addressed through 0 being invalid
140 * value and inc/dec match_id pair when MARK is activated.
141 * The later case addressed through defining
142 * OTX2_FLOW_MARK_DEFAULT as value for
143 * RTE_FLOW_ACTION_TYPE_MARK.
144 * This would translate to not use
145 * OTX2_FLOW_ACTION_FLAG_DEFAULT - 1 and
146 * OTX2_FLOW_ACTION_FLAG_DEFAULT for match_id.
147 * i.e valid mark_id's are from
148 * 0 to OTX2_FLOW_ACTION_FLAG_DEFAULT - 2
150 if (likely(match_id)) {
151 ol_flags |= PKT_RX_FDIR;
152 if (match_id != OTX2_FLOW_ACTION_FLAG_DEFAULT) {
153 ol_flags |= PKT_RX_FDIR_ID;
154 mbuf->hash.fdir.hi = match_id - 1;
161 static __rte_always_inline void
162 nix_cqe_xtract_mseg(const struct nix_rx_parse_s *rx,
163 struct rte_mbuf *mbuf, uint64_t rearm)
165 const rte_iova_t *iova_list;
166 struct rte_mbuf *head;
167 const rte_iova_t *eol;
171 sg = *(const uint64_t *)(rx + 1);
172 nb_segs = (sg >> 48) & 0x3;
173 mbuf->nb_segs = nb_segs;
174 mbuf->data_len = sg & 0xFFFF;
177 eol = ((const rte_iova_t *)(rx + 1) + ((rx->desc_sizem1 + 1) << 1));
178 /* Skip SG_S and first IOVA*/
179 iova_list = ((const rte_iova_t *)(rx + 1)) + 2;
182 rearm = rearm & ~0xFFFF;
186 mbuf->next = ((struct rte_mbuf *)*iova_list) - 1;
189 __mempool_check_cookies(mbuf->pool, (void **)&mbuf, 1, 1);
191 mbuf->data_len = sg & 0xFFFF;
193 *(uint64_t *)(&mbuf->rearm_data) = rearm;
197 if (!nb_segs && (iova_list + 1 < eol)) {
198 sg = *(const uint64_t *)(iova_list);
199 nb_segs = (sg >> 48) & 0x3;
200 head->nb_segs += nb_segs;
201 iova_list = (const rte_iova_t *)(iova_list + 1);
206 static __rte_always_inline uint16_t
207 nix_rx_sec_cptres_get(const void *cq)
209 volatile const struct otx2_cpt_res *res;
211 res = (volatile const struct otx2_cpt_res *)((const char *)cq +
212 INLINE_CPT_RESULT_OFFSET);
217 static __rte_always_inline void *
218 nix_rx_sec_sa_get(const void * const lookup_mem, int spi, uint16_t port)
220 const uint64_t *const *sa_tbl = (const uint64_t * const *)
221 ((const uint8_t *)lookup_mem + OTX2_NIX_SA_TBL_START);
223 return (void *)sa_tbl[port][spi];
226 static __rte_always_inline uint64_t
227 nix_rx_sec_mbuf_update(const struct nix_cqe_hdr_s *cq, struct rte_mbuf *m,
228 const void * const lookup_mem)
230 struct otx2_ipsec_fp_in_sa *sa;
231 struct rte_ipv4_hdr *ipv4;
236 if (unlikely(nix_rx_sec_cptres_get(cq) != OTX2_SEC_COMP_GOOD))
237 return PKT_RX_SEC_OFFLOAD | PKT_RX_SEC_OFFLOAD_FAILED;
239 /* 20 bits of tag would have the SPI */
240 spi = cq->tag & 0xFFFFF;
242 sa = nix_rx_sec_sa_get(lookup_mem, spi, m->port);
243 m->udata64 = (uint64_t)sa->userdata;
245 data = rte_pktmbuf_mtod(m, char *);
246 memcpy(data + INLINE_INB_RPTR_HDR, data, RTE_ETHER_HDR_LEN);
248 m->data_off += INLINE_INB_RPTR_HDR;
250 ipv4 = (struct rte_ipv4_hdr *)(data + INLINE_INB_RPTR_HDR +
253 m_len = rte_be_to_cpu_16(ipv4->total_length) + RTE_ETHER_HDR_LEN;
257 return PKT_RX_SEC_OFFLOAD;
260 static __rte_always_inline void
261 otx2_nix_cqe_to_mbuf(const struct nix_cqe_hdr_s *cq, const uint32_t tag,
262 struct rte_mbuf *mbuf, const void *lookup_mem,
263 const uint64_t val, const uint16_t flag)
265 const struct nix_rx_parse_s *rx =
266 (const struct nix_rx_parse_s *)((const uint64_t *)cq + 1);
267 const uint64_t w1 = *(const uint64_t *)rx;
268 const uint16_t len = rx->pkt_lenm1 + 1;
269 uint64_t ol_flags = 0;
271 /* Mark mempool obj as "get" as it is alloc'ed by NIX */
272 __mempool_check_cookies(mbuf->pool, (void **)&mbuf, 1, 1);
274 if (flag & NIX_RX_OFFLOAD_PTYPE_F)
275 mbuf->packet_type = nix_ptype_get(lookup_mem, w1);
277 mbuf->packet_type = 0;
279 if (flag & NIX_RX_OFFLOAD_RSS_F) {
280 mbuf->hash.rss = tag;
281 ol_flags |= PKT_RX_RSS_HASH;
284 if (flag & NIX_RX_OFFLOAD_CHECKSUM_F)
285 ol_flags |= nix_rx_olflags_get(lookup_mem, w1);
287 if (flag & NIX_RX_OFFLOAD_VLAN_STRIP_F) {
288 if (rx->vtag0_gone) {
289 ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
290 mbuf->vlan_tci = rx->vtag0_tci;
292 if (rx->vtag1_gone) {
293 ol_flags |= PKT_RX_QINQ | PKT_RX_QINQ_STRIPPED;
294 mbuf->vlan_tci_outer = rx->vtag1_tci;
298 if (flag & NIX_RX_OFFLOAD_MARK_UPDATE_F)
299 ol_flags = nix_update_match_id(rx->match_id, ol_flags, mbuf);
301 if ((flag & NIX_RX_OFFLOAD_SECURITY_F) &&
302 cq->cqe_type == NIX_XQE_TYPE_RX_IPSECH) {
303 *(uint64_t *)(&mbuf->rearm_data) = val;
304 ol_flags |= nix_rx_sec_mbuf_update(cq, mbuf, lookup_mem);
305 mbuf->ol_flags = ol_flags;
309 mbuf->ol_flags = ol_flags;
310 *(uint64_t *)(&mbuf->rearm_data) = val;
313 if (flag & NIX_RX_MULTI_SEG_F)
314 nix_cqe_xtract_mseg(rx, mbuf, val);
316 mbuf->data_len = len;
319 #define CKSUM_F NIX_RX_OFFLOAD_CHECKSUM_F
320 #define PTYPE_F NIX_RX_OFFLOAD_PTYPE_F
321 #define RSS_F NIX_RX_OFFLOAD_RSS_F
322 #define RX_VLAN_F NIX_RX_OFFLOAD_VLAN_STRIP_F
323 #define MARK_F NIX_RX_OFFLOAD_MARK_UPDATE_F
324 #define TS_F NIX_RX_OFFLOAD_TSTAMP_F
325 #define RX_SEC_F NIX_RX_OFFLOAD_SECURITY_F
327 /* [SEC] [TSMP] [MARK] [VLAN] [CKSUM] [PTYPE] [RSS] */
328 #define NIX_RX_FASTPATH_MODES \
329 R(no_offload, 0, 0, 0, 0, 0, 0, 0, NIX_RX_OFFLOAD_NONE) \
330 R(rss, 0, 0, 0, 0, 0, 0, 1, RSS_F) \
331 R(ptype, 0, 0, 0, 0, 0, 1, 0, PTYPE_F) \
332 R(ptype_rss, 0, 0, 0, 0, 0, 1, 1, PTYPE_F | RSS_F) \
333 R(cksum, 0, 0, 0, 0, 1, 0, 0, CKSUM_F) \
334 R(cksum_rss, 0, 0, 0, 0, 1, 0, 1, CKSUM_F | RSS_F) \
335 R(cksum_ptype, 0, 0, 0, 0, 1, 1, 0, CKSUM_F | PTYPE_F) \
336 R(cksum_ptype_rss, 0, 0, 0, 0, 1, 1, 1, CKSUM_F | PTYPE_F | RSS_F)\
337 R(vlan, 0, 0, 0, 1, 0, 0, 0, RX_VLAN_F) \
338 R(vlan_rss, 0, 0, 0, 1, 0, 0, 1, RX_VLAN_F | RSS_F) \
339 R(vlan_ptype, 0, 0, 0, 1, 0, 1, 0, RX_VLAN_F | PTYPE_F) \
340 R(vlan_ptype_rss, 0, 0, 0, 1, 0, 1, 1, \
341 RX_VLAN_F | PTYPE_F | RSS_F) \
342 R(vlan_cksum, 0, 0, 0, 1, 1, 0, 0, RX_VLAN_F | CKSUM_F) \
343 R(vlan_cksum_rss, 0, 0, 0, 1, 1, 0, 1, \
344 RX_VLAN_F | CKSUM_F | RSS_F) \
345 R(vlan_cksum_ptype, 0, 0, 0, 1, 1, 1, 0, \
346 RX_VLAN_F | CKSUM_F | PTYPE_F) \
347 R(vlan_cksum_ptype_rss, 0, 0, 0, 1, 1, 1, 1, \
348 RX_VLAN_F | CKSUM_F | PTYPE_F | RSS_F) \
349 R(mark, 0, 0, 1, 0, 0, 0, 0, MARK_F) \
350 R(mark_rss, 0, 0, 1, 0, 0, 0, 1, MARK_F | RSS_F) \
351 R(mark_ptype, 0, 0, 1, 0, 0, 1, 0, MARK_F | PTYPE_F) \
352 R(mark_ptype_rss, 0, 0, 1, 0, 0, 1, 1, MARK_F | PTYPE_F | RSS_F) \
353 R(mark_cksum, 0, 0, 1, 0, 1, 0, 0, MARK_F | CKSUM_F) \
354 R(mark_cksum_rss, 0, 0, 1, 0, 1, 0, 1, MARK_F | CKSUM_F | RSS_F) \
355 R(mark_cksum_ptype, 0, 0, 1, 0, 1, 1, 0, \
356 MARK_F | CKSUM_F | PTYPE_F) \
357 R(mark_cksum_ptype_rss, 0, 0, 1, 0, 1, 1, 1, \
358 MARK_F | CKSUM_F | PTYPE_F | RSS_F) \
359 R(mark_vlan, 0, 0, 1, 1, 0, 0, 0, MARK_F | RX_VLAN_F) \
360 R(mark_vlan_rss, 0, 0, 1, 1, 0, 0, 1, \
361 MARK_F | RX_VLAN_F | RSS_F) \
362 R(mark_vlan_ptype, 0, 0, 1, 1, 0, 1, 0, \
363 MARK_F | RX_VLAN_F | PTYPE_F) \
364 R(mark_vlan_ptype_rss, 0, 0, 1, 1, 0, 1, 1, \
365 MARK_F | RX_VLAN_F | PTYPE_F | RSS_F) \
366 R(mark_vlan_cksum, 0, 0, 1, 1, 1, 0, 0, \
367 MARK_F | RX_VLAN_F | CKSUM_F) \
368 R(mark_vlan_cksum_rss, 0, 0, 1, 1, 1, 0, 1, \
369 MARK_F | RX_VLAN_F | CKSUM_F | RSS_F) \
370 R(mark_vlan_cksum_ptype, 0, 0, 1, 1, 1, 1, 0, \
371 MARK_F | RX_VLAN_F | CKSUM_F | PTYPE_F) \
372 R(mark_vlan_cksum_ptype_rss, 0, 0, 1, 1, 1, 1, 1, \
373 MARK_F | RX_VLAN_F | CKSUM_F | PTYPE_F | RSS_F) \
374 R(ts, 0, 1, 0, 0, 0, 0, 0, TS_F) \
375 R(ts_rss, 0, 1, 0, 0, 0, 0, 1, TS_F | RSS_F) \
376 R(ts_ptype, 0, 1, 0, 0, 0, 1, 0, TS_F | PTYPE_F) \
377 R(ts_ptype_rss, 0, 1, 0, 0, 0, 1, 1, TS_F | PTYPE_F | RSS_F) \
378 R(ts_cksum, 0, 1, 0, 0, 1, 0, 0, TS_F | CKSUM_F) \
379 R(ts_cksum_rss, 0, 1, 0, 0, 1, 0, 1, TS_F | CKSUM_F | RSS_F) \
380 R(ts_cksum_ptype, 0, 1, 0, 0, 1, 1, 0, TS_F | CKSUM_F | PTYPE_F) \
381 R(ts_cksum_ptype_rss, 0, 1, 0, 0, 1, 1, 1, \
382 TS_F | CKSUM_F | PTYPE_F | RSS_F) \
383 R(ts_vlan, 0, 1, 0, 1, 0, 0, 0, TS_F | RX_VLAN_F) \
384 R(ts_vlan_rss, 0, 1, 0, 1, 0, 0, 1, TS_F | RX_VLAN_F | RSS_F) \
385 R(ts_vlan_ptype, 0, 1, 0, 1, 0, 1, 0, \
386 TS_F | RX_VLAN_F | PTYPE_F) \
387 R(ts_vlan_ptype_rss, 0, 1, 0, 1, 0, 1, 1, \
388 TS_F | RX_VLAN_F | PTYPE_F | RSS_F) \
389 R(ts_vlan_cksum, 0, 1, 0, 1, 1, 0, 0, \
390 TS_F | RX_VLAN_F | CKSUM_F) \
391 R(ts_vlan_cksum_rss, 0, 1, 0, 1, 1, 0, 1, \
392 MARK_F | RX_VLAN_F | CKSUM_F | RSS_F) \
393 R(ts_vlan_cksum_ptype, 0, 1, 0, 1, 1, 1, 0, \
394 TS_F | RX_VLAN_F | CKSUM_F | PTYPE_F) \
395 R(ts_vlan_cksum_ptype_rss, 0, 1, 0, 1, 1, 1, 1, \
396 TS_F | RX_VLAN_F | CKSUM_F | PTYPE_F | RSS_F) \
397 R(ts_mark, 0, 1, 1, 0, 0, 0, 0, TS_F | MARK_F) \
398 R(ts_mark_rss, 0, 1, 1, 0, 0, 0, 1, TS_F | MARK_F | RSS_F) \
399 R(ts_mark_ptype, 0, 1, 1, 0, 0, 1, 0, TS_F | MARK_F | PTYPE_F) \
400 R(ts_mark_ptype_rss, 0, 1, 1, 0, 0, 1, 1, \
401 TS_F | MARK_F | PTYPE_F | RSS_F) \
402 R(ts_mark_cksum, 0, 1, 1, 0, 1, 0, 0, TS_F | MARK_F | CKSUM_F) \
403 R(ts_mark_cksum_rss, 0, 1, 1, 0, 1, 0, 1, \
404 TS_F | MARK_F | CKSUM_F | RSS_F) \
405 R(ts_mark_cksum_ptype, 0, 1, 1, 0, 1, 1, 0, \
406 TS_F | MARK_F | CKSUM_F | PTYPE_F) \
407 R(ts_mark_cksum_ptype_rss, 0, 1, 1, 0, 1, 1, 1, \
408 TS_F | MARK_F | CKSUM_F | PTYPE_F | RSS_F) \
409 R(ts_mark_vlan, 0, 1, 1, 1, 0, 0, 0, TS_F | MARK_F | RX_VLAN_F)\
410 R(ts_mark_vlan_rss, 0, 1, 1, 1, 0, 0, 1, \
411 TS_F | MARK_F | RX_VLAN_F | RSS_F) \
412 R(ts_mark_vlan_ptype, 0, 1, 1, 1, 0, 1, 0, \
413 TS_F | MARK_F | RX_VLAN_F | PTYPE_F) \
414 R(ts_mark_vlan_ptype_rss, 0, 1, 1, 1, 0, 1, 1, \
415 TS_F | MARK_F | RX_VLAN_F | PTYPE_F | RSS_F) \
416 R(ts_mark_vlan_cksum_ptype, 0, 1, 1, 1, 1, 1, 0, \
417 TS_F | MARK_F | RX_VLAN_F | CKSUM_F | PTYPE_F) \
418 R(ts_mark_vlan_cksum_ptype_rss, 0, 1, 1, 1, 1, 1, 1, \
419 TS_F | MARK_F | RX_VLAN_F | CKSUM_F | PTYPE_F | RSS_F) \
420 R(sec, 1, 0, 0, 0, 0, 0, 0, RX_SEC_F) \
421 R(sec_rss, 1, 0, 0, 0, 0, 0, 1, RX_SEC_F | RSS_F) \
422 R(sec_ptype, 1, 0, 0, 0, 0, 1, 0, RX_SEC_F | PTYPE_F) \
423 R(sec_ptype_rss, 1, 0, 0, 0, 0, 1, 1, \
424 RX_SEC_F | PTYPE_F | RSS_F) \
425 R(sec_cksum, 1, 0, 0, 0, 1, 0, 0, RX_SEC_F | CKSUM_F) \
426 R(sec_cksum_rss, 1, 0, 0, 0, 1, 0, 1, \
427 RX_SEC_F | CKSUM_F | RSS_F) \
428 R(sec_cksum_ptype, 1, 0, 0, 0, 1, 1, 0, \
429 RX_SEC_F | CKSUM_F | PTYPE_F) \
430 R(sec_cksum_ptype_rss, 1, 0, 0, 0, 1, 1, 1, \
431 RX_SEC_F | CKSUM_F | PTYPE_F | RSS_F) \
432 R(sec_vlan, 1, 0, 0, 1, 0, 0, 0, RX_SEC_F | RX_VLAN_F) \
433 R(sec_vlan_rss, 1, 0, 0, 1, 0, 0, 1, \
434 RX_SEC_F | RX_VLAN_F | RSS_F) \
435 R(sec_vlan_ptype, 1, 0, 0, 1, 0, 1, 0, \
436 RX_SEC_F | RX_VLAN_F | PTYPE_F) \
437 R(sec_vlan_ptype_rss, 1, 0, 0, 1, 0, 1, 1, \
438 RX_SEC_F | RX_VLAN_F | PTYPE_F | RSS_F) \
439 R(sec_vlan_cksum, 1, 0, 0, 1, 1, 0, 0, \
440 RX_SEC_F | RX_VLAN_F | CKSUM_F) \
441 R(sec_vlan_cksum_rss, 1, 0, 0, 1, 1, 0, 1, \
442 RX_SEC_F | RX_VLAN_F | CKSUM_F | RSS_F) \
443 R(sec_vlan_cksum_ptype, 1, 0, 0, 1, 1, 1, 0, \
444 RX_SEC_F | RX_VLAN_F | CKSUM_F | PTYPE_F) \
445 R(sec_vlan_cksum_ptype_rss, 1, 0, 0, 1, 1, 1, 1, \
446 RX_SEC_F | RX_VLAN_F | CKSUM_F | PTYPE_F | RSS_F) \
447 R(sec_mark, 1, 0, 1, 0, 0, 0, 0, RX_SEC_F | MARK_F) \
448 R(sec_mark_rss, 1, 0, 1, 0, 0, 0, 1, RX_SEC_F | MARK_F | RSS_F)\
449 R(sec_mark_ptype, 1, 0, 1, 0, 0, 1, 0, \
450 RX_SEC_F | MARK_F | PTYPE_F) \
451 R(sec_mark_ptype_rss, 1, 0, 1, 0, 0, 1, 1, \
452 RX_SEC_F | MARK_F | PTYPE_F | RSS_F) \
453 R(sec_mark_cksum, 1, 0, 1, 0, 1, 0, 0, \
454 RX_SEC_F | MARK_F | CKSUM_F) \
455 R(sec_mark_cksum_rss, 1, 0, 1, 0, 1, 0, 1, \
456 RX_SEC_F | MARK_F | CKSUM_F | RSS_F) \
457 R(sec_mark_cksum_ptype, 1, 0, 1, 0, 1, 1, 0, \
458 RX_SEC_F | MARK_F | CKSUM_F | PTYPE_F) \
459 R(sec_mark_cksum_ptype_rss, 1, 0, 1, 0, 1, 1, 1, \
460 RX_SEC_F | MARK_F | CKSUM_F | PTYPE_F | RSS_F) \
461 R(sec_mark_vlan, 1, 0, 1, 1, 0, 0, 0, RX_SEC_F | RX_VLAN_F) \
462 R(sec_mark_vlan_rss, 1, 0, 1, 1, 0, 0, 1, \
463 RX_SEC_F | MARK_F | RX_VLAN_F | RSS_F) \
464 R(sec_mark_vlan_ptype, 1, 0, 1, 1, 0, 1, 0, \
465 RX_SEC_F | MARK_F | RX_VLAN_F | PTYPE_F) \
466 R(sec_mark_vlan_ptype_rss, 1, 0, 1, 1, 0, 1, 1, \
467 RX_SEC_F | MARK_F | RX_VLAN_F | PTYPE_F | RSS_F) \
468 R(sec_mark_vlan_cksum, 1, 0, 1, 1, 1, 0, 0, \
469 RX_SEC_F | MARK_F | RX_VLAN_F | CKSUM_F) \
470 R(sec_mark_vlan_cksum_rss, 1, 0, 1, 1, 1, 0, 1, \
471 RX_SEC_F | MARK_F | RX_VLAN_F | CKSUM_F | RSS_F) \
472 R(sec_mark_vlan_cksum_ptype, 1, 0, 1, 1, 1, 1, 0, \
473 RX_SEC_F | MARK_F | RX_VLAN_F | CKSUM_F | PTYPE_F) \
474 R(sec_mark_vlan_cksum_ptype_rss, \
475 1, 0, 1, 1, 1, 1, 1, \
476 RX_SEC_F | MARK_F | RX_VLAN_F | CKSUM_F | PTYPE_F | \
478 R(sec_ts, 1, 1, 0, 0, 0, 0, 0, RX_SEC_F | TS_F) \
479 R(sec_ts_rss, 1, 1, 0, 0, 0, 0, 1, RX_SEC_F | TS_F | RSS_F) \
480 R(sec_ts_ptype, 1, 1, 0, 0, 0, 1, 0, RX_SEC_F | TS_F | PTYPE_F)\
481 R(sec_ts_ptype_rss, 1, 1, 0, 0, 0, 1, 1, \
482 RX_SEC_F | TS_F | PTYPE_F | RSS_F) \
483 R(sec_ts_cksum, 1, 1, 0, 0, 1, 0, 0, RX_SEC_F | TS_F | CKSUM_F)\
484 R(sec_ts_cksum_rss, 1, 1, 0, 0, 1, 0, 1, \
485 RX_SEC_F | TS_F | CKSUM_F | RSS_F) \
486 R(sec_ts_cksum_ptype, 1, 1, 0, 0, 1, 1, 0, \
487 RX_SEC_F | CKSUM_F | PTYPE_F) \
488 R(sec_ts_cksum_ptype_rss, 1, 1, 0, 0, 1, 1, 1, \
489 RX_SEC_F | TS_F | CKSUM_F | PTYPE_F | RSS_F) \
490 R(sec_ts_vlan, 1, 1, 0, 1, 0, 0, 0, \
491 RX_SEC_F | TS_F | RX_VLAN_F) \
492 R(sec_ts_vlan_rss, 1, 1, 0, 1, 0, 0, 1, \
493 RX_SEC_F | TS_F | RX_VLAN_F | RSS_F) \
494 R(sec_ts_vlan_ptype, 1, 1, 0, 1, 0, 1, 0, \
495 RX_SEC_F | TS_F | RX_VLAN_F | PTYPE_F) \
496 R(sec_ts_vlan_ptype_rss, 1, 1, 0, 1, 0, 1, 1, \
497 RX_SEC_F | TS_F | RX_VLAN_F | PTYPE_F | RSS_F) \
498 R(sec_ts_vlan_cksum, 1, 1, 0, 1, 1, 0, 0, \
499 RX_SEC_F | TS_F | RX_VLAN_F | CKSUM_F) \
500 R(sec_ts_vlan_cksum_rss, 1, 1, 0, 1, 1, 0, 1, \
501 RX_SEC_F | TS_F | RX_VLAN_F | CKSUM_F | RSS_F) \
502 R(sec_ts_vlan_cksum_ptype, 1, 1, 0, 1, 1, 1, 0, \
503 RX_SEC_F | TS_F | RX_VLAN_F | CKSUM_F | PTYPE_F) \
504 R(sec_ts_vlan_cksum_ptype_rss, 1, 1, 0, 1, 1, 1, 1, \
505 RX_SEC_F | TS_F | RX_VLAN_F | CKSUM_F | PTYPE_F | \
507 R(sec_ts_mark, 1, 1, 1, 0, 0, 0, 0, RX_SEC_F | TS_F | MARK_F) \
508 R(sec_ts_mark_rss, 1, 1, 1, 0, 0, 0, 1, \
509 RX_SEC_F | TS_F | MARK_F | RSS_F) \
510 R(sec_ts_mark_ptype, 1, 1, 1, 0, 0, 1, 0, \
511 RX_SEC_F | TS_F | MARK_F | PTYPE_F) \
512 R(sec_ts_mark_ptype_rss, 1, 1, 1, 0, 0, 1, 1, \
513 RX_SEC_F | TS_F | MARK_F | PTYPE_F | RSS_F) \
514 R(sec_ts_mark_cksum, 1, 1, 1, 0, 1, 0, 0, \
515 RX_SEC_F | TS_F | MARK_F | CKSUM_F) \
516 R(sec_ts_mark_cksum_rss, 1, 1, 1, 0, 1, 0, 1, \
517 RX_SEC_F | TS_F | MARK_F | CKSUM_F | RSS_F) \
518 R(sec_ts_mark_cksum_ptype, 1, 1, 1, 0, 1, 1, 0, \
519 RX_SEC_F | TS_F | MARK_F | CKSUM_F | PTYPE_F) \
520 R(sec_ts_mark_cksum_ptype_rss, 1, 1, 1, 0, 1, 1, 1, \
521 RX_SEC_F | TS_F | MARK_F | CKSUM_F | PTYPE_F | RSS_F) \
522 R(sec_ts_mark_vlan, 1, 1, 1, 1, 0, 0, 0, \
523 RX_SEC_F | TS_F | MARK_F | RX_VLAN_F) \
524 R(sec_ts_mark_vlan_rss, 1, 1, 1, 1, 0, 0, 1, \
525 RX_SEC_F | RX_VLAN_F | RSS_F) \
526 R(sec_ts_mark_vlan_ptype, 1, 1, 1, 1, 0, 1, 0, \
527 RX_SEC_F | TS_F | MARK_F | RX_VLAN_F | PTYPE_F) \
528 R(sec_ts_mark_vlan_ptype_rss, 1, 1, 1, 1, 0, 1, 1, \
529 RX_SEC_F | TS_F | MARK_F | RX_VLAN_F | PTYPE_F | RSS_F)\
530 R(sec_ts_mark_vlan_cksum, 1, 1, 1, 1, 1, 0, 0, \
531 RX_SEC_F | TS_F | MARK_F | RX_VLAN_F | CKSUM_F) \
532 R(sec_ts_mark_vlan_cksum_rss, 1, 1, 1, 1, 1, 0, 1, \
533 RX_SEC_F | TS_F | MARK_F | RX_VLAN_F | CKSUM_F | RSS_F)\
534 R(sec_ts_mark_vlan_cksum_ptype, 1, 1, 1, 1, 1, 1, 0, \
535 RX_SEC_F | TS_F | MARK_F | RX_VLAN_F | CKSUM_F | \
537 R(sec_ts_mark_vlan_cksum_ptype_rss, \
538 1, 1, 1, 1, 1, 1, 1, \
539 RX_SEC_F | TS_F | MARK_F | RX_VLAN_F | CKSUM_F | \
541 #endif /* __OTX2_RX_H__ */