423c8a2905
This patch renames octeon end point driver from octeontx_ep to octeon_ep to enable single unified driver to support current OcteonTx and future Octeon PCI endpoint NICs to reflect common driver for all Octeon based PCI endpoint NICs. Signed-off-by: Sathesh Edara <sedara@marvell.com> Acked-by: Veerasenareddy Burru <vburru@marvell.com>
47 lines
1005 B
C
47 lines
1005 B
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright(C) 2021 Marvell.
|
|
*/
|
|
|
|
#ifndef _OTX_EP_RXTX_H_
|
|
#define _OTX_EP_RXTX_H_
|
|
|
|
#include <rte_byteorder.h>
|
|
|
|
#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);
|
|
#endif /* _OTX_EP_RXTX_H_ */
|