summaryrefslogtreecommitdiff
path: root/vswitchd/ovs-vswitchd.c
diff options
context:
space:
mode:
authorPravin <pshelar@nicira.com>2014-03-24 19:23:08 -0700
committerPravin B Shelar <pshelar@nicira.com>2014-03-21 11:48:28 -0700
commit8a9562d21a40c765a8ae6775a070cb279cb2147a (patch)
tree2feff480e85506faf72bb0be0e9ac9ea57caa89c /vswitchd/ovs-vswitchd.c
parent275eebb92d46e8647861f0b25d9b0fb300379d2d (diff)
downloadopenvswitch-8a9562d21a40c765a8ae6775a070cb279cb2147a.tar.gz
dpif-netdev: Add DPDK netdev.
Following patch adds DPDK netdev-class to userspace datapath. Now OVS can use DPDK port for IO by just configuring DPDK port and then adding dpdk type port to userspace datapath. Refer to INSTALL.DPDK doc for further info. This is based a patch from Gerald Rogers. Signed-off-by: Gerald Rogers <gerald.rogers@intel.com> Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Thomas Graf <tgraf@redhat.com>
Diffstat (limited to 'vswitchd/ovs-vswitchd.c')
-rw-r--r--vswitchd/ovs-vswitchd.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c
index 900d3e2c6..2f3086d90 100644
--- a/vswitchd/ovs-vswitchd.c
+++ b/vswitchd/ovs-vswitchd.c
@@ -48,6 +48,7 @@
#include "vconn.h"
#include "vlog.h"
#include "lib/vswitch-idl.h"
+#include "lib/netdev-dpdk.h"
VLOG_DEFINE_THIS_MODULE(vswitchd);
@@ -69,8 +70,12 @@ main(int argc, char *argv[])
bool exiting;
int retval;
- proctitle_init(argc, argv);
set_program_name(argv[0]);
+ retval = dpdk_init(argc,argv);
+ argc -= retval;
+ argv += retval;
+
+ proctitle_init(argc, argv);
service_start(&argc, &argv);
remote = parse_options(argc, argv, &unixctl_path);
fatal_ignore_sigpipe();
@@ -143,7 +148,8 @@ parse_options(int argc, char *argv[], char **unixctl_pathp)
OPT_ENABLE_DUMMY,
OPT_DISABLE_SYSTEM,
OPT_ENABLE_OF14,
- DAEMON_OPTION_ENUMS
+ DAEMON_OPTION_ENUMS,
+ OPT_DPDK,
};
static const struct option long_options[] = {
{"help", no_argument, NULL, 'h'},
@@ -158,6 +164,7 @@ parse_options(int argc, char *argv[], char **unixctl_pathp)
{"enable-dummy", optional_argument, NULL, OPT_ENABLE_DUMMY},
{"disable-system", no_argument, NULL, OPT_DISABLE_SYSTEM},
{"enable-of14", no_argument, NULL, OPT_ENABLE_OF14},
+ {"dpdk", required_argument, NULL, OPT_DPDK},
{NULL, 0, NULL, 0},
};
char *short_options = long_options_to_short_options(long_options);
@@ -213,6 +220,9 @@ parse_options(int argc, char *argv[], char **unixctl_pathp)
case '?':
exit(EXIT_FAILURE);
+ case OPT_DPDK:
+ break;
+
default:
abort();
}