From patchwork Wed Sep 23 00:51:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Zhou X-Patchwork-Id: 521522 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 21F7E1401AF for ; Wed, 23 Sep 2015 10:51:41 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id B0484109EF; Tue, 22 Sep 2015 17:51:32 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 62CDF109E8 for ; Tue, 22 Sep 2015 17:51:31 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id DF3F41E0366 for ; Tue, 22 Sep 2015 18:51:30 -0600 (MDT) X-ASG-Debug-ID: 1442969490-09eadd11e42cf9e0001-byXFYA Received: from mx1-pf2.cudamail.com ([192.168.24.2]) by bar5.cudamail.com with ESMTP id GscZ1toq9NfLKsWK (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 22 Sep 2015 18:51:30 -0600 (MDT) X-Barracuda-Envelope-From: azhou@nicira.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.2 Received: from unknown (HELO mail-pa0-f45.google.com) (209.85.220.45) by mx1-pf2.cudamail.com with ESMTPS (RC4-SHA encrypted); 23 Sep 2015 00:51:30 -0000 Received-SPF: unknown (mx1-pf2.cudamail.com: Multiple SPF records returned) X-Barracuda-RBL-Trusted-Forwarder: 209.85.220.45 Received: by pacbt3 with SMTP id bt3so5726829pac.3 for ; Tue, 22 Sep 2015 17:51:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PViU5ANfUALIe/2usP7ILaWJMMRcgyuFdxQQQjYNPE0=; b=aTPHWwheWBgXloPO4VRoeKIqMaIlDRpjo6xXzfJbB0i1jJ0l8M9L8tQ50cZ0IMJW/D PS1mEBoKRhy84+EgT+M3kQm+9x7dWLGoYSzwEjZwyp8/4NYN8hlf45l6QPZO/oHOCFS+ u2zf0gUdAY+LTJDUlVwF6+BZKcV9WPBFNrGh7SKbLXod+nikjIRc6ZVHOZpBZG2Jpv1K UAiCSPpIWqZOiD/3Z8ALzqnk+nER2A3WXIMPWJ7Q6+CHO2KTot0Bz47m1a2cRKUwHLQu irsc2onNpTwQULlFkqsLDXBXSPMFzsfae3YF/WP8tNX9+WEscjIP4ndqV3eJ2kHMbv1V u7OQ== X-Gm-Message-State: ALoCoQmJTNt2C1Y0z+wnNCIfM9x0D+f3O9CW7DfcnXbJwTjjGpNtOC97mzO3bbaktiqKKHFFnUYk X-Received: by 10.67.12.166 with SMTP id er6mr33978306pad.40.1442969488730; Tue, 22 Sep 2015 17:51:28 -0700 (PDT) Received: from ubuntu.localdomain ([208.91.1.34]) by smtp.gmail.com with ESMTPSA id qn5sm4441160pbc.74.2015.09.22.17.51.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Sep 2015 17:51:28 -0700 (PDT) X-CudaMail-Envelope-Sender: azhou@nicira.com X-Barracuda-Apparent-Source-IP: 208.91.1.34 From: Andy Zhou To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E2-921115462 X-CudaMail-DTE: 092215 X-CudaMail-Originating-IP: 209.85.220.45 Date: Tue, 22 Sep 2015 17:51:12 -0700 X-ASG-Orig-Subj: [##CM-E2-921115462##][PATCH 3/8] dpdk: reject --user option Message-Id: <1442969477-11026-3-git-send-email-azhou@nicira.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442969477-11026-1-git-send-email-azhou@nicira.com> References: <1442969477-11026-1-git-send-email-azhou@nicira.com> X-Barracuda-Connect: UNKNOWN[192.168.24.2] X-Barracuda-Start-Time: 1442969490 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 3/8] dpdk: reject --user option X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" 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 Acked-by: Ben Pfaff --- 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)) {