summaryrefslogtreecommitdiff
path: root/rhel/etc_sysconfig_network-scripts_ifup-ovs
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2015-12-01 16:48:04 +0200
committerBen Pfaff <blp@ovn.org>2015-12-22 13:46:42 -0800
commitf6bf8880613aaaf547409e9282b675ad2d85c6ba (patch)
tree67e0ee2abccd1d064e44bf3ca0d895128df021f7 /rhel/etc_sysconfig_network-scripts_ifup-ovs
parent39c2baa9e357948fe8f45bc9e96661b456538755 (diff)
downloadopenvswitch-f6bf8880613aaaf547409e9282b675ad2d85c6ba.tar.gz
rhel: Add support DPDK port creation via network scripts
Add support for creating a userspace bridge and the four DPDK port types via network scripts + basic documentation. Signed-off-by: Panu Matilainen <pmatilai@redhat.com> Acked-by: Aaron Conole <aconole@redhat.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'rhel/etc_sysconfig_network-scripts_ifup-ovs')
-rwxr-xr-xrhel/etc_sysconfig_network-scripts_ifup-ovs24
1 files changed, 22 insertions, 2 deletions
diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs
index 478c5c393..f3fc05e12 100755
--- a/rhel/etc_sysconfig_network-scripts_ifup-ovs
+++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs
@@ -72,15 +72,19 @@ else
fi
case "$TYPE" in
- OVSBridge)
+ OVSBridge|OVSUserBridge)
# If bridge already exists and is up, it has been configured through
# other cases like OVSPort, OVSIntPort and OVSBond. If it is down or
# it does not exist, create it. It is possible for a bridge to exist
# because it remained in the OVSDB for some reason, but it won't be up.
+ if [ "${TYPE}" = "OVSUserBridge" ]; then
+ DATAPATH="netdev"
+ fi
if check_device_down "${DEVICE}"; then
ovs-vsctl -t ${TIMEOUT} -- --may-exist add-br "$DEVICE" $OVS_OPTIONS \
${OVS_EXTRA+-- $OVS_EXTRA} \
- ${STP+-- set bridge "$DEVICE" stp_enable="${STP}"}
+ ${STP+-- set bridge "$DEVICE" stp_enable="${STP}"} \
+ ${DATAPATH+-- set bridge "$DEVICE" datapath_type="$DATAPATH"}
else
OVSBRIDGECONFIGURED="yes"
fi
@@ -150,6 +154,22 @@ case "$TYPE" in
ifup_ovs_bridge
ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" type=patch options:peer="${OVS_PATCH_PEER}" ${OVS_EXTRA+-- $OVS_EXTRA}
;;
+ OVSDPDKPort)
+ ifup_ovs_bridge
+ ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" type=dpdk ${OVS_EXTRA+-- $OVS_EXTRA}
+ ;;
+ OVSDPDKRPort)
+ ifup_ovs_bridge
+ ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" type=dpdkr ${OVS_EXTRA+-- $OVS_EXTRA}
+ ;;
+ OVSDPDVhostPort)
+ ifup_ovs_bridge
+ ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" type=dpdkvhost ${OVS_EXTRA+-- $OVS_EXTRA}
+ ;;
+ OVSDPDKVhostUserPort)
+ ifup_ovs_bridge
+ ovs-vsctl -t ${TIMEOUT} -- --may-exist add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS -- set Interface "$DEVICE" type=dpdkvhostuser ${OVS_EXTRA+-- $OVS_EXTRA}
+ ;;
*)
echo $"Invalid OVS interface type $TYPE"
exit 1