Show DPDK version if Open vSwitch is compiled with DPDK support.
Version can be retrieved with `ovs-vswitchd --version` or from OVS logs.
Small change in ovs-ctl to avoid breakage on output change.
Signed-off-by: Matteo Croce <mcroce@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
{
return false;
}
+
+void
+print_dpdk_version(void)
+{
+}
#include <rte_log.h>
#include <rte_memzone.h>
+#include <rte_version.h>
#ifdef DPDK_PDUMP
#include <rte_mempool.h>
#include <rte_pdump.h>
static struct ovsthread_once once_enable = OVSTHREAD_ONCE_INITIALIZER;
if (ovsthread_once_start(&once_enable)) {
+ VLOG_INFO("Using %s", rte_version());
VLOG_INFO("DPDK Enabled - initializing...");
dpdk_init__(ovs_other_config);
enabled = true;
ovs_assert(cpu != NON_PMD_CORE_ID);
RTE_PER_LCORE(_lcore_id) = cpu;
}
+
+void
+print_dpdk_version(void)
+{
+ puts(rte_version());
+}
void dpdk_set_lcore_id(unsigned cpu);
const char *dpdk_get_vhost_sock_dir(void);
bool dpdk_vhost_iommu_enabled(void);
+void print_dpdk_version(void);
#endif /* dpdk.h */
set_system_ids () {
set ovs_vsctl set Open_vSwitch .
- OVS_VERSION=`ovs-vswitchd --version | sed 's/.*) //;1q'`
+ OVS_VERSION=`ovs-vswitchd --version | awk '/Open vSwitch/{print $NF}'`
set "$@" ovs-version="$OVS_VERSION"
case $SYSTEM_ID in
case 'V':
ovs_print_version(0, 0);
+ print_dpdk_version();
exit(EXIT_SUCCESS);
case OPT_MLOCKALL: