From 5c795f7bd17608d441d4e2c7f862ad9d45685b93 Mon Sep 17 00:00:00 2001 From: Konstantin Ananyev Date: Tue, 6 Feb 2018 22:17:36 +0000 Subject: tldk: make sure it builds/works with latest dpdk (17.11/18.02) Change-Id: I460b88661656b64558b442c7800b4edc20ad4b56 Signed-off-by: Konstantin Ananyev --- test/gtest/test_common.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'test/gtest/test_common.h') diff --git a/test/gtest/test_common.h b/test/gtest/test_common.h index a7fa41a..9c521b8 100644 --- a/test/gtest/test_common.h +++ b/test/gtest/test_common.h @@ -35,6 +35,13 @@ #include #include #include +#include + +#if RTE_VERSION_NUM(17, 11, 0, 0) <= RTE_VERSION +typedef uint16_t dpdk_port_t; +#else +typedef uint8_t dpdk_port_t; +#endif #define RX_RING_SIZE 128 #define TX_RING_SIZE 128 @@ -47,7 +54,7 @@ extern struct rte_mempool *frag_mp; extern char binpath[PATH_MAX]; -int port_init(uint8_t port, struct rte_mempool *mbuf_pool); +int port_init(dpdk_port_t port, struct rte_mempool *mbuf_pool); uint64_t _mbuf_tx_offload(uint64_t il2, uint64_t il3, uint64_t il4, uint64_t tso, @@ -86,7 +93,7 @@ void fill_eth_hdr_len(struct rte_mbuf *m); uint16_t -typen_rx_callback(uint8_t port, __rte_unused uint16_t queue, +typen_rx_callback(dpdk_port_t port, __rte_unused uint16_t queue, struct rte_mbuf *pkt[], uint16_t nb_pkts, __rte_unused uint16_t max_pkts, void *user_param); -- cgit 1.2.3-korg