[ovs-dev] [PATCH v2] Fix treatment of OpenFlow 1.1+ bucket weights.
Ben Pfaff
blp at nicira.com
Wed Jul 29 16:12:52 UTC 2015
On Wed, Jul 29, 2015 at 12:56:51PM -0300, Flavio Leitner wrote:
> On Tue, Jul 28, 2015 at 10:05:07PM -0700, Ben Pfaff wrote:
> > Until now, OVS has parsed all OF1.1+ group buckets that lack a weight
> > as having weight 1. Unfortunately, OpenFlow says that only "select"
> > groups may have a nonzero weight, and requires reporting an error for
> > other kinds of groups that have a nonzero weight. This commit fixes
> > the problem by parsing only select groups with a default weight of 1
> > and other groups with a default weight of 0. It also adds the
> > OpenFlow-required check for nonzero weights for other kinds of groups.
> >
> > This complies with OpenFlow 1.1 and later. OF1.1 says in section 5.8:
> >
> > If a specified group type is invalid (ie: includes fields such as
> > weight that are undefined for the specified group type) then the
> > switch must refuse to add the group entry and must send an
> > ofp_error_msg with OFPET_GROUP_MOD_FAILED type and
> > OFPGMFC_INVALID_GROUP code.
> >
> > Found by OFTest.
> >
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > Acked-by: Flavio Leitner <fbl at sysclose.org>
>
> So, the default for "select" remains the same, but for others it's
> now zero. The change isn't a problem because for other kinds of
> groups weight isn't defined, so it must return an error which is
> included in this patch as well.
>
> And with this patch: 1665 tests were successful.
>
> Although my ack is above, ack again ;)
Thanks. I applied this to master and branch-2.4.
More information about the dev
mailing list