1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2019 Marvell International Ltd.
8 #define NIX_TX_OFFLOAD_NONE (0)
9 #define NIX_TX_OFFLOAD_L3_L4_CSUM_F BIT(0)
10 #define NIX_TX_OFFLOAD_OL3_OL4_CSUM_F BIT(1)
11 #define NIX_TX_OFFLOAD_VLAN_QINQ_F BIT(2)
12 #define NIX_TX_OFFLOAD_MBUF_NOFF_F BIT(3)
13 #define NIX_TX_OFFLOAD_TSTAMP_F BIT(4)
14 #define NIX_TX_OFFLOAD_TSO_F BIT(5)
16 /* Flags to control xmit_prepare function.
17 * Defining it from backwards to denote its been
18 * not used as offload flags to pick function
20 #define NIX_TX_MULTI_SEG_F BIT(15)
22 #define NIX_TX_NEED_SEND_HDR_W1 \
23 (NIX_TX_OFFLOAD_L3_L4_CSUM_F | NIX_TX_OFFLOAD_OL3_OL4_CSUM_F | \
24 NIX_TX_OFFLOAD_VLAN_QINQ_F | NIX_TX_OFFLOAD_TSO_F)
26 #define NIX_TX_NEED_EXT_HDR \
27 (NIX_TX_OFFLOAD_VLAN_QINQ_F | NIX_TX_OFFLOAD_TSTAMP_F | \
30 #define NIX_UDP_TUN_BITMASK \
31 ((1ull << (PKT_TX_TUNNEL_VXLAN >> 45)) | \
32 (1ull << (PKT_TX_TUNNEL_GENEVE >> 45)))
34 #define NIX_LSO_FORMAT_IDX_TSOV4 (0)
35 #define NIX_LSO_FORMAT_IDX_TSOV6 (1)
37 /* Function to determine no of tx subdesc required in case ext
38 * sub desc is enabled.
40 static __rte_always_inline int
41 otx2_nix_tx_ext_subs(const uint16_t flags)
43 return (flags & NIX_TX_OFFLOAD_TSTAMP_F) ? 2 :
44 ((flags & (NIX_TX_OFFLOAD_VLAN_QINQ_F | NIX_TX_OFFLOAD_TSO_F)) ?
48 static __rte_always_inline void
49 otx2_nix_xmit_prepare_tstamp(uint64_t *cmd, const uint64_t *send_mem_desc,
50 const uint64_t ol_flags, const uint16_t no_segdw,
53 if (flags & NIX_TX_OFFLOAD_TSTAMP_F) {
54 struct nix_send_mem_s *send_mem;
55 uint16_t off = (no_segdw - 1) << 1;
56 const uint8_t is_ol_tstamp = !(ol_flags & PKT_TX_IEEE1588_TMST);
58 send_mem = (struct nix_send_mem_s *)(cmd + off);
59 if (flags & NIX_TX_MULTI_SEG_F) {
60 /* Retrieving the default desc values */
61 cmd[off] = send_mem_desc[6];
63 /* Using compiler barier to avoid voilation of C
66 rte_compiler_barrier();
69 /* Packets for which PKT_TX_IEEE1588_TMST is not set, tx tstamp
70 * should not be recorded, hence changing the alg type to
71 * NIX_SENDMEMALG_SET and also changing send mem addr field to
72 * next 8 bytes as it corrpt the actual tx tstamp registered
75 send_mem->alg = NIX_SENDMEMALG_SETTSTMP - (is_ol_tstamp);
77 send_mem->addr = (rte_iova_t)((uint64_t *)send_mem_desc[7] +
82 static __rte_always_inline uint64_t
83 otx2_pktmbuf_detach(struct rte_mbuf *m)
85 struct rte_mempool *mp = m->pool;
86 uint32_t mbuf_size, buf_len;
91 /* Update refcount of direct mbuf */
92 md = rte_mbuf_from_indirect(m);
93 refcount = rte_mbuf_refcnt_update(md, -1);
95 priv_size = rte_pktmbuf_priv_size(mp);
96 mbuf_size = (uint32_t)(sizeof(struct rte_mbuf) + priv_size);
97 buf_len = rte_pktmbuf_data_room_size(mp);
99 m->priv_size = priv_size;
100 m->buf_addr = (char *)m + mbuf_size;
101 m->buf_iova = rte_mempool_virt2iova(m) + mbuf_size;
102 m->buf_len = (uint16_t)buf_len;
103 rte_pktmbuf_reset_headroom(m);
109 /* Now indirect mbuf is safe to free */
113 rte_mbuf_refcnt_set(md, 1);
124 static __rte_always_inline uint64_t
125 otx2_nix_prefree_seg(struct rte_mbuf *m)
127 if (likely(rte_mbuf_refcnt_read(m) == 1)) {
128 if (!RTE_MBUF_DIRECT(m))
129 return otx2_pktmbuf_detach(m);
134 } else if (rte_mbuf_refcnt_update(m, -1) == 0) {
135 if (!RTE_MBUF_DIRECT(m))
136 return otx2_pktmbuf_detach(m);
138 rte_mbuf_refcnt_set(m, 1);
144 /* Mbuf is having refcount more than 1 so need not to be freed */
148 static __rte_always_inline void
149 otx2_nix_xmit_prepare_tso(struct rte_mbuf *m, const uint64_t flags)
151 uint64_t mask, ol_flags = m->ol_flags;
153 if (flags & NIX_TX_OFFLOAD_TSO_F &&
154 (ol_flags & PKT_TX_TCP_SEG)) {
155 uintptr_t mdata = rte_pktmbuf_mtod(m, uintptr_t);
156 uint16_t *iplen, *oiplen, *oudplen;
157 uint16_t lso_sb, paylen;
159 mask = -!!(ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6));
160 lso_sb = (mask & (m->outer_l2_len + m->outer_l3_len)) +
161 m->l2_len + m->l3_len + m->l4_len;
163 /* Reduce payload len from base headers */
164 paylen = m->pkt_len - lso_sb;
166 /* Get iplen position assuming no tunnel hdr */
167 iplen = (uint16_t *)(mdata + m->l2_len +
168 (2 << !!(ol_flags & PKT_TX_IPV6)));
169 /* Handle tunnel tso */
170 if ((flags & NIX_TX_OFFLOAD_OL3_OL4_CSUM_F) &&
171 (ol_flags & PKT_TX_TUNNEL_MASK)) {
172 const uint8_t is_udp_tun = (NIX_UDP_TUN_BITMASK >>
173 ((ol_flags & PKT_TX_TUNNEL_MASK) >> 45)) & 0x1;
175 oiplen = (uint16_t *)(mdata + m->outer_l2_len +
176 (2 << !!(ol_flags & PKT_TX_OUTER_IPV6)));
177 *oiplen = rte_cpu_to_be_16(rte_be_to_cpu_16(*oiplen) -
180 /* Update format for UDP tunneled packet */
182 oudplen = (uint16_t *)(mdata + m->outer_l2_len +
183 m->outer_l3_len + 4);
185 rte_cpu_to_be_16(rte_be_to_cpu_16(*oudplen) -
189 /* Update iplen position to inner ip hdr */
190 iplen = (uint16_t *)(mdata + lso_sb - m->l3_len -
191 m->l4_len + (2 << !!(ol_flags & PKT_TX_IPV6)));
194 *iplen = rte_cpu_to_be_16(rte_be_to_cpu_16(*iplen) - paylen);
198 static __rte_always_inline void
199 otx2_nix_xmit_prepare(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags)
201 struct nix_send_ext_s *send_hdr_ext;
202 struct nix_send_hdr_s *send_hdr;
203 uint64_t ol_flags = 0, mask;
204 union nix_send_hdr_w1_u w1;
205 union nix_send_sg_s *sg;
207 send_hdr = (struct nix_send_hdr_s *)cmd;
208 if (flags & NIX_TX_NEED_EXT_HDR) {
209 send_hdr_ext = (struct nix_send_ext_s *)(cmd + 2);
210 sg = (union nix_send_sg_s *)(cmd + 4);
211 /* Clear previous markings */
212 send_hdr_ext->w0.lso = 0;
213 send_hdr_ext->w1.u = 0;
215 sg = (union nix_send_sg_s *)(cmd + 2);
218 if (flags & NIX_TX_NEED_SEND_HDR_W1) {
219 ol_flags = m->ol_flags;
223 if (!(flags & NIX_TX_MULTI_SEG_F)) {
224 send_hdr->w0.total = m->data_len;
226 npa_lf_aura_handle_to_aura(m->pool->pool_id);
231 * 3 => IPV4 with csum
233 * L3type and L3ptr needs to be set for either
234 * L3 csum or L4 csum or LSO
238 if ((flags & NIX_TX_OFFLOAD_OL3_OL4_CSUM_F) &&
239 (flags & NIX_TX_OFFLOAD_L3_L4_CSUM_F)) {
240 const uint8_t csum = !!(ol_flags & PKT_TX_OUTER_UDP_CKSUM);
241 const uint8_t ol3type =
242 ((!!(ol_flags & PKT_TX_OUTER_IPV4)) << 1) +
243 ((!!(ol_flags & PKT_TX_OUTER_IPV6)) << 2) +
244 !!(ol_flags & PKT_TX_OUTER_IP_CKSUM);
247 w1.ol3type = ol3type;
248 mask = 0xffffull << ((!!ol3type) << 4);
249 w1.ol3ptr = ~mask & m->outer_l2_len;
250 w1.ol4ptr = ~mask & (w1.ol3ptr + m->outer_l3_len);
253 w1.ol4type = csum + (csum << 1);
256 w1.il3type = ((!!(ol_flags & PKT_TX_IPV4)) << 1) +
257 ((!!(ol_flags & PKT_TX_IPV6)) << 2);
258 w1.il3ptr = w1.ol4ptr + m->l2_len;
259 w1.il4ptr = w1.il3ptr + m->l3_len;
260 /* Increment it by 1 if it is IPV4 as 3 is with csum */
261 w1.il3type = w1.il3type + !!(ol_flags & PKT_TX_IP_CKSUM);
264 w1.il4type = (ol_flags & PKT_TX_L4_MASK) >> 52;
266 /* In case of no tunnel header use only
267 * shift IL3/IL4 fields a bit to use
268 * OL3/OL4 for header checksum
271 w1.u = ((w1.u & 0xFFFFFFFF00000000) >> (mask << 3)) |
272 ((w1.u & 0X00000000FFFFFFFF) >> (mask << 4));
274 } else if (flags & NIX_TX_OFFLOAD_OL3_OL4_CSUM_F) {
275 const uint8_t csum = !!(ol_flags & PKT_TX_OUTER_UDP_CKSUM);
276 const uint8_t outer_l2_len = m->outer_l2_len;
279 w1.ol3ptr = outer_l2_len;
280 w1.ol4ptr = outer_l2_len + m->outer_l3_len;
281 /* Increment it by 1 if it is IPV4 as 3 is with csum */
282 w1.ol3type = ((!!(ol_flags & PKT_TX_OUTER_IPV4)) << 1) +
283 ((!!(ol_flags & PKT_TX_OUTER_IPV6)) << 2) +
284 !!(ol_flags & PKT_TX_OUTER_IP_CKSUM);
287 w1.ol4type = csum + (csum << 1);
289 } else if (flags & NIX_TX_OFFLOAD_L3_L4_CSUM_F) {
290 const uint8_t l2_len = m->l2_len;
292 /* Always use OLXPTR and OLXTYPE when only
293 * when one header is present
298 w1.ol4ptr = l2_len + m->l3_len;
299 /* Increment it by 1 if it is IPV4 as 3 is with csum */
300 w1.ol3type = ((!!(ol_flags & PKT_TX_IPV4)) << 1) +
301 ((!!(ol_flags & PKT_TX_IPV6)) << 2) +
302 !!(ol_flags & PKT_TX_IP_CKSUM);
305 w1.ol4type = (ol_flags & PKT_TX_L4_MASK) >> 52;
308 if (flags & NIX_TX_NEED_EXT_HDR &&
309 flags & NIX_TX_OFFLOAD_VLAN_QINQ_F) {
310 send_hdr_ext->w1.vlan1_ins_ena = !!(ol_flags & PKT_TX_VLAN);
311 /* HW will update ptr after vlan0 update */
312 send_hdr_ext->w1.vlan1_ins_ptr = 12;
313 send_hdr_ext->w1.vlan1_ins_tci = m->vlan_tci;
315 send_hdr_ext->w1.vlan0_ins_ena = !!(ol_flags & PKT_TX_QINQ);
316 /* 2B before end of l2 header */
317 send_hdr_ext->w1.vlan0_ins_ptr = 12;
318 send_hdr_ext->w1.vlan0_ins_tci = m->vlan_tci_outer;
321 if (flags & NIX_TX_OFFLOAD_TSO_F &&
322 (ol_flags & PKT_TX_TCP_SEG)) {
326 mask = -(!w1.il3type);
327 lso_sb = (mask & w1.ol4ptr) + (~mask & w1.il4ptr) + m->l4_len;
329 send_hdr_ext->w0.lso_sb = lso_sb;
330 send_hdr_ext->w0.lso = 1;
331 send_hdr_ext->w0.lso_mps = m->tso_segsz;
332 send_hdr_ext->w0.lso_format =
333 NIX_LSO_FORMAT_IDX_TSOV4 + !!(ol_flags & PKT_TX_IPV6);
334 w1.ol4type = NIX_SENDL4TYPE_TCP_CKSUM;
336 /* Handle tunnel tso */
337 if ((flags & NIX_TX_OFFLOAD_OL3_OL4_CSUM_F) &&
338 (ol_flags & PKT_TX_TUNNEL_MASK)) {
339 const uint8_t is_udp_tun = (NIX_UDP_TUN_BITMASK >>
340 ((ol_flags & PKT_TX_TUNNEL_MASK) >> 45)) & 0x1;
342 w1.il4type = NIX_SENDL4TYPE_TCP_CKSUM;
343 w1.ol4type = is_udp_tun ? NIX_SENDL4TYPE_UDP_CKSUM : 0;
344 /* Update format for UDP tunneled packet */
345 send_hdr_ext->w0.lso_format += is_udp_tun ? 2 : 6;
347 send_hdr_ext->w0.lso_format +=
348 !!(ol_flags & PKT_TX_OUTER_IPV6) << 1;
352 if (flags & NIX_TX_NEED_SEND_HDR_W1)
353 send_hdr->w1.u = w1.u;
355 if (!(flags & NIX_TX_MULTI_SEG_F)) {
356 sg->seg1_size = m->data_len;
357 *(rte_iova_t *)(++sg) = rte_mbuf_data_iova(m);
359 if (flags & NIX_TX_OFFLOAD_MBUF_NOFF_F) {
360 /* DF bit = 1 if refcount of current mbuf or parent mbuf
362 * DF bit = 0 otherwise
364 send_hdr->w0.df = otx2_nix_prefree_seg(m);
366 /* Mark mempool object as "put" since it is freed by NIX */
367 if (!send_hdr->w0.df)
368 __mempool_check_cookies(m->pool, (void **)&m, 1, 0);
373 static __rte_always_inline void
374 otx2_nix_xmit_one(uint64_t *cmd, void *lmt_addr,
375 const rte_iova_t io_addr, const uint32_t flags)
380 otx2_lmt_mov(lmt_addr, cmd, otx2_nix_tx_ext_subs(flags));
381 lmt_status = otx2_lmt_submit(io_addr);
382 } while (lmt_status == 0);
385 static __rte_always_inline uint16_t
386 otx2_nix_prepare_mseg(struct rte_mbuf *m, uint64_t *cmd, const uint16_t flags)
388 struct nix_send_hdr_s *send_hdr;
389 union nix_send_sg_s *sg;
390 struct rte_mbuf *m_next;
391 uint64_t *slist, sg_u;
396 send_hdr = (struct nix_send_hdr_s *)cmd;
397 send_hdr->w0.total = m->pkt_len;
398 send_hdr->w0.aura = npa_lf_aura_handle_to_aura(m->pool->pool_id);
400 if (flags & NIX_TX_NEED_EXT_HDR)
405 sg = (union nix_send_sg_s *)&cmd[2 + off];
406 /* Clear sg->u header before use */
407 sg->u &= 0xFC00000000000000;
409 slist = &cmd[3 + off];
412 nb_segs = m->nb_segs;
414 /* Fill mbuf segments */
417 sg_u = sg_u | ((uint64_t)m->data_len << (i << 4));
418 *slist = rte_mbuf_data_iova(m);
419 /* Set invert df if buffer is not to be freed by H/W */
420 if (flags & NIX_TX_OFFLOAD_MBUF_NOFF_F)
421 sg_u |= (otx2_nix_prefree_seg(m) << (i + 55));
422 /* Mark mempool object as "put" since it is freed by NIX */
423 if (!(sg_u & (1ULL << (i + 55)))) {
425 __mempool_check_cookies(m->pool, (void **)&m, 1, 0);
430 if (i > 2 && nb_segs) {
432 /* Next SG subdesc */
433 *(uint64_t *)slist = sg_u & 0xFC00000000000000;
436 sg = (union nix_send_sg_s *)slist;
445 segdw = (uint64_t *)slist - (uint64_t *)&cmd[2 + off];
446 /* Roundup extra dwords to multiple of 2 */
447 segdw = (segdw >> 1) + (segdw & 0x1);
449 segdw += (off >> 1) + 1 + !!(flags & NIX_TX_OFFLOAD_TSTAMP_F);
450 send_hdr->w0.sizem1 = segdw - 1;
455 static __rte_always_inline void
456 otx2_nix_xmit_mseg_one(uint64_t *cmd, void *lmt_addr,
457 rte_iova_t io_addr, uint16_t segdw)
462 otx2_lmt_mov_seg(lmt_addr, (const void *)cmd, segdw);
463 lmt_status = otx2_lmt_submit(io_addr);
464 } while (lmt_status == 0);
467 #define L3L4CSUM_F NIX_TX_OFFLOAD_L3_L4_CSUM_F
468 #define OL3OL4CSUM_F NIX_TX_OFFLOAD_OL3_OL4_CSUM_F
469 #define VLAN_F NIX_TX_OFFLOAD_VLAN_QINQ_F
470 #define NOFF_F NIX_TX_OFFLOAD_MBUF_NOFF_F
471 #define TSP_F NIX_TX_OFFLOAD_TSTAMP_F
472 #define TSO_F NIX_TX_OFFLOAD_TSO_F
474 /* [TSO] [TSTMP] [NOFF] [VLAN] [OL3OL4CSUM] [L3L4CSUM] */
475 #define NIX_TX_FASTPATH_MODES \
476 T(no_offload, 0, 0, 0, 0, 0, 0, 4, \
477 NIX_TX_OFFLOAD_NONE) \
478 T(l3l4csum, 0, 0, 0, 0, 0, 1, 4, \
480 T(ol3ol4csum, 0, 0, 0, 0, 1, 0, 4, \
482 T(ol3ol4csum_l3l4csum, 0, 0, 0, 0, 1, 1, 4, \
483 OL3OL4CSUM_F | L3L4CSUM_F) \
484 T(vlan, 0, 0, 0, 1, 0, 0, 6, \
486 T(vlan_l3l4csum, 0, 0, 0, 1, 0, 1, 6, \
487 VLAN_F | L3L4CSUM_F) \
488 T(vlan_ol3ol4csum, 0, 0, 0, 1, 1, 0, 6, \
489 VLAN_F | OL3OL4CSUM_F) \
490 T(vlan_ol3ol4csum_l3l4csum, 0, 0, 0, 1, 1, 1, 6, \
491 VLAN_F | OL3OL4CSUM_F | L3L4CSUM_F) \
492 T(noff, 0, 0, 1, 0, 0, 0, 4, \
494 T(noff_l3l4csum, 0, 0, 1, 0, 0, 1, 4, \
495 NOFF_F | L3L4CSUM_F) \
496 T(noff_ol3ol4csum, 0, 0, 1, 0, 1, 0, 4, \
497 NOFF_F | OL3OL4CSUM_F) \
498 T(noff_ol3ol4csum_l3l4csum, 0, 0, 1, 0, 1, 1, 4, \
499 NOFF_F | OL3OL4CSUM_F | L3L4CSUM_F) \
500 T(noff_vlan, 0, 0, 1, 1, 0, 0, 6, \
502 T(noff_vlan_l3l4csum, 0, 0, 1, 1, 0, 1, 6, \
503 NOFF_F | VLAN_F | L3L4CSUM_F) \
504 T(noff_vlan_ol3ol4csum, 0, 0, 1, 1, 1, 0, 6, \
505 NOFF_F | VLAN_F | OL3OL4CSUM_F) \
506 T(noff_vlan_ol3ol4csum_l3l4csum, 0, 0, 1, 1, 1, 1, 6, \
507 NOFF_F | VLAN_F | OL3OL4CSUM_F | L3L4CSUM_F) \
508 T(ts, 0, 1, 0, 0, 0, 0, 8, \
510 T(ts_l3l4csum, 0, 1, 0, 0, 0, 1, 8, \
511 TSP_F | L3L4CSUM_F) \
512 T(ts_ol3ol4csum, 0, 1, 0, 0, 1, 0, 8, \
513 TSP_F | OL3OL4CSUM_F) \
514 T(ts_ol3ol4csum_l3l4csum, 0, 1, 0, 0, 1, 1, 8, \
515 TSP_F | OL3OL4CSUM_F | L3L4CSUM_F) \
516 T(ts_vlan, 0, 1, 0, 1, 0, 0, 8, \
518 T(ts_vlan_l3l4csum, 0, 1, 0, 1, 0, 1, 8, \
519 TSP_F | VLAN_F | L3L4CSUM_F) \
520 T(ts_vlan_ol3ol4csum, 0, 1, 0, 1, 1, 0, 8, \
521 TSP_F | VLAN_F | OL3OL4CSUM_F) \
522 T(ts_vlan_ol3ol4csum_l3l4csum, 0, 1, 0, 1, 1, 1, 8, \
523 TSP_F | VLAN_F | OL3OL4CSUM_F | L3L4CSUM_F) \
524 T(ts_noff, 0, 1, 1, 0, 0, 0, 8, \
526 T(ts_noff_l3l4csum, 0, 1, 1, 0, 0, 1, 8, \
527 TSP_F | NOFF_F | L3L4CSUM_F) \
528 T(ts_noff_ol3ol4csum, 0, 1, 1, 0, 1, 0, 8, \
529 TSP_F | NOFF_F | OL3OL4CSUM_F) \
530 T(ts_noff_ol3ol4csum_l3l4csum, 0, 1, 1, 0, 1, 1, 8, \
531 TSP_F | NOFF_F | OL3OL4CSUM_F | L3L4CSUM_F) \
532 T(ts_noff_vlan, 0, 1, 1, 1, 0, 0, 8, \
533 TSP_F | NOFF_F | VLAN_F) \
534 T(ts_noff_vlan_l3l4csum, 0, 1, 1, 1, 0, 1, 8, \
535 TSP_F | NOFF_F | VLAN_F | L3L4CSUM_F) \
536 T(ts_noff_vlan_ol3ol4csum, 0, 1, 1, 1, 1, 0, 8, \
537 TSP_F | NOFF_F | VLAN_F | OL3OL4CSUM_F) \
538 T(ts_noff_vlan_ol3ol4csum_l3l4csum, 0, 1, 1, 1, 1, 1, 8, \
539 TSP_F | NOFF_F | VLAN_F | OL3OL4CSUM_F | L3L4CSUM_F) \
541 T(tso, 1, 0, 0, 0, 0, 0, 6, \
543 T(tso_l3l4csum, 1, 0, 0, 0, 0, 1, 6, \
544 TSO_F | L3L4CSUM_F) \
545 T(tso_ol3ol4csum, 1, 0, 0, 0, 1, 0, 6, \
546 TSO_F | OL3OL4CSUM_F) \
547 T(tso_ol3ol4csum_l3l4csum, 1, 0, 0, 0, 1, 1, 6, \
548 TSO_F | OL3OL4CSUM_F | L3L4CSUM_F) \
549 T(tso_vlan, 1, 0, 0, 1, 0, 0, 6, \
551 T(tso_vlan_l3l4csum, 1, 0, 0, 1, 0, 1, 6, \
552 TSO_F | VLAN_F | L3L4CSUM_F) \
553 T(tso_vlan_ol3ol4csum, 1, 0, 0, 1, 1, 0, 6, \
554 TSO_F | VLAN_F | OL3OL4CSUM_F) \
555 T(tso_vlan_ol3ol4csum_l3l4csum, 1, 0, 0, 1, 1, 1, 6, \
556 TSO_F | VLAN_F | OL3OL4CSUM_F | L3L4CSUM_F) \
557 T(tso_noff, 1, 0, 1, 0, 0, 0, 6, \
559 T(tso_noff_l3l4csum, 1, 0, 1, 0, 0, 1, 6, \
560 TSO_F | NOFF_F | L3L4CSUM_F) \
561 T(tso_noff_ol3ol4csum, 1, 0, 1, 0, 1, 0, 6, \
562 TSO_F | NOFF_F | OL3OL4CSUM_F) \
563 T(tso_noff_ol3ol4csum_l3l4csum, 1, 0, 1, 0, 1, 1, 6, \
564 TSO_F | NOFF_F | OL3OL4CSUM_F | L3L4CSUM_F) \
565 T(tso_noff_vlan, 1, 0, 1, 1, 0, 0, 6, \
566 TSO_F | NOFF_F | VLAN_F) \
567 T(tso_noff_vlan_l3l4csum, 1, 0, 1, 1, 0, 1, 6, \
568 TSO_F | NOFF_F | VLAN_F | L3L4CSUM_F) \
569 T(tso_noff_vlan_ol3ol4csum, 1, 0, 1, 1, 1, 0, 6, \
570 TSO_F | NOFF_F | VLAN_F | OL3OL4CSUM_F) \
571 T(tso_noff_vlan_ol3ol4csum_l3l4csum, 1, 0, 1, 1, 1, 1, 6, \
572 TSO_F | NOFF_F | VLAN_F | OL3OL4CSUM_F | L3L4CSUM_F) \
573 T(tso_ts, 1, 1, 0, 0, 0, 0, 8, \
575 T(tso_ts_l3l4csum, 1, 1, 0, 0, 0, 1, 8, \
576 TSO_F | TSP_F | L3L4CSUM_F) \
577 T(tso_ts_ol3ol4csum, 1, 1, 0, 0, 1, 0, 8, \
578 TSO_F | TSP_F | OL3OL4CSUM_F) \
579 T(tso_ts_ol3ol4csum_l3l4csum, 1, 1, 0, 0, 1, 1, 8, \
580 TSO_F | TSP_F | OL3OL4CSUM_F | L3L4CSUM_F) \
581 T(tso_ts_vlan, 1, 1, 0, 1, 0, 0, 8, \
582 TSO_F | TSP_F | VLAN_F) \
583 T(tso_ts_vlan_l3l4csum, 1, 1, 0, 1, 0, 1, 8, \
584 TSO_F | TSP_F | VLAN_F | L3L4CSUM_F) \
585 T(tso_ts_vlan_ol3ol4csum, 1, 1, 0, 1, 1, 0, 8, \
586 TSO_F | TSP_F | VLAN_F | OL3OL4CSUM_F) \
587 T(tso_ts_vlan_ol3ol4csum_l3l4csum, 1, 1, 0, 1, 1, 1, 8, \
588 TSO_F | TSP_F | VLAN_F | OL3OL4CSUM_F | L3L4CSUM_F) \
589 T(tso_ts_noff, 1, 1, 1, 0, 0, 0, 8, \
590 TSO_F | TSP_F | NOFF_F) \
591 T(tso_ts_noff_l3l4csum, 1, 1, 1, 0, 0, 1, 8, \
592 TSO_F | TSP_F | NOFF_F | L3L4CSUM_F) \
593 T(tso_ts_noff_ol3ol4csum, 1, 1, 1, 0, 1, 0, 8, \
594 TSO_F | TSP_F | NOFF_F | OL3OL4CSUM_F) \
595 T(tso_ts_noff_ol3ol4csum_l3l4csum, 1, 1, 1, 0, 1, 1, 8, \
596 TSO_F | TSP_F | NOFF_F | OL3OL4CSUM_F | L3L4CSUM_F) \
597 T(tso_ts_noff_vlan, 1, 1, 1, 1, 0, 0, 8, \
598 TSO_F | TSP_F | NOFF_F | VLAN_F) \
599 T(tso_ts_noff_vlan_l3l4csum, 1, 1, 1, 1, 0, 1, 8, \
600 TSO_F | TSP_F | NOFF_F | VLAN_F | L3L4CSUM_F) \
601 T(tso_ts_noff_vlan_ol3ol4csum, 1, 1, 1, 1, 1, 0, 8, \
602 TSO_F | TSP_F | NOFF_F | VLAN_F | OL3OL4CSUM_F) \
603 T(tso_ts_noff_vlan_ol3ol4csum_l3l4csum, 1, 1, 1, 1, 1, 1, 8, \
604 TSO_F | TSP_F | NOFF_F | VLAN_F | OL3OL4CSUM_F | L3L4CSUM_F)
605 #endif /* __OTX2_TX_H__ */