aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-06-26 16:54:36 +0200
committerDamjan Marion <dmarion@me.com>2018-06-26 21:05:52 +0000
commit23cdd4c3d750305108c6f55482fe63b8c1712a01 (patch)
tree86c8cc098909384592dda35c9f45160a5ab4ace4 /src/plugins/dpdk/device
parent536953d529ea4449fb38efc3fa2a3503551b2e6d (diff)
dpdk: display rx/tx burst function name in "show hardware detail"
Change-Id: I6fa4c6bf9c4e96ba4502a06907bdecc654ace665 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device')
-rw-r--r--src/plugins/dpdk/device/format.c20
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",