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>
This commit is contained in:
Damjan Marion
2016-10-25 14:54:38 +02:00
committed by Chris Luke
parent dddcceadf1
commit 39162275f6
3 changed files with 29 additions and 0 deletions

View File

@ -30,6 +30,7 @@ DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.xz
DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL)
DPDK_16.04_TARBALL_MD5_CKSUM := d1f82e7d7589b3b2f623c155442b8306
DPDK_16.07_TARBALL_MD5_CKSUM := 690a2bb570103e58d12f9806e8bf21be
DPDK_16.11-rc1_TARBALL_MD5_CKSUM := 69a13a554160622a0fdb87f52539073f
DPDK_SOURCE := $(B)/dpdk-$(DPDK_VERSION)
ifneq (,$(findstring clang,$(CC)))

View File

@ -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
{

View File

@ -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)
{