diff options
Diffstat (limited to 'src/plugins/dpdk/device')
-rw-r--r-- | src/plugins/dpdk/device/format.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/format.c b/src/plugins/dpdk/device/format.c index 546f6cf56aa..5338ee95057 100644 --- a/src/plugins/dpdk/device/format.c +++ b/src/plugins/dpdk/device/format.c @@ -18,6 +18,9 @@ #include <vlib/unix/cj.h> #include <assert.h> +#define __USE_GNU +#include <dlfcn.h> + #include <vnet/ethernet/ethernet.h> #include <dpdk/device/dpdk.h> @@ -478,6 +481,17 @@ format_dpdk_device_errors (u8 * s, va_list * args) return s; } +static const char * +ptr2sname (void *p) +{ + Dl_info info = { 0 }; + + if (dladdr (p, &info) == 0) + return 0; + + return info.dli_sname; +} + u8 * format_dpdk_device (u8 * s, va_list * args) { @@ -557,6 +571,12 @@ format_dpdk_device (u8 * s, va_list * args) format_dpdk_rss_hf_name, rss_conf.rss_hf, format_white_space, indent + 2, format_dpdk_rss_hf_name, di.flow_type_rss_offloads); + s = format (s, "%Utx burst function: %s\n", + format_white_space, indent + 2, + ptr2sname (rte_eth_devices[xd->port_id].tx_pkt_burst)); + s = format (s, "%Urx burst function: %s\n", + format_white_space, indent + 2, + ptr2sname (rte_eth_devices[xd->port_id].rx_pkt_burst)); } s = format (s, "%Urx queues %d, rx desc %d, tx queues %d, tx desc %d\n", |