mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
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>
This commit is contained in:
committed by
Daniele Di Proietto
parent
563c98d86e
commit
bab6940971
@@ -4,6 +4,7 @@
|
||||
#include <config.h>
|
||||
|
||||
struct dp_packet;
|
||||
struct smap;
|
||||
|
||||
#ifdef DPDK_NETDEV
|
||||
|
||||
@@ -22,7 +23,6 @@ struct dp_packet;
|
||||
|
||||
#define NON_PMD_CORE_ID LCORE_ID_ANY
|
||||
|
||||
int dpdk_init(int argc, char **argv);
|
||||
void netdev_dpdk_register(void);
|
||||
void free_dpdk_buf(struct dp_packet *);
|
||||
int pmd_thread_setaffinity_cpu(unsigned cpu);
|
||||
@@ -33,15 +33,6 @@ int pmd_thread_setaffinity_cpu(unsigned cpu);
|
||||
|
||||
#include "util.h"
|
||||
|
||||
static inline int
|
||||
dpdk_init(int argc, char **argv)
|
||||
{
|
||||
if (argc >= 2 && !strcmp(argv[1], "--dpdk")) {
|
||||
ovs_fatal(0, "DPDK support not built into this copy of Open vSwitch.");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
netdev_dpdk_register(void)
|
||||
{
|
||||
@@ -61,4 +52,7 @@ pmd_thread_setaffinity_cpu(unsigned cpu OVS_UNUSED)
|
||||
}
|
||||
|
||||
#endif /* DPDK_NETDEV */
|
||||
|
||||
void dpdk_init(const struct smap *ovs_other_config);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user