From patchwork Tue Jul 26 17:11:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Leitner X-Patchwork-Id: 652846 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rzPmG3hYvz9sdn for ; Wed, 27 Jul 2016 03:11:26 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 9C9CF10A61; Tue, 26 Jul 2016 10:11:25 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 39EB110A60 for ; Tue, 26 Jul 2016 10:11:25 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id C51CA4200C7 for ; Tue, 26 Jul 2016 11:11:24 -0600 (MDT) X-ASG-Debug-ID: 1469553078-09eadd42b51d640001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id EP8hFV1Cd0lTawhv (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 26 Jul 2016 11:11:18 -0600 (MDT) X-Barracuda-Envelope-From: fbl@redhat.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO mx1.redhat.com) (209.132.183.28) by mx1-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 26 Jul 2016 17:11:18 -0000 Received-SPF: pass (mx1-pf1.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-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3F73F64D08 for ; Tue, 26 Jul 2016 17:11:17 +0000 (UTC) Received: from localhost (vpn1-5-110.gru2.redhat.com [10.97.5.110]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6QHBFjD017712 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 26 Jul 2016 13:11:16 -0400 X-CudaMail-Envelope-Sender: fbl@redhat.com From: Flavio Leitner To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-E1-725046668 X-CudaMail-DTE: 072616 X-CudaMail-Originating-IP: 209.132.183.28 Date: Tue, 26 Jul 2016 14:11:11 -0300 X-ASG-Orig-Subj: [##CM-E1-725046668##][PATCH] rhel: Add support for DPDK Bond Message-Id: <1469553071-25709-1-git-send-email-fbl@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 26 Jul 2016 17:11:17 +0000 (UTC) X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1469553078 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 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 Cc: Flavio Leitner Subject: [ovs-dev] [PATCH] rhel: Add support for DPDK Bond 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" The current ifcfg file lacks support for OVS DPDK Bond. Signed-off-by: Flavio Leitner Reviewed-by: Aaron Conole --- rhel/README.RHEL | 20 +++++++++++++++++--- rhel/etc_sysconfig_network-scripts_ifup-ovs | 9 +++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/rhel/README.RHEL b/rhel/README.RHEL index 54c1b44..0f51be5 100644 --- a/rhel/README.RHEL +++ b/rhel/README.RHEL @@ -33,13 +33,16 @@ assignments. The following OVS-specific variable names are supported: * "OVSDPDKPort", if is a physical DPDK NIC port (name must start with "dpdk" and end with portid, eg "dpdk0") - * "OVSDPDKRPort", if is a DPDK ring port (name must + * "OVSDPDKRPort", if is a DPDK ring port (name must start with dpdkr and end with portid, eg "dpdkr0") * "OVSDPDKVhostPort" if is a DPDK vhost-cuse port * "OVSDPDKVhostUserPort" if is a DPDK vhost-user port + * "OVSDPDKBond" if is an OVS DPDK bond. + + - OVS_BRIDGE: If TYPE is anything other than "OVSBridge", set to the name of the OVS bridge to which the port should be attached. @@ -53,8 +56,8 @@ assignments. The following OVS-specific variable names are supported: - OVS_EXTRA: Optionally, additional ovs-vsctl commands, separated by "--" (double dash). - - BOND_IFACES: For "OVSBond" interfaces, a list of physical - interfaces to bond together. + - BOND_IFACES: For "OVSBond" and "OVSDPDKBond" interfaces, a list of + physical interfaces to bond together. - OVS_TUNNEL_TYPE: For "OVSTunnel" interfaces, the type of the tunnel. For example, "gre", "vxlan", etc. @@ -250,6 +253,17 @@ DEVICETYPE=ovs TYPE=OVSDPDKVhostUserPort OVS_BRIDGE=obr0 +==> ifcfg-bond0 <== +DEVICE=bond0 +ONBOOT=yes +DEVICETYPE=ovs +TYPE=OVSDPDKBond +OVS_BRIDGE=ovsbridge0 +BOOTPROTO=none +BOND_IFACES="dpdk0 dpdk1" +OVS_OPTIONS="bond_mode=active-backup" +HOTPLUG=no + Reporting Bugs -------------- diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs index 6850c9f..b6e0356 100755 --- a/rhel/etc_sysconfig_network-scripts_ifup-ovs +++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs @@ -193,6 +193,15 @@ case "$TYPE" in -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \ -- set Interface "$DEVICE" type=dpdkvhostuser ${OVS_EXTRA+-- $OVS_EXTRA} ;; + OVSDPDKBond) + ifup_ovs_bridge + for _iface in $BOND_IFACES; do + IFACE_TYPES="${IFACE_TYPES} -- set interface ${_iface} type=dpdk" + done + ovs-vsctl -t ${TIMEOUT} \ + -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \ + -- add-bond "$OVS_BRIDGE" "$DEVICE" ${BOND_IFACES} $OVS_OPTIONS ${IFACE_TYPES} ${OVS_EXTRA+-- $OVS_EXTRA} + ;; *) echo $"Invalid OVS interface type $TYPE" exit 1