X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Focteontx_ep%2Fotx_ep_rxtx.h;h=1527d350b5ce05e383c7254f8eaf8da3e475d968;hb=6065f4cdc31ba83e41688691b61f025c03edb1c6;hp=d8b411459ec5d38993ae2ac05a0c6668afd739ab;hpb=9fb8d63e7c1a4f556c3f7fe9ccdedf661e71f851;p=dpdk.git diff --git a/drivers/net/octeontx_ep/otx_ep_rxtx.h b/drivers/net/octeontx_ep/otx_ep_rxtx.h index d8b411459e..1527d350b5 100644 --- a/drivers/net/octeontx_ep/otx_ep_rxtx.h +++ b/drivers/net/octeontx_ep/otx_ep_rxtx.h @@ -5,15 +5,41 @@ #ifndef _OTX_EP_RXTX_H_ #define _OTX_EP_RXTX_H_ +#include + #define OTX_EP_RXD_ALIGN 1 #define OTX_EP_TXD_ALIGN 1 + +#define OTX_EP_IQ_SEND_FAILED (-1) +#define OTX_EP_IQ_SEND_SUCCESS (0) + #define OTX_EP_MAX_DELAYED_PKT_RETRIES 10000 + +#define OTX_EP_FSZ 28 +#define OTX2_EP_FSZ 24 +#define OTX_EP_MAX_INSTR 16 + +static inline void +otx_ep_swap_8B_data(uint64_t *data, uint32_t blocks) +{ + /* Swap 8B blocks */ + while (blocks) { + *data = rte_bswap64(*data); + blocks--; + data++; + } +} + static inline uint32_t otx_ep_incr_index(uint32_t index, uint32_t count, uint32_t max) { return ((index + count) & (max - 1)); } uint16_t +otx_ep_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, uint16_t nb_pkts); +uint16_t +otx2_ep_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, uint16_t nb_pkts); +uint16_t otx_ep_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t budget);