summaryrefslogtreecommitdiff
path: root/rhel
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-05-25 17:11:07 -0700
committerBen Pfaff <blp@ovn.org>2018-06-11 15:32:00 -0700
commit5a0e4aec1af5cf7741c490bce704577e51e536b9 (patch)
tree0115e5184d50e22d6f6e7c7bd87a2690bdcc6ca4 /rhel
parent7be29a47576dce715f9c8b2b4f673fa623728ed0 (diff)
downloadopenvswitch-5a0e4aec1af5cf7741c490bce704577e51e536b9.tar.gz
treewide: Convert leading tabs to spaces.
It's always been OVS coding style to use spaces rather than tabs for indentation, but some tabs have snuck in over time. This commit converts them to spaces. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'rhel')
-rwxr-xr-xrhel/etc_init.d_openvswitch8
-rwxr-xr-xrhel/etc_sysconfig_network-scripts_ifdown-ovs52
-rwxr-xr-xrhel/etc_sysconfig_network-scripts_ifup-ovs338
-rw-r--r--rhel/openvswitch-fedora.spec.in32
-rw-r--r--rhel/openvswitch-kmod-rhel6.spec.in6
5 files changed, 218 insertions, 218 deletions
diff --git a/rhel/etc_init.d_openvswitch b/rhel/etc_init.d_openvswitch
index caf24cce8..20d556803 100755
--- a/rhel/etc_init.d_openvswitch
+++ b/rhel/etc_init.d_openvswitch
@@ -36,16 +36,16 @@ start () {
set ovs_ctl ${1-start}
set "$@" --system-id=random
if test X"$FORCE_COREFILES" != X; then
- set "$@" --force-corefiles="$FORCE_COREFILES"
+ set "$@" --force-corefiles="$FORCE_COREFILES"
fi
if test X"$OVSDB_SERVER_PRIORITY" != X; then
- set "$@" --ovsdb-server-priority="$OVSDB_SERVER_PRIORITY"
+ set "$@" --ovsdb-server-priority="$OVSDB_SERVER_PRIORITY"
fi
if test X"$VSWITCHD_PRIORITY" != X; then
- set "$@" --ovs-vswitchd-priority="$VSWITCHD_PRIORITY"
+ set "$@" --ovs-vswitchd-priority="$VSWITCHD_PRIORITY"
fi
if test X"$VSWITCHD_MLOCKALL" != X; then
- set "$@" --mlockall="$VSWITCHD_MLOCKALL"
+ set "$@" --mlockall="$VSWITCHD_MLOCKALL"
fi
set "$@" $OVS_CTL_OPTS
"$@"
diff --git a/rhel/etc_sysconfig_network-scripts_ifdown-ovs b/rhel/etc_sysconfig_network-scripts_ifdown-ovs
index 8c9f3694c..63d048b22 100755
--- a/rhel/etc_sysconfig_network-scripts_ifdown-ovs
+++ b/rhel/etc_sysconfig_network-scripts_ifdown-ovs
@@ -36,36 +36,36 @@ fi
SERVICE_UNIT=/usr/lib/systemd/system/ovsdb-server.service
if [ -f $SERVICE_UNIT ] && [ -x /usr/bin/systemctl ]; then
- if ! systemctl --quiet is-active ovsdb-server.service; then
- systemctl start ovsdb-server.service
- fi
+ if ! systemctl --quiet is-active ovsdb-server.service; then
+ systemctl start ovsdb-server.service
+ fi
else
- if [ ! -f /var/lock/subsys/openvswitch ]; then
- /sbin/service openvswitch start
- fi
+ if [ ! -f /var/lock/subsys/openvswitch ]; then
+ /sbin/service openvswitch start
+ fi
fi
case "$TYPE" in
- OVSBridge|OVSUserBridge)
- ${OTHERSCRIPT} ${CONFIG} $2
- retval=$?
- ovs-vsctl -t ${TIMEOUT} -- --if-exists del-br "$DEVICE"
- ;;
- OVSPort|OVSIntPort|OVSBond)
- ${OTHERSCRIPT} ${CONFIG} $2
- retval=$?
- ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE"
- ;;
- OVSPatchPort|OVSTunnel)
- ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE"
- ;;
- OVSDPDKPort|OVSDPDKRPort|OVSDPDKVhostUserPort|OVSDPDKBond)
- ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE"
- ;;
- *)
- echo $"Invalid OVS interface type $TYPE"
- exit 1
- ;;
+ OVSBridge|OVSUserBridge)
+ ${OTHERSCRIPT} ${CONFIG} $2
+ retval=$?
+ ovs-vsctl -t ${TIMEOUT} -- --if-exists del-br "$DEVICE"
+ ;;
+ OVSPort|OVSIntPort|OVSBond)
+ ${OTHERSCRIPT} ${CONFIG} $2
+ retval=$?
+ ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE"
+ ;;
+ OVSPatchPort|OVSTunnel)
+ ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE"
+ ;;
+ OVSDPDKPort|OVSDPDKRPort|OVSDPDKVhostUserPort|OVSDPDKBond)
+ ovs-vsctl -t ${TIMEOUT} -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE"
+ ;;
+ *)
+ echo $"Invalid OVS interface type $TYPE"
+ exit 1
+ ;;
esac
exit $retval
diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs
index 1c65f13e6..b01461cc4 100755
--- a/rhel/etc_sysconfig_network-scripts_ifup-ovs
+++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs
@@ -31,196 +31,196 @@ source_config
OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-${REAL_DEVICETYPE}"
if [ ! -x ${OTHERSCRIPT} ]; then
- OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-eth"
+ OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-eth"
fi
check_recursion ()
{
- [ -n "${UPPEDSTACK}" ] && for _r in ${UPPEDSTACK}; do
- [ "$_r" = "$1" ] && return 1
- done
+ [ -n "${UPPEDSTACK}" ] && for _r in ${UPPEDSTACK}; do
+ [ "$_r" = "$1" ] && return 1
+ done
- return 0
+ return 0
}
ifup_ovs_bridge ()
{
- if ovs-vsctl br-exists "${OVS_BRIDGE}"; then :; else
- /sbin/ifup "${OVS_BRIDGE}"
- fi
+ if ovs-vsctl br-exists "${OVS_BRIDGE}"; then :; else
+ /sbin/ifup "${OVS_BRIDGE}"
+ fi
}
if [ -z "${UPPEDSTACK}" ]; then
- UPPEDSTACK="${DEVICE}"
+ UPPEDSTACK="${DEVICE}"
fi
[ -n "${OVSREQUIRES}" ] && for _i in ${OVSREQUIRES}; do
- if ( check_recursion "$_i" ); then
- UPPEDSTACK="${UPPEDSTACK} $_i" /sbin/ifup "$_i"
- fi
+ if ( check_recursion "$_i" ); then
+ UPPEDSTACK="${UPPEDSTACK} $_i" /sbin/ifup "$_i"
+ fi
done
SERVICE_UNIT=/usr/lib/systemd/system/openvswitch.service
if [ -f $SERVICE_UNIT ] && [ -x /usr/bin/systemctl ]; then
- if ! systemctl --quiet is-active openvswitch.service; then
- systemctl start openvswitch.service
- fi
+ if ! systemctl --quiet is-active openvswitch.service; then
+ systemctl start openvswitch.service
+ fi
else
- if [ ! -f /var/lock/subsys/openvswitch ]; then
- /sbin/service openvswitch start
- fi
+ if [ ! -f /var/lock/subsys/openvswitch ]; then
+ /sbin/service openvswitch start
+ fi
fi
case "$TYPE" in
- 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}"} \
- ${DATAPATH+-- set bridge "$DEVICE" datapath_type="$DATAPATH"}
- else
- OVSBRIDGECONFIGURED="yes"
- fi
-
- # If MACADDR is provided in the interface configuration file,
- # we need to set it using ovs-vsctl; setting it with the "ip"
- # command in ifup-eth does not make the change persistent.
- if [ -n "$MACADDR" ]; then
- ovs-vsctl -t ${TIMEOUT} -- set bridge "$DEVICE" \
- other-config:hwaddr="$MACADDR"
- fi
-
- # When dhcp is enabled, the assumption is that there will be a port to
- # attach (otherwise, we can't reach out for dhcp). So, we do not
- # configure the bridge through rhel's ifup infrastructure unless
- # it is being configured after the port has been configured.
- # The "OVSINTF" is set only after the port is configured.
- if [ "${OVSBOOTPROTO}" = "dhcp" ] && [ -n "${OVSINTF}" ]; then
- case " ${OVSDHCPINTERFACES} " in
- *" ${OVSINTF} "*)
- BOOTPROTO=dhcp ${OTHERSCRIPT} ${CONFIG}
- ;;
- esac
- fi
-
- # When dhcp is not enabled, it is possible that someone may want
- # a standalone bridge (i.e it may not have any ports). Configure it.
- if [ "${OVSBOOTPROTO}" != "dhcp" ] && [ -z "${OVSINTF}" ] && \
- [ "${OVSBRIDGECONFIGURED}" != "yes" ]; then
- ${OTHERSCRIPT} ${CONFIG}
- fi
- exit 0
- ;;
- OVSPort)
- ifup_ovs_bridge
- ${OTHERSCRIPT} ${CONFIG} ${2}
- # The port might be already in the database but not yet
- # in the datapath. So, remove the stale interface first.
- ovs-vsctl -t ${TIMEOUT} \
- -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
- -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
- OVSINTF=${DEVICE} /sbin/ifup "$OVS_BRIDGE"
- ;;
- OVSIntPort)
- ifup_ovs_bridge
- ovs-vsctl -t ${TIMEOUT} \
- -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
- -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \
- -- set Interface "$DEVICE" type=internal ${OVS_EXTRA+-- $OVS_EXTRA}
- if [ -n "${OVSDHCPINTERFACES}" ]; then
- for _iface in ${OVSDHCPINTERFACES}; do
- /sbin/ifup ${_iface}
- done
- fi
- BOOTPROTO="${OVSBOOTPROTO}" ${OTHERSCRIPT} ${CONFIG} ${2}
- ;;
- OVSBond)
- ifup_ovs_bridge
- for _iface in $BOND_IFACES; do
- /sbin/ifup ${_iface}
- done
- ovs-vsctl -t ${TIMEOUT} \
- -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
- -- add-bond "$OVS_BRIDGE" "$DEVICE" ${BOND_IFACES} $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
- OVSINTF=${DEVICE} /sbin/ifup "$OVS_BRIDGE"
- ;;
- OVSTunnel)
- ifup_ovs_bridge
- ovs-vsctl -t ${TIMEOUT} \
- -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
- -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \
- -- set Interface "$DEVICE" type=$OVS_TUNNEL_TYPE $OVS_TUNNEL_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
- ;;
- OVSPatchPort)
- ifup_ovs_bridge
- ovs-vsctl -t ${TIMEOUT} \
- -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
- -- 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
- BRIDGE_MAC_ORIG=$(get_hwaddr $OVS_BRIDGE)
- ovs-vsctl -t ${TIMEOUT} \
- -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
- -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \
- -- set Interface "$DEVICE" type=dpdk ${OVS_EXTRA+-- $OVS_EXTRA}
- BRIDGE_MAC=$(get_hwaddr $OVS_BRIDGE)
- # The bridge may change its MAC to be the lower one among all its
- # ports. If that happens, bridge configuration (e.g. routes) will
- # be lost. Restore the post-up bridge configuration again.
- if [ "$BRIDGE_MAC_ORIG" != "$BRIDGE_MAC" ]; then
- ${OTHERSCRIPT} "$OVS_BRIDGE"
- fi
- ;;
- OVSDPDKRPort)
- ifup_ovs_bridge
- ovs-vsctl -t ${TIMEOUT} \
- -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
- -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \
- -- set Interface "$DEVICE" type=dpdkr ${OVS_EXTRA+-- $OVS_EXTRA}
- ;;
- OVSDPDKVhostUserPort)
- ifup_ovs_bridge
- PORT_TYPE="dpdkvhostuser"
- PORT_PATH=""
- if [ "$OVS_PORT_MODE" == "client" ]; then
- PORT_TYPE="dpdkvhostuserclient"
- PORT_PATH="options:vhost-server-path=${OVS_PORT_PATH}"
- fi
- ovs-vsctl -t ${TIMEOUT} \
- -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
- -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \
- -- set Interface "$DEVICE" type=$PORT_TYPE \
- $PORT_PATH \
- ${OVS_EXTRA+-- $OVS_EXTRA}
- ;;
- OVSDPDKBond)
- ifup_ovs_bridge
- BRIDGE_MAC_ORIG=$(get_hwaddr $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}
- BRIDGE_MAC=$(get_hwaddr $OVS_BRIDGE)
- # The bridge may change its MAC to be the lower one among all its
- # ports. If that happens, bridge configuration (e.g. routes) will
- # be lost. Restore the post-up bridge configuration again.
- if [ "$BRIDGE_MAC_ORIG" != "$BRIDGE_MAC" ]; then
- ${OTHERSCRIPT} "$OVS_BRIDGE"
- fi
- ;;
- *)
- echo $"Invalid OVS interface type $TYPE"
- exit 1
- ;;
+ 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}"} \
+ ${DATAPATH+-- set bridge "$DEVICE" datapath_type="$DATAPATH"}
+ else
+ OVSBRIDGECONFIGURED="yes"
+ fi
+
+ # If MACADDR is provided in the interface configuration file,
+ # we need to set it using ovs-vsctl; setting it with the "ip"
+ # command in ifup-eth does not make the change persistent.
+ if [ -n "$MACADDR" ]; then
+ ovs-vsctl -t ${TIMEOUT} -- set bridge "$DEVICE" \
+ other-config:hwaddr="$MACADDR"
+ fi
+
+ # When dhcp is enabled, the assumption is that there will be a port to
+ # attach (otherwise, we can't reach out for dhcp). So, we do not
+ # configure the bridge through rhel's ifup infrastructure unless
+ # it is being configured after the port has been configured.
+ # The "OVSINTF" is set only after the port is configured.
+ if [ "${OVSBOOTPROTO}" = "dhcp" ] && [ -n "${OVSINTF}" ]; then
+ case " ${OVSDHCPINTERFACES} " in
+ *" ${OVSINTF} "*)
+ BOOTPROTO=dhcp ${OTHERSCRIPT} ${CONFIG}
+ ;;
+ esac
+ fi
+
+ # When dhcp is not enabled, it is possible that someone may want
+ # a standalone bridge (i.e it may not have any ports). Configure it.
+ if [ "${OVSBOOTPROTO}" != "dhcp" ] && [ -z "${OVSINTF}" ] && \
+ [ "${OVSBRIDGECONFIGURED}" != "yes" ]; then
+ ${OTHERSCRIPT} ${CONFIG}
+ fi
+ exit 0
+ ;;
+ OVSPort)
+ ifup_ovs_bridge
+ ${OTHERSCRIPT} ${CONFIG} ${2}
+ # The port might be already in the database but not yet
+ # in the datapath. So, remove the stale interface first.
+ ovs-vsctl -t ${TIMEOUT} \
+ -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
+ -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
+ OVSINTF=${DEVICE} /sbin/ifup "$OVS_BRIDGE"
+ ;;
+ OVSIntPort)
+ ifup_ovs_bridge
+ ovs-vsctl -t ${TIMEOUT} \
+ -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
+ -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \
+ -- set Interface "$DEVICE" type=internal ${OVS_EXTRA+-- $OVS_EXTRA}
+ if [ -n "${OVSDHCPINTERFACES}" ]; then
+ for _iface in ${OVSDHCPINTERFACES}; do
+ /sbin/ifup ${_iface}
+ done
+ fi
+ BOOTPROTO="${OVSBOOTPROTO}" ${OTHERSCRIPT} ${CONFIG} ${2}
+ ;;
+ OVSBond)
+ ifup_ovs_bridge
+ for _iface in $BOND_IFACES; do
+ /sbin/ifup ${_iface}
+ done
+ ovs-vsctl -t ${TIMEOUT} \
+ -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
+ -- add-bond "$OVS_BRIDGE" "$DEVICE" ${BOND_IFACES} $OVS_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
+ OVSINTF=${DEVICE} /sbin/ifup "$OVS_BRIDGE"
+ ;;
+ OVSTunnel)
+ ifup_ovs_bridge
+ ovs-vsctl -t ${TIMEOUT} \
+ -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
+ -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \
+ -- set Interface "$DEVICE" type=$OVS_TUNNEL_TYPE $OVS_TUNNEL_OPTIONS ${OVS_EXTRA+-- $OVS_EXTRA}
+ ;;
+ OVSPatchPort)
+ ifup_ovs_bridge
+ ovs-vsctl -t ${TIMEOUT} \
+ -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
+ -- 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
+ BRIDGE_MAC_ORIG=$(get_hwaddr $OVS_BRIDGE)
+ ovs-vsctl -t ${TIMEOUT} \
+ -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
+ -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \
+ -- set Interface "$DEVICE" type=dpdk ${OVS_EXTRA+-- $OVS_EXTRA}
+ BRIDGE_MAC=$(get_hwaddr $OVS_BRIDGE)
+ # The bridge may change its MAC to be the lower one among all its
+ # ports. If that happens, bridge configuration (e.g. routes) will
+ # be lost. Restore the post-up bridge configuration again.
+ if [ "$BRIDGE_MAC_ORIG" != "$BRIDGE_MAC" ]; then
+ ${OTHERSCRIPT} "$OVS_BRIDGE"
+ fi
+ ;;
+ OVSDPDKRPort)
+ ifup_ovs_bridge
+ ovs-vsctl -t ${TIMEOUT} \
+ -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
+ -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \
+ -- set Interface "$DEVICE" type=dpdkr ${OVS_EXTRA+-- $OVS_EXTRA}
+ ;;
+ OVSDPDKVhostUserPort)
+ ifup_ovs_bridge
+ PORT_TYPE="dpdkvhostuser"
+ PORT_PATH=""
+ if [ "$OVS_PORT_MODE" == "client" ]; then
+ PORT_TYPE="dpdkvhostuserclient"
+ PORT_PATH="options:vhost-server-path=${OVS_PORT_PATH}"
+ fi
+ ovs-vsctl -t ${TIMEOUT} \
+ -- --if-exists del-port "$OVS_BRIDGE" "$DEVICE" \
+ -- add-port "$OVS_BRIDGE" "$DEVICE" $OVS_OPTIONS \
+ -- set Interface "$DEVICE" type=$PORT_TYPE \
+ $PORT_PATH \
+ ${OVS_EXTRA+-- $OVS_EXTRA}
+ ;;
+ OVSDPDKBond)
+ ifup_ovs_bridge
+ BRIDGE_MAC_ORIG=$(get_hwaddr $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}
+ BRIDGE_MAC=$(get_hwaddr $OVS_BRIDGE)
+ # The bridge may change its MAC to be the lower one among all its
+ # ports. If that happens, bridge configuration (e.g. routes) will
+ # be lost. Restore the post-up bridge configuration again.
+ if [ "$BRIDGE_MAC_ORIG" != "$BRIDGE_MAC" ]; then
+ ${OTHERSCRIPT} "$OVS_BRIDGE"
+ fi
+ ;;
+ *)
+ echo $"Invalid OVS interface type $TYPE"
+ exit 1
+ ;;
esac
diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in
index 2ef0b5754..9be16ffe7 100644
--- a/rhel/openvswitch-fedora.spec.in
+++ b/rhel/openvswitch-fedora.spec.in
@@ -214,30 +214,30 @@ Docker network plugins for OVN.
%build
%configure \
%if %{with libcapng}
- --enable-libcapng \
+ --enable-libcapng \
%else
- --disable-libcapng \
+ --disable-libcapng \
%endif
%if %{with dpdk}
- --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
+ --with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
%endif
- --enable-ssl \
- --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
+ --enable-ssl \
+ --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
%if 0%{?fedora} > 22 || %{with build_python3}
- PYTHON3=%{__python3} \
- PYTHON=%{__python2}
+ PYTHON3=%{__python3} \
+ PYTHON=%{__python2}
%else
- PYTHON=%{__python}
+ PYTHON=%{__python}
%endif
build-aux/dpdkstrip.py \
%if %{with dpdk}
- --dpdk \
+ --dpdk \
%else
- --nodpdk \
+ --nodpdk \
%endif
- < rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \
- > rhel/usr_lib_systemd_system_ovs-vswitchd.service
+ < rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \
+ > rhel/usr_lib_systemd_system_ovs-vswitchd.service
make %{?_smp_mflags}
make selinux-policy
@@ -259,10 +259,10 @@ install -p -D -m 0644 \
rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \
$RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openvswitch
for service in openvswitch ovsdb-server ovs-vswitchd ovs-delete-transient-ports \
- ovn-controller ovn-controller-vtep ovn-northd; do
- install -p -D -m 0644 \
- rhel/usr_lib_systemd_system_${service}.service \
- $RPM_BUILD_ROOT%{_unitdir}/${service}.service
+ ovn-controller ovn-controller-vtep ovn-northd; do
+ install -p -D -m 0644 \
+ rhel/usr_lib_systemd_system_${service}.service \
+ $RPM_BUILD_ROOT%{_unitdir}/${service}.service
done
install -m 0755 rhel/etc_init.d_openvswitch \
$RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/openvswitch.init
diff --git a/rhel/openvswitch-kmod-rhel6.spec.in b/rhel/openvswitch-kmod-rhel6.spec.in
index c6e6db5d0..daa3dade1 100644
--- a/rhel/openvswitch-kmod-rhel6.spec.in
+++ b/rhel/openvswitch-kmod-rhel6.spec.in
@@ -46,9 +46,9 @@ Open vSwitch Linux kernel module.
%build
for flavor in %flavors_to_build; do
- mkdir _$flavor
- (cd _$flavor && ../configure --with-linux="%{kernel_source $flavor}")
- %{__make} -C _$flavor/datapath/linux %{?_smp_mflags}
+ mkdir _$flavor
+ (cd _$flavor && ../configure --with-linux="%{kernel_source $flavor}")
+ %{__make} -C _$flavor/datapath/linux %{?_smp_mflags}
done
%install