diff options
Diffstat (limited to 'vnet/vnet/devices/dpdk/init.c')
-rw-r--r-- | vnet/vnet/devices/dpdk/init.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) { |