1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(C) 2024 Marvell. 3 */ 4 5 #include "cn20k_tx.h" 6 7 #ifdef _ROC_API_H_ 8 #error "roc_api.h is included" 9 #endif 10 11 #if defined(CNXK_DIS_TMPLT_FUNC) 12 13 uint16_t __rte_noinline __rte_hot 14 cn20k_nix_xmit_pkts_all_offload(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t pkts) 15 { 16 uint64_t cmd[8 + CNXK_NIX_TX_MSEG_SG_DWORDS - 2]; 17 18 return cn20k_nix_xmit_pkts_mseg(tx_queue, NULL, tx_pkts, pkts, cmd, 19 NIX_TX_OFFLOAD_L3_L4_CSUM_F | NIX_TX_OFFLOAD_OL3_OL4_CSUM_F | 20 NIX_TX_OFFLOAD_VLAN_QINQ_F | NIX_TX_OFFLOAD_MBUF_NOFF_F | 21 NIX_TX_OFFLOAD_TSO_F | NIX_TX_OFFLOAD_TSTAMP_F | 22 NIX_TX_OFFLOAD_SECURITY_F | NIX_TX_MULTI_SEG_F); 23 } 24 25 uint16_t __rte_noinline __rte_hot 26 cn20k_nix_xmit_pkts_vec_all_offload(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t pkts) 27 { 28 uint64_t cmd[8 + CNXK_NIX_TX_MSEG_SG_DWORDS - 2]; 29 30 return cn20k_nix_xmit_pkts_vector(tx_queue, NULL, tx_pkts, pkts, cmd, 31 NIX_TX_OFFLOAD_L3_L4_CSUM_F | NIX_TX_OFFLOAD_OL3_OL4_CSUM_F | 32 NIX_TX_OFFLOAD_VLAN_QINQ_F | NIX_TX_OFFLOAD_MBUF_NOFF_F | 33 NIX_TX_OFFLOAD_TSO_F | NIX_TX_OFFLOAD_TSTAMP_F | 34 NIX_TX_OFFLOAD_SECURITY_F | NIX_TX_MULTI_SEG_F); 35 } 36 37 #endif 38