From patchwork Thu Dec 3 04:23:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 552033 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 26D471402C4 for ; Thu, 3 Dec 2015 15:24:25 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 3F21210B52; Wed, 2 Dec 2015 20:24:19 -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 1F88610B48 for ; Wed, 2 Dec 2015 20:24:18 -0800 (PST) Received: from bar4.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 5CDBF1617E0 for ; Wed, 2 Dec 2015 21:24:17 -0700 (MST) X-ASG-Debug-ID: 1449116656-03dc21603d813550001-byXFYA Received: from mx3-pf2.cudamail.com ([192.168.14.1]) by bar4.cudamail.com with ESMTP id LWhfl8ZFOCDbM6Y1 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 02 Dec 2015 21:24:16 -0700 (MST) X-Barracuda-Envelope-From: aconole@redhat.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.1 Received: from unknown (HELO mx1.redhat.com) (209.132.183.28) by mx3-pf2.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 3 Dec 2015 04:24:06 -0000 Received-SPF: pass (mx3-pf2.cudamail.com: SPF record at _spf1.redhat.com designates 209.132.183.28 as permitted sender) X-Barracuda-Apparent-Source-IP: 209.132.183.28 X-Barracuda-RBL-IP: 209.132.183.28 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id B1077317D8; Thu, 3 Dec 2015 04:24:05 +0000 (UTC) Received: from aconole.bos.com (vpn-63-28.rdu2.redhat.com [10.10.63.28]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB34O0YD005840; Wed, 2 Dec 2015 23:24:04 -0500 X-CudaMail-Envelope-Sender: aconole@redhat.com From: Aaron Conole To: dev@openvswitch.org X-CudaMail-MID: CM-V2-1201073917 X-CudaMail-DTE: 120215 X-CudaMail-Originating-IP: 209.132.183.28 Date: Wed, 2 Dec 2015 23:23:54 -0500 X-ASG-Orig-Subj: [##CM-V2-1201073917##][RFC 2/2] dpdk: Update INSTALL.DPDK.md to reflect new config Message-Id: <1449116634-14671-3-git-send-email-aconole@redhat.com> In-Reply-To: <1449116634-14671-1-git-send-email-aconole@redhat.com> References: <1449116634-14671-1-git-send-email-aconole@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-GBUdb-Analysis: 0, 209.132.183.28, Ugly c=0.071429 p=0 Source Normal X-MessageSniffer-Rules: 0-0-0-9328-c X-Barracuda-Connect: UNKNOWN[192.168.14.1] X-Barracuda-Start-Time: 1449116656 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: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=BSF_SC5_MJ1963, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.24927 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Cc: Flavio Leitner Subject: [ovs-dev] [RFC 2/2] dpdk: Update INSTALL.DPDK.md to reflect new config 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" A previous change modified the way DPDK configuration would be accepted by the system. This updates the documentation to align with the new method of configuring DPDK. Signed-off-by: Aaron Conole --- INSTALL.DPDK.md | 52 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/INSTALL.DPDK.md b/INSTALL.DPDK.md index 96b686c..789ea68 100644 --- a/INSTALL.DPDK.md +++ b/INSTALL.DPDK.md @@ -143,22 +143,46 @@ Using the DPDK with ovs-vswitchd: 5. Start vswitchd: - DPDK configuration arguments can be passed to vswitchd via `--dpdk` - argument. This needs to be first argument passed to vswitchd process. - dpdk arg -c is ignored by ovs-dpdk, but it is a required parameter - for dpdk initialization. - + DPDK configuration arguments can be passed to vswitchd via the Open_vSwitch + other_config database. The recognized configuration options are listed. + + * dpdk + This is a boolean configuration option. A value of 'true' tells + Open_vSwitch to initialize the DPDK EAL. A set of nominal defaults are + provided so that simply enabling this option will be sufficient to configure + DPDK enabled ports. + * dpdk_core_mask + This is DPDK's -c command line option, and specifies the core mask to + the EAL. + * dpdk_mem_channels + This is DPDK's -n option, to configure the number of memory spread channels + into the CPU. It is purely an optimization flag. + * dpdk_alloc_mem + Total memory to pre-allocate + * dpdk_socket_mem + Memory to allocate on specific sockets (use comma separated values) + * dpdk_hugepage_dir + Directory where hugetlbfs is mounted + * cuse_dev_name + Option to set the vhost_cuse character device name. + * vhost_sock_dir + Specify a custom directory for the vhost_user unix socket files. + + Note that changing any of these options requires restarting the ovs-vswitchd + application. + ``` export DB_SOCK=/usr/local/var/run/openvswitch/db.sock - ovs-vswitchd --dpdk -c 0x1 -n 4 -- unix:$DB_SOCK --pidfile --detach + ovs-vsctl set Open_vSwitch . other_config:dpdk=true + ovs-vswitchd unix:$DB_SOCK --pidfile --detach ``` If allocated more than one GB hugepage (as for IVSHMEM), set amount and use NUMA node 0 memory: ``` - ovs-vswitchd --dpdk -c 0x1 -n 4 --socket-mem 1024,0 \ - -- unix:$DB_SOCK --pidfile --detach + ovs-vsctl set Open_vSwitch . other_config:dpdk_socket_mem="1024,0" + ovs-vswitchd unix:$DB_SOCK --pidfile --detach ``` 6. Add bridge & ports @@ -523,9 +547,9 @@ have arbitrary names. found in the next section "DPDK vhost-user VM configuration" Note: If you wish for the vhost-user sockets to be created in a directory other than `/usr/local/var/run/openvswitch`, you may specify - another location on the ovs-vswitchd command line like so: + another location in the ovsdb like: - `./vswitchd/ovs-vswitchd --dpdk -vhost_sock_dir /my-dir -c 0x1 ...` + `./ovs-vsctl set Open_vSwitch . other_config:vhost_sock_dir=location` DPDK vhost-user VM configuration: --------------------------------- @@ -641,11 +665,11 @@ DPDK vhost-cuse VM configuration: The new character device filename must be specified on the vswitchd commandline: - `./vswitchd/ovs-vswitchd --dpdk --cuse_dev_name my-vhost-net -c 0x1 ...` + `./utilities/ovs-vsctl set Open_vSwitch . \ + other_config:cuse_dev_name=my-vhost-net ` - Note that the `--cuse_dev_name` argument and associated string must be the first - arguments after `--dpdk` and come before the EAL arguments. In the example - above, the character device to be used will be `/dev/my-vhost-net`. + In the example above, the character device to be used will + be `/dev/my-vhost-net`. 2. This step is only needed if reusing the standard character device. It will conflict with the kernel vhost character device so the user must first