aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-10-25 14:54:38 +0200
committerChris Luke <chris_luke@comcast.com>2016-10-26 20:14:17 +0000
commit39162275f65da6b9ce986099aa8fdc513efda9da (patch)
tree04a1ce9613424f7598526e7147f1629c18e148e9 /vnet
parentdddcceadf14488bf1d8c97387bd51176abd9b4be (diff)
dpdk: enable building with dpdk 16.11-rc1
Works with: http://dpdk.org/browse/dpdk/snapshot/dpdk-16.11-rc1.tar.xz placed into dpdk/ or ~/Downloads Change-Id: I17f6a721529dbefc796f555e2525d157b9bf8740 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/devices/dpdk/dpdk.h20
-rw-r--r--vnet/vnet/devices/dpdk/init.c8
2 files changed, 28 insertions, 0 deletions
diff --git a/vnet/vnet/devices/dpdk/dpdk.h b/vnet/vnet/devices/dpdk/dpdk.h
index c2ea579a6fe..e34d4b97bdd 100644
--- a/vnet/vnet/devices/dpdk/dpdk.h
+++ b/vnet/vnet/devices/dpdk/dpdk.h
@@ -65,6 +65,25 @@ extern vnet_device_class_t dpdk_device_class;
extern vlib_node_registration_t dpdk_input_node;
extern vlib_node_registration_t handoff_dispatch_node;
+#if RTE_VERSION >= RTE_VERSION_NUM(16, 11, 0, 0)
+#define foreach_dpdk_pmd \
+ _ ("net_thunderx", THUNDERX) \
+ _ ("net_e1000_em", E1000EM) \
+ _ ("net_e1000_igb", IGB) \
+ _ ("net_e1000_igb_vf", IGBVF) \
+ _ ("net_ixgbe", IXGBE) \
+ _ ("net_ixgbe_vf", IXGBEVF) \
+ _ ("net_i40e", I40E) \
+ _ ("net_i40e_vf", I40EVF) \
+ _ ("net_virtio", VIRTIO) \
+ _ ("net_enic", ENIC) \
+ _ ("net_vmxnet3", VMXNET3) \
+ _ ("net_af_packet", AF_PACKET) \
+ _ ("net_bonding", BOND) \
+ _ ("net_fm10k", FM10K) \
+ _ ("net_cxgbe", CXGBE) \
+ _ ("net_dpaa2", DPAA2)
+#else
#define foreach_dpdk_pmd \
_ ("rte_nicvf_pmd", THUNDERX) \
_ ("rte_em_pmd", E1000EM) \
@@ -82,6 +101,7 @@ extern vlib_node_registration_t handoff_dispatch_node;
_ ("rte_pmd_fm10k", FM10K) \
_ ("rte_cxgbe_pmd", CXGBE) \
_ ("rte_dpaa2_dpni", DPAA2)
+#endif
typedef enum
{
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c
index 7045e454048..c57fcde3543 100644
--- a/vnet/vnet/devices/dpdk/init.c
+++ b/vnet/vnet/devices/dpdk/init.c
@@ -431,7 +431,11 @@ dpdk_lib_init (dpdk_main_t * dm)
/* workaround for drivers not setting driver_name */
if ((!dev_info.driver_name) && (dev_info.pci_dev))
+#if RTE_VERSION < RTE_VERSION_NUM(16, 11, 0, 0)
dev_info.driver_name = dev_info.pci_dev->driver->name;
+#else
+ dev_info.driver_name = dev_info.pci_dev->driver->driver.name;
+#endif
ASSERT (dev_info.driver_name);
if (!xd->pmd)
@@ -1554,7 +1558,11 @@ dpdk_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f)
struct rte_eth_dev_info dev_info;
rte_eth_dev_info_get (i, &dev_info);
if (!dev_info.driver_name)
+#if RTE_VERSION < RTE_VERSION_NUM(16, 11, 0, 0)
dev_info.driver_name = dev_info.pci_dev->driver->name;
+#else
+ dev_info.driver_name = dev_info.pci_dev->driver->driver.name;
+#endif
ASSERT (dev_info.driver_name);
if (strncmp (dev_info.driver_name, "rte_bond_pmd", 12) == 0)
{