With DPDK compiled in, when the --dpdk option was given other than as the
first command-line argument, ovs-vswitchd silently ignored it. Without
DPDK compiled in, when the --dpdk option was given anywhere, ovs-vswitchd
silently ignored it. However, in each case any options following --dpdk
were not ignored, and since --dpdk is normally followed by additional
DPDK-specific options, this caused even more confusing trouble.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Daniele Di Proietto <ddiproietto@vmware.com>
Tested-by: Daniele Di Proietto <ddiproietto@vmware.com>
#else
+#include "util.h"
+
static inline int
-dpdk_init(int arg1 OVS_UNUSED, char **arg2 OVS_UNUSED)
+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;
}
exit(EXIT_FAILURE);
case OPT_DPDK:
+ ovs_fatal(0, "--dpdk must be given at beginning of command line.");
break;
default: