summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/common.c
diff options
context:
space:
mode:
authorXinyao Cai <xinyao.cai@intel.com>2023-04-12 18:35:23 +0800
committerDamjan Marion <dmarion@0xa5.net>2023-04-25 15:13:22 +0000
commitefad24a84d35458e2c672b94027e54923a42fd25 (patch)
treee3ebb21f1c3274d81e5d1b9fbcf874f0685a5dbc /src/plugins/dpdk/device/common.c
parent140ca0fa95b4b8c037dfa83e99fd08620e93c646 (diff)
dpdk: code preparation for bumping to DPDK 22.11
This patch prepares code for bumping DPDK version to 22.11, but the DPDK version of this patch keeps at 22.07 for compatibility. the "no-dsa" parameter in DPDK configuration is removed, the "blacklist" parameter can be used to block the related DSA devices. Type: feature Signed-off-by: Xinyao Cai <xinyao.cai@intel.com> Change-Id: I08787c6584bba66383fc0a784963f33171196910
Diffstat (limited to 'src/plugins/dpdk/device/common.c')
-rw-r--r--src/plugins/dpdk/device/common.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/dpdk/device/common.c b/src/plugins/dpdk/device/common.c
index b8c6eddd34b..e4a79e88286 100644
--- a/src/plugins/dpdk/device/common.c
+++ b/src/plugins/dpdk/device/common.c
@@ -134,11 +134,6 @@ dpdk_device_setup (dpdk_device_t * xd)
dpdk_log_debug ("[%u] Configured TX offloads: %U", xd->port_id,
format_dpdk_tx_offload_caps, txo);
- /* Enable flow director when flows exist */
- if (xd->supported_flow_actions &&
- (xd->flags & DPDK_DEVICE_FLAG_RX_FLOW_OFFLOAD) != 0)
- conf.fdir_conf.mode = RTE_FDIR_MODE_PERFECT;
-
/* finalize configuration */
conf.rxmode.offloads = rxo;
conf.txmode.offloads = txo;
@@ -487,7 +482,11 @@ dpdk_get_pci_device (const struct rte_eth_dev_info *info)
const struct rte_bus *bus;
bus = rte_bus_find_by_device (info->device);
+#if RTE_VERSION >= RTE_VERSION_NUM(22, 11, 0, 0)
+ if (bus && !strcmp (rte_bus_name (bus), "pci"))
+#else
if (bus && !strcmp (bus->name, "pci"))
+#endif
return RTE_DEV_TO_PCI (info->device);
else
return NULL;
@@ -500,7 +499,11 @@ dpdk_get_vmbus_device (const struct rte_eth_dev_info *info)
const struct rte_bus *bus;
bus = rte_bus_find_by_device (info->device);
+#if RTE_VERSION >= RTE_VERSION_NUM(22, 11, 0, 0)
+ if (bus && !strcmp (rte_bus_name (bus), "vmbus"))
+#else
if (bus && !strcmp (bus->name, "vmbus"))
+#endif
return container_of (info->device, struct rte_vmbus_device, device);
else
return NULL;