summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2020-07-10 16:27:06 +0200
committerXavier Simonart <xavier.simonart@intel.com>2020-07-10 16:27:06 +0200
commit97613a586bab71aac4392658cf72552e9b4264b9 (patch)
tree52f29562d0d5910dd801e6b75464b645b5df9d46
parente37df4aac0c175b0ee30cbbf4325cb3e8774204b (diff)
Fixed compilation issue on dpdk 19.08 (and more recent)
Change-Id: Iae0a0d95b5a216463ec7511337be4019fdd4359f Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/port_info/port_info.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/port_info/port_info.c b/VNFs/DPPD-PROX/helper-scripts/rapid/port_info/port_info.c
index 6f270136..79bd0c0b 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/port_info/port_info.c
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/port_info/port_info.c
@@ -18,6 +18,7 @@
#include <inttypes.h>
#include <rte_eal.h>
#include <rte_ethdev.h>
+#include <rte_version.h>
static const uint16_t rx_rings = 1, tx_rings = 1;
static const struct rte_eth_conf port_conf = { .link_speeds = ETH_LINK_SPEED_AUTONEG };
@@ -33,7 +34,11 @@ port_info(void)
if (ret_val != 0)
return ret_val;
+#if RTE_VERSION < RTE_VERSION_NUM(19,8,0,0)
struct ether_addr addr;
+#else
+ struct rte_ether_addr addr;
+#endif
rte_eth_macaddr_get(port_id, &addr);
printf("Port %u MAC: %02" PRIx8 ":%02" PRIx8 ":%02" PRIx8
":%02" PRIx8 ":%02" PRIx8 ":%02" PRIx8 "\n",