Branch data Line data Source code
1 : : /* SPDX-License-Identifier: BSD-3-Clause 2 : : * Copyright(C) 2021 Marvell. 3 : : */ 4 : : 5 : : #ifndef _OTX_EP_RXTX_H_ 6 : : #define _OTX_EP_RXTX_H_ 7 : : 8 : : #include <rte_byteorder.h> 9 : : 10 : : #define OTX_EP_RXD_ALIGN 8 11 : : #define OTX_EP_TXD_ALIGN 8 12 : : 13 : : #define OTX_EP_IQ_SEND_FAILED (-1) 14 : : #define OTX_EP_IQ_SEND_SUCCESS (0) 15 : : 16 : : #define OTX_EP_MAX_DELAYED_PKT_RETRIES 10 17 : : 18 : : #define OTX_EP_FSZ 28 19 : : #define OTX2_EP_FSZ 24 20 : : #define OTX_EP_MAX_INSTR 128 21 : : 22 : : /* SDP_LENGTH_S specifies packet length and is of 8-byte size */ 23 : : #define OTX_EP_INFO_SIZE 8 24 : : #define DROQ_REFILL_THRESHOLD 16 25 : : #define OTX2_SDP_REQUEST_ISM (0x1ULL << 63) 26 : : 27 : : static inline uint32_t 28 : : otx_ep_incr_index(uint32_t index, uint32_t count, uint32_t max) 29 : : { 30 [ # # # # ]: 0 : return ((index + count) & (max - 1)); 31 : : } 32 : : 33 : : uint16_t 34 : : otx_ep_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, uint16_t nb_pkts); 35 : : 36 : : uint16_t 37 : : otx2_ep_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, uint16_t nb_pkts); 38 : : 39 : : uint16_t 40 : : otx_ep_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t budget); 41 : : 42 : : uint16_t 43 : : cnxk_ep_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, uint16_t nb_pkts); 44 : : 45 : : uint16_t 46 : : cnxk_ep_xmit_pkts_mseg(void *tx_queue, struct rte_mbuf **pkts, uint16_t nb_pkts); 47 : : 48 : : uint16_t 49 : : cnxk_ep_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t budget); 50 : : 51 : : uint16_t 52 : : cnxk_ep_recv_pkts_mseg(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t budget); 53 : : 54 : : uint16_t 55 : : cn9k_ep_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t budget); 56 : : 57 : : uint16_t 58 : : cn9k_ep_recv_pkts_mseg(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t budget); 59 : : #endif /* _OTX_EP_RXTX_H_ */