[ovs-dev] [PATCH 3/8] dpdk: reject --user option
Andy Zhou
azhou at nicira.com
Wed Sep 23 00:51:12 UTC 2015
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 at nicira.com>
---
lib/netdev-dpdk.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index e7eb526..fc62c0e 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Nicira, Inc.
+ * Copyright (c) 2014, 2015 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -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 specify both --dpdk and --user, aborting.");
+ }
+ }
+
#ifdef VHOST_CUSE
if (process_vhost_flags("-cuse_dev_name", strdup("vhost-net"),
PATH_MAX, argv, &cuse_dev_name)) {
--
1.9.1
More information about the dev
mailing list