dpdk: reject --user option
authorAndy Zhou <azhou@nicira.com>
Mon, 21 Sep 2015 22:06:00 +0000 (15:06 -0700)
committerAndy Zhou <azhou@nicira.com>
Thu, 1 Oct 2015 03:43:52 +0000 (20:43 -0700)
dpdk datapath needs to run as root. Block the --user
option for now. It is likely we will revisit this issue for possibly
supporting --user option for dpdk datapath process as well.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/netdev-dpdk.c

index b72a33b..93b0589 100644 (file)
@@ -2142,6 +2142,14 @@ dpdk_init(int argc, char **argv)
     argc--;
     argv++;
 
+    /* Reject --user option */
+    int i;
+    for (i = 0; i < argc; i++) {
+        if (!strcmp(argv[i], "--user")) {
+            VLOG_ERR("Can not mix --dpdk and --user options, aborting.");
+        }
+    }
+
 #ifdef VHOST_CUSE
     if (process_vhost_flags("-cuse_dev_name", strdup("vhost-net"),
                             PATH_MAX, argv, &cuse_dev_name)) {