2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00
Files
openvswitch/lib/netdev-nodpdk.c
Aaron Conole bab6940971 netdev-dpdk: Convert initialization from cmdline to db
Existing DPDK integration is provided by use of command line options which
must be split out and passed to librte in a special manner. However, this
forces any configuration to be passed by way of a special DPDK flag, and
interferes with ovs+dpdk packaging solutions.

This commit delays dpdk initialization until after the OVS database
connection is established, at which point ovs initializes librte. It
pulls all of the config data from the OVS database, and assembles a
new argv/argc pair to be passed along.

Signed-off-by: Aaron Conole <aconole@redhat.com>
Acked-by: Kevin Traynor <kevin.traynor@intel.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
2016-04-29 15:07:39 -07:00

21 lines
507 B
C

#include <config.h>
#include "netdev-dpdk.h"
#include "smap.h"
#include "ovs-thread.h"
#include "openvswitch/vlog.h"
VLOG_DEFINE_THIS_MODULE(dpdk);
void
dpdk_init(const struct smap *ovs_other_config)
{
static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER;
if (ovsthread_once_start(&once)) {
if (smap_get_bool(ovs_other_config, "dpdk-init", false)) {
VLOG_ERR("DPDK not supported in this copy of Open vSwitch.");
}
ovsthread_once_done(&once);
}
}