-/* Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira Networks
+/* Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
static void usage(void) NO_RETURN;
int
main(int argc, char *argv[])
{
static void usage(void) NO_RETURN;
int
main(int argc, char *argv[])
{
- stress_init_command();
- remote = parse_options(argc, argv);
- signal(SIGPIPE, SIG_IGN);
- sighup = signal_register(SIGHUP);
- process_init();
+ 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();
- retval = unixctl_server_create(NULL, &unixctl);
+ if (want_mlockall) {
+#ifdef HAVE_MLOCKALL
+ if (mlockall(MCL_CURRENT | MCL_FUTURE)) {
+ VLOG_ERR("mlockall failed: %s", ovs_strerror(errno));
+ }
+#else
+ VLOG_ERR("mlockall not supported on this system");
+#endif
+ }
+
+ retval = unixctl_server_create(unixctl_path, &unixctl);
{"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'V'},
{"mlockall", no_argument, NULL, OPT_MLOCKALL},
{"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'V'},
{"mlockall", no_argument, NULL, OPT_MLOCKALL},
STREAM_SSL_LONG_OPTIONS,
{"peer-ca-cert", required_argument, NULL, OPT_PEER_CA_CERT},
{"bootstrap-ca-cert", required_argument, NULL, OPT_BOOTSTRAP_CA_CERT},
{"enable-dummy", optional_argument, NULL, OPT_ENABLE_DUMMY},
{"disable-system", no_argument, NULL, OPT_DISABLE_SYSTEM},
STREAM_SSL_LONG_OPTIONS,
{"peer-ca-cert", required_argument, NULL, OPT_PEER_CA_CERT},
{"bootstrap-ca-cert", required_argument, NULL, OPT_BOOTSTRAP_CA_CERT},
{"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},
-#ifdef HAVE_MLOCKALL
- if (mlockall(MCL_CURRENT | MCL_FUTURE)) {
- VLOG_ERR("mlockall failed: %s", strerror(errno));
- }
-#else
- VLOG_ERR("mlockall not supported on this system");
-#endif
+ want_mlockall = true;
+ break;
+
+ case OPT_UNIXCTL:
+ *unixctl_pathp = optarg;
" -h, --help display this help message\n"
" -V, --version display version information\n");
" -h, --help display this help message\n"
" -V, --version display version information\n");