net/sfc: check ID overflow in action port ID
[dpdk.git] / drivers / net / cnxk / cn10k_tx_vec_mseg.c
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2021 Marvell.
3  */
4
5 #include "cn10k_ethdev.h"
6 #include "cn10k_tx.h"
7
8 #define T(name, f5, f4, f3, f2, f1, f0, sz, flags)                             \
9         uint16_t __rte_noinline __rte_hot cn10k_nix_xmit_pkts_vec_mseg_##name( \
10                 void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t pkts)      \
11         {                                                                      \
12                 uint64_t cmd[sz];                                              \
13                                                                                \
14                 /* For TSO inner checksum is a must */                         \
15                 if (((flags) & NIX_TX_OFFLOAD_TSO_F) &&                        \
16                     !((flags) & NIX_TX_OFFLOAD_L3_L4_CSUM_F))                  \
17                         return 0;                                              \
18                 return cn10k_nix_xmit_pkts_vector(                             \
19                         tx_queue, tx_pkts, pkts, cmd,                          \
20                         (flags) | NIX_TX_MULTI_SEG_F);                         \
21         }
22
23 NIX_TX_FASTPATH_MODES
24 #undef T