From patchwork Mon Jan 25 15:23:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Ehrhardt X-Patchwork-Id: 572765 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (unknown [IPv6:2600:3c00::f03c:91ff:fe6e:bdf7]) by ozlabs.org (Postfix) with ESMTP id E2883140291 for ; Tue, 26 Jan 2016 02:23:29 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 15F4610920; Mon, 25 Jan 2016 07:23:28 -0800 (PST) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 8FC4B1091F for ; Mon, 25 Jan 2016 07:23:27 -0800 (PST) Received: from bar3.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 1D8C316181F for ; Mon, 25 Jan 2016 08:23:27 -0700 (MST) X-ASG-Debug-ID: 1453735406-03dd7b0cbe717620001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar3.cudamail.com with ESMTP id gQI83XZHKR4r1x4T (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 25 Jan 2016 08:23:26 -0700 (MST) X-Barracuda-Envelope-From: christian.ehrhardt@canonical.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO youngberry.canonical.com) (91.189.89.112) by mx3-pf1.cudamail.com with ESMTPS (AES256-SHA encrypted); 25 Jan 2016 15:23:20 -0000 Received-SPF: none (mx3-pf1.cudamail.com: domain at canonical.com does not designate permitted sender hosts) X-Barracuda-Apparent-Source-IP: 91.189.89.112 X-Barracuda-RBL-IP: 91.189.89.112 Received: from [10.172.196.172] (helo=Weiknorze.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1aNiz8-0003Pd-A8; Mon, 25 Jan 2016 15:23:18 +0000 X-CudaMail-Envelope-Sender: christian.ehrhardt@canonical.com From: Christian Ehrhardt To: christian.ehrhardt@canonical.com, james.page@canonical.com, dev@openvswitch.org X-CudaMail-MID: CM-V1-124016483 X-CudaMail-DTE: 012516 X-CudaMail-Originating-IP: 91.189.89.112 Date: Mon, 25 Jan 2016 16:23:14 +0100 X-ASG-Orig-Subj: [##CM-V1-124016483##][PATCH 1/2] ovs-ctl: add early parameters for DPDK Message-Id: <1453735395-3046-2-git-send-email-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1453735395-3046-1-git-send-email-christian.ehrhardt@canonical.com> References: <1453735395-3046-1-git-send-email-christian.ehrhardt@canonical.com> X-GBUdb-Analysis: 0, 91.189.89.112, Ugly c=0 p=0 Source New X-MessageSniffer-Rules: 0-0-0-4615-c X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1453735406 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 3.60 X-Barracuda-Spam-Status: Yes, SCORE=3.60 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC0_MISMATCH_TO, BSF_SC0_SA_TO_FROM_ADDR_MATCH, BSF_SC5_MJ1963, BSF_SC7_SA_HREF_FROM_MISMATCH_TEXT_URIx1_HL, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.26434 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC0_SA_TO_FROM_ADDR_MATCH Sender Address Matches Recipient Address 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 2.50 BSF_SC7_SA_HREF_FROM_MISMATCH_TEXT_URIx1_HL Custom Rule HREF_FROM_MISMATCH_TEXT_URIx1_HL X-Priority: 5 (Lowest) X-MSMail-Priority: Low Importance: Low X-Barracuda-Spam-Flag: YES Subject: [ovs-dev] [CudaMailTagged] [PATCH 1/2] ovs-ctl: add early parameters for DPDK 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" To enable DPDK it needs a positional parameter to ovs-vswitchd. Since everybody is encouranged to use the project provided ovs-ctl scripts to start/stop the daemons it should allow an external setting of these options via an environment variable. This patch adds $DPDK_OPTS which will be inserted in the call to ovs-vswitchd arguments early. Signed-off-by: Christian Ehrhardt --- debian/openvswitch-switch.template | 4 ++++ utilities/ovs-ctl.in | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/openvswitch-switch.template b/debian/openvswitch-switch.template index d7c7796..27cf7b5 100644 --- a/debian/openvswitch-switch.template +++ b/debian/openvswitch-switch.template @@ -6,3 +6,7 @@ # OVS_CTL_OPTS: Extra options to pass to ovs-ctl. This is, for example, # a suitable place to specify --ovs-vswitchd-wrapper=valgrind. # OVS_CTL_OPTS= + +# DPDK options - see /usr/share/doc/openvswitch-common/INSTALL.DPDK.md.gz +# these are passed to ovs-vswitchd obeying to the positional requirements +# DPDK_OPTS='--dpdk -vhost_sock_dir /var/run/openvswitch-vhost -c 0x1 -n 4' diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in index 0082bed..7b3a3bf 100755 --- a/utilities/ovs-ctl.in +++ b/utilities/ovs-ctl.in @@ -215,7 +215,11 @@ start_forwarding () { fi # Start ovs-vswitchd. - set ovs-vswitchd unix:"$DB_SOCK" + set ovs-vswitchd + if test X"$DPDK_OPTS" != X; then + set "$@" $DPDK_OPTS -- + fi + set "$@" unix:"$DB_SOCK" set "$@" -vconsole:emer -vsyslog:err -vfile:info if test X"$MLOCKALL" != Xno; then set "$@" --mlockall