On Tue, Jul 28, 2015 at 10:06:04PM -0300, Flavio Leitner wrote:
> On Tue, Jul 28, 2015 at 03:21:49PM -0700, Ben Pfaff wrote:
> > The OpenFlow specification says that only role changes to slave or master
> > check the generation ID, so this is a bug fix.
> > 
> > Found by OFTest.
> 
> Found in OF1.5 page 45 which says that switch must ignore
> generation_id if the role in the REQUEST is ROLE_EQUAL
> because generation_id is specifically intended for the
> disambiguation of race condition in master/slave transition.

Thanks, I added a supporting quotation to the commit message.

> >      if (request.role != OFPCR12_ROLE_NOCHANGE) {
> > -        if (request.have_generation_id
> > +        if (request.role != OFPCR12_ROLE_EQUAL
> > +            && request.have_generation_id
> 
> maybe this:
>        if (request.role != OFPCR12_ROLE_NOCHANGE
>            && request.role != OFPCR12_ROLE_EQUAL) {
>            if (request.have_generation_id
>               && !ofconn_set_master_election_id(ofconn, 
> request.generation_id)) {
> 
> 
> just to have the .role comparison grouped.

I don't see a graceful way to make that change and at the same time
execute the following ofconn_set_role() statement for ROLE_EQUAL but not
for ROLE_NOCHANGE.

> I am fine either way.

Thanks, I applied this to master, branch-2.4, and branch-2.3.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to