1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(C) 2022 Marvell. 3 */ 4 5 #include "cn10k_tx_worker.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_hot 14 cn10k_sso_hws_tx_adptr_enq_seg_all_offload(void *port, struct rte_event ev[], uint16_t nb_events) 15 { 16 const uint32_t flags = (NIX_TX_OFFLOAD_L3_L4_CSUM_F | NIX_TX_OFFLOAD_MBUF_NOFF_F | 17 NIX_TX_MULTI_SEG_F | NIX_TX_OFFLOAD_SECURITY_F); 18 uint64_t cmd[8 + CNXK_NIX_TX_MSEG_SG_DWORDS - 2]; 19 20 struct cn10k_sso_hws *ws = port; 21 RTE_SET_USED(nb_events); 22 return cn10k_sso_hws_event_tx(ws, &ev[0], cmd, (const uint64_t *)ws->tx_adptr_data, flags); 23 } 24 25 uint16_t __rte_hot 26 cn10k_sso_hws_tx_adptr_enq_seg_all_offload_tst(void *port, struct rte_event ev[], 27 uint16_t nb_events) 28 { 29 const uint32_t flags = 30 (NIX_TX_OFFLOAD_L3_L4_CSUM_F | NIX_TX_OFFLOAD_OL3_OL4_CSUM_F | 31 NIX_TX_OFFLOAD_VLAN_QINQ_F | NIX_TX_OFFLOAD_MBUF_NOFF_F | NIX_TX_OFFLOAD_TSO_F | 32 NIX_TX_OFFLOAD_TSTAMP_F | NIX_TX_OFFLOAD_SECURITY_F | NIX_TX_MULTI_SEG_F); 33 uint64_t cmd[8 + CNXK_NIX_TX_MSEG_SG_DWORDS - 2]; 34 35 struct cn10k_sso_hws *ws = port; 36 RTE_SET_USED(nb_events); 37 return cn10k_sso_hws_event_tx(ws, &ev[0], cmd, (const uint64_t *)ws->tx_adptr_data, flags); 38 } 39 40 #endif 41