aboutsummaryrefslogtreecommitdiffstats
path: root/test/gtest/test_common.h
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2018-02-06 22:17:36 +0000
committerKonstantin Ananyev <konstantin.ananyev@intel.com>2018-02-07 17:43:40 +0000
commit5c795f7bd17608d441d4e2c7f862ad9d45685b93 (patch)
tree96947264d77354b9cb880f86333d961d414ce689 /test/gtest/test_common.h
parent3726dc50dd2a9873ac05847be80ca615ea4a708b (diff)
tldk: make sure it builds/works with latest dpdk (17.11/18.02)
Change-Id: I460b88661656b64558b442c7800b4edc20ad4b56 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Diffstat (limited to 'test/gtest/test_common.h')
-rw-r--r--test/gtest/test_common.h11
1 files changed, 9 insertions, 2 deletions
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 <rte_ip.h>
#include <rte_ip_frag.h>
#include <rte_udp.h>
+#include <rte_version.h>
+
+#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);