#include <rte_ethdev.h>
#include <rte_mbuf.h>
#include <rte_mempool.h>
#include <rte_errno.h>
uint16_t dpdk_shim_rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
struct rte_mbuf **rx_pkts,
const uint16_t nb_pkts) {
return rte_eth_rx_burst(port_id, queue_id, rx_pkts, nb_pkts);
}
uint16_t dpdk_shim_rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
struct rte_mbuf **tx_pkts,
const uint16_t nb_pkts) {
return rte_eth_tx_burst(port_id, queue_id, tx_pkts, nb_pkts);
}
struct rte_mbuf *dpdk_shim_rte_pktmbuf_alloc(struct rte_mempool *mp) {
return rte_pktmbuf_alloc(mp);
}
int dpdk_shim_rte_pktmbuf_alloc_bulk(struct rte_mempool *pool,
struct rte_mbuf **mbufs,
unsigned int count) {
return rte_pktmbuf_alloc_bulk(pool, mbufs, count);
}
void dpdk_shim_rte_pktmbuf_free(struct rte_mbuf *m) {
rte_pktmbuf_free(m);
}
int dpdk_shim_rte_mempool_full(const struct rte_mempool *mp) {
return rte_mempool_full(mp);
}
int dpdk_shim_rte_mempool_empty(const struct rte_mempool *mp) {
return rte_mempool_empty(mp);
}
void dpdk_shim_set_mbuf_tx_offload(struct rte_mbuf *m, uint64_t val) {
m->tx_offload = val;
}
uint64_t dpdk_shim_get_mbuf_tx_offload(const struct rte_mbuf *m) {
return m->tx_offload;
}
int dpdk_shim_rte_errno(void) {
return rte_errno;
}