[ovs-dev] [PATCH 2/8] vswitch: Document columns that had been previously overlooked.

Daniele Venturino daniele.venturino at m3s.it
Thu Mar 5 18:06:02 UTC 2015


I'm not sure, but if a user enabled one of them with


*ovs-vsctl set Bridge br0 stp_enable/rstp_enable=true*

and then the other one with

*ovs-vsctl set Bridge br0 rstp_enable/stp_enable=true*

this last command has no effects. See:

static void
> bridge_configure_rstp(struct bridge *br)
> {
>     struct ofproto_stp_status stp_status;
>     ofproto_get_stp_status(br->ofproto, &stp_status);
>     if (!br->cfg->rstp_enable) {
>         ofproto_set_rstp(br->ofproto, NULL);
>     } else if (stp_status.enabled) {
>         /* Do not activate RSTP if STP is enabled. */
>         VLOG_ERR("RSTP cannot be enabled if STP is running.");
>         ofproto_set_rstp(br->ofproto, NULL);
>         ovsrec_bridge_set_rstp_enable(br->cfg, false);
>     } else {



If  enabling both of them should result in activating RSTP, then some
modifications are needed I think.

Daniele

2015-03-05 18:02 GMT+01:00 Ben Pfaff <blp at nicira.com>:

> On Wed, Feb 25, 2015 at 04:00:36PM +0100, Daniele Venturino wrote:
> > > +            STP and RSTP are mutually exclusive.  If both are
> enabled, RSTP
> > > +            will be used.
> >
> >
> > I think this might not be true.
> > If it has not been changed, when STP or RSTP is enabled it should not be
> possible to enable the other one on the same bridge.
> > This is done in bridge_configure_stp() and bridge_configure_rstp() in
> vswitchd/bridge.c.
>
> Do you mean that, if the database enables both STP and RSTP, then which
> one becomes active depends on the order in which they are enabled?  If
> so, then we should fix that: Open vSwitch configuration should be a
> function of the database's contents, not of the database's history.
>



More information about the dev mailing list