Fixed compilation issue on dpdk 19.08 (and more recent) 24/70524/1
authorXavier Simonart <xavier.simonart@intel.com>
Fri, 10 Jul 2020 14:27:06 +0000 (16:27 +0200)
committerXavier Simonart <xavier.simonart@intel.com>
Fri, 10 Jul 2020 14:27:06 +0000 (16:27 +0200)
Change-Id: Iae0a0d95b5a216463ec7511337be4019fdd4359f
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
VNFs/DPPD-PROX/helper-scripts/rapid/port_info/port_info.c

index 6f27013..79bd0c0 100644 (file)
@@ -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",