2017-02-10 9:49 GMT-08:00 Aaron Conole <acon...@redhat.com>: > From: Aaron Conole <acon...@bytheb.org> > > This adds support for ifup to configure client-mode sockets by exposing > two new variables $OVS_PORT_MODE and $OVS_PORT_PATH to the ifcfg > scripts. When OVS_PORT_MODE is set to 'client', the OVS_PORT_PATH will > be passed as the vhost-server-path option. > > No change is needed to ifdown because the OVSDPDKVhostUserPort type > already has an appropriate entry. > > Signed-off-by: Aaron Conole <acon...@redhat.com>
Thanks, applied to master, branch-2.7 > --- > rhel/README.RHEL.rst | 9 +++++++++ > rhel/etc_sysconfig_network-scripts_ifup-ovs | 10 +++++++++- > 2 files changed, 18 insertions(+), 1 deletion(-) > > diff --git a/rhel/README.RHEL.rst b/rhel/README.RHEL.rst > index afccf17..8d57cb2 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 e49e6fe..b95220a 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 > -- > 2.9.3 > > _______________________________________________ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev