aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vnet/devices/dpdk/cli.c20
-rw-r--r--src/vpp/app/version.c10
-rw-r--r--src/vpp/oam/oam.c4
3 files changed, 20 insertions, 14 deletions
diff --git a/src/vnet/devices/dpdk/cli.c b/src/vnet/devices/dpdk/cli.c
index 22bd4b4f..3bbace26 100644
--- a/src/vnet/devices/dpdk/cli.c
+++ b/src/vnet/devices/dpdk/cli.c
@@ -1279,6 +1279,26 @@ VLIB_CLI_COMMAND (cmd_show_dpdk_hqos_queue_stats, static) = {
};
/* *INDENT-ON* */
+static clib_error_t *
+show_dpdk_version_command_fn (vlib_main_t * vm,
+ unformat_input_t * input,
+ vlib_cli_command_t * cmd)
+{
+#define _(a,b,c) vlib_cli_output (vm, "%-25s " b, a ":", c);
+ _("DPDK Version", "%s", rte_version ());
+ _("DPDK EAL init args", "%s", dpdk_config_main.eal_init_args_str);
+#undef _
+ return 0;
+}
+
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (show_vpe_version_command, static) = {
+ .path = "show dpdk version",
+ .short_help = "show dpdk version information",
+ .function = show_dpdk_version_command_fn,
+};
+/* *INDENT-ON* */
+
clib_error_t *
dpdk_cli_init (vlib_main_t * vm)
{
diff --git a/src/vpp/app/version.c b/src/vpp/app/version.c
index 60844c98..0a2c7fd4 100644
--- a/src/vpp/app/version.c
+++ b/src/vpp/app/version.c
@@ -16,12 +16,6 @@
#include <vppinfra/cpu.h>
#include <vpp/app/version.h>
-#if DPDK > 0
-#include <rte_version.h>
-#include <vnet/vnet.h>
-#include <vnet/devices/dpdk/dpdk.h>
-#endif /* DPDK */
-
static char *vpe_version_string =
"vpp v" VPP_BUILD_VER
" built by " VPP_BUILD_USER " on " VPP_BUILD_HOST " at " VPP_BUILD_DATE;
@@ -56,10 +50,6 @@ show_vpe_version_command_fn (vlib_main_t * vm,
_("Compile location", "%s", VPP_BUILD_TOPDIR);
_("Compiler", "%s", vpe_compiler);
_("Current PID", "%d", getpid ());
-#if DPDK > 0
- _("DPDK Version", "%s", rte_version ());
- _("DPDK EAL init args", "%s", dpdk_config_main.eal_init_args_str);
-#endif
#undef _
}
else
diff --git a/src/vpp/oam/oam.c b/src/vpp/oam/oam.c
index 07e17b64..ef061207 100644
--- a/src/vpp/oam/oam.c
+++ b/src/vpp/oam/oam.c
@@ -14,10 +14,6 @@
*/
#include <vpp/oam/oam.h>
-#if DPDK > 0
-#include <vnet/devices/dpdk/dpdk.h>
-#endif
-
oam_main_t oam_main;
static vlib_node_registration_t oam_node;