aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorVitaliy Ivanov <vitaliyi@interfacemasters.com>2020-01-13 16:10:09 +0200
committerVitaliy Ivanov <vitaliyi@interfacemasters.com>2020-01-13 16:10:09 +0200
commitcbabbd58652432e5bc3716844d51812ecc577c96 (patch)
tree4daacd2756833801642b0fd144df1467761de14b /example
parentda5208ee68c1281095e62abb820780fbe7b29bdc (diff)
example: fix compilation of ndpireader on latest dpdk.
reader_util.c:1708:43: error: 'ETHER_MAX_LEN' undeclared here (not in a function) .rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN } ^~~~~~~~~~~~~ DPDK before 19.08 had a macro ETHER_MAX_LEN, in later versions it was changed to RTE_ETHER_MAX_LEN. Signed-off-by: Vitaliy Ivanov <vitaliyi@interfacemasters.com>
Diffstat (limited to 'example')
-rw-r--r--example/reader_util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index f8dd315d0..1376f9b8d 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -1792,8 +1792,15 @@ u_int32_t ethernet_crc32(const void* data, size_t n_bytes) {
#ifdef USE_DPDK
+#include <rte_version.h>
+#include <rte_ether.h>
+
static const struct rte_eth_conf port_conf_default = {
+#if (RTE_VERSION < RTE_VERSION_NUM(19, 8, 0, 0))
.rxmode = { .max_rx_pkt_len = ETHER_MAX_LEN }
+#else
+ .rxmode = { .max_rx_pkt_len = RTE_ETHER_MAX_LEN }
+#endif
};
/* ************************************ */