diff options
author | Xinyao Cai <xinyao.cai@intel.com> | 2023-04-12 18:35:23 +0800 |
---|---|---|
committer | Damjan Marion <dmarion@0xa5.net> | 2023-04-25 15:13:22 +0000 |
commit | efad24a84d35458e2c672b94027e54923a42fd25 (patch) | |
tree | e3ebb21f1c3274d81e5d1b9fbcf874f0685a5dbc /src/plugins/dpdk/device/format.c | |
parent | 140ca0fa95b4b8c037dfa83e99fd08620e93c646 (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/format.c')
-rw-r--r-- | src/plugins/dpdk/device/format.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c index ab14231d5f7..d3234d16f00 100644 --- a/src/plugins/dpdk/device/format.c +++ b/src/plugins/dpdk/device/format.c @@ -384,6 +384,16 @@ format_dpdk_rte_device (u8 *s, va_list *args) if (!d) return format (s, "not available"); +#if RTE_VERSION >= RTE_VERSION_NUM(22, 11, 0, 0) + s = + format (s, "name: %s, numa: %d", rte_dev_name (d), rte_dev_numa_node (d)); + + if (rte_dev_driver (d)) + s = format (s, ", driver: %s", rte_driver_name (rte_dev_driver (d))); + + if (rte_dev_bus (d)) + s = format (s, ", bus: %s", rte_bus_name (rte_dev_bus (d))); +#else s = format (s, "name: %s, numa: %d", d->name, d->numa_node); if (d->driver) @@ -391,6 +401,7 @@ format_dpdk_rte_device (u8 *s, va_list *args) if (d->bus) s = format (s, ", bus: %s", d->bus->name); +#endif return s; } @@ -421,9 +432,15 @@ format_dpdk_device (u8 * s, va_list * args) format_white_space, indent + 2, format_dpdk_link_status, xd); s = format (s, "%Uflags: %U\n", format_white_space, indent + 2, format_dpdk_device_flags, xd); +#if RTE_VERSION >= RTE_VERSION_NUM(22, 11, 0, 0) + if (rte_dev_devargs (di.device) && rte_dev_devargs (di.device)->args) + s = format (s, "%UDevargs: %s\n", format_white_space, indent + 2, + rte_dev_devargs (di.device)->args); +#else if (di.device->devargs && di.device->devargs->args) s = format (s, "%UDevargs: %s\n", format_white_space, indent + 2, di.device->devargs->args); +#endif s = format (s, "%Urx: queues %d (max %d), desc %d " "(min %d max %d align %d)\n", |