Skip to content

Commit

Permalink
rhel: Add support for DPDK Bond
Browse files Browse the repository at this point in the history
The current ifcfg file lacks support for OVS DPDK Bond.

Reviewed-by: Aaron Conole <[email protected]>
Signed-off-by: Flavio Leitner <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
fleitner authored and blp committed Aug 12, 2016
1 parent 60fa6db commit 7228052
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
19 changes: 16 additions & 3 deletions rhel/README.RHEL
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.
Expand Down Expand Up @@ -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
--------------

Expand Down
9 changes: 9 additions & 0 deletions rhel/etc_sysconfig_network-scripts_ifup-ovs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7228052

Please sign in to comment.