The current ifcfg file lacks support for OVS DPDK Bond.

Reviewed-by: Aaron Conole <acon...@redhat.com>
Signed-off-by: Flavio Leitner <f...@redhat.com>
---
 rhel/README.RHEL                            | 19 ++++++++++++++++---
 rhel/etc_sysconfig_network-scripts_ifup-ovs |  9 +++++++++
 2 files changed, 25 insertions(+), 3 deletions(-)

ChangeLog:

v2: Removed extra line

diff --git a/rhel/README.RHEL b/rhel/README.RHEL
index 54c1b44..21b50cc 100644
--- a/rhel/README.RHEL
+++ b/rhel/README.RHEL
@@ -33,13 +33,15 @@ assignments.  The following OVS-specific variable names are 
supported:
         * "OVSDPDKPort", if <name> is a physical DPDK NIC port (name
           must start with "dpdk" and end with portid, eg "dpdk0")
 
-       * "OVSDPDKRPort", if <name> is a DPDK ring port (name must
+        * "OVSDPDKRPort", if <name> is a DPDK ring port (name must
           start with dpdkr and end with portid, eg "dpdkr0")
 
         * "OVSDPDKVhostPort" if <name> is a DPDK vhost-cuse port
 
         * "OVSDPDKVhostUserPort" if <name> is a DPDK vhost-user port
 
+        * "OVSDPDKBond" if <name> 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 +55,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 +252,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
-- 
2.7.4

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to