diff --git a/rhel/README.RHEL.rst b/rhel/README.RHEL.rst index afccf170325..8d57cb25bc4 100644 --- a/rhel/README.RHEL.rst +++ b/rhel/README.RHEL.rst @@ -73,6 +73,15 @@ OVS_PATCH_PEER For "OVSPatchPort" devices, this field specifies the patch's peer on the other bridge. +OVS_PORT_MODE + For "OVSDPDKVhostUserPort" devices, this field can be set to "client" which + indicates that the port will be used in client mode. + +OVS_PORT_PATH + For "OVSDPDKVhostUserPort" devices, this field specifies the path to the + vhost-user server socket. It will only be used if OVS_PORT_MODE is set to + "client". + Note ---- diff --git a/rhel/etc_sysconfig_network-scripts_ifup-ovs b/rhel/etc_sysconfig_network-scripts_ifup-ovs index e49e6fe715c..b95220a7fe7 100755 --- a/rhel/etc_sysconfig_network-scripts_ifup-ovs +++ b/rhel/etc_sysconfig_network-scripts_ifup-ovs @@ -181,10 +181,18 @@ case "$TYPE" in ;; 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=dpdkvhostuser ${OVS_EXTRA+-- $OVS_EXTRA} + -- set Interface "$DEVICE" type=$PORT_TYPE \ + $PORT_PATH \ + ${OVS_EXTRA+-- $OVS_EXTRA} ;; OVSDPDKBond) ifup_ovs_bridge