[ovs-git] [openvswitch/ovs] 64e8c4: Fix treatment of OpenFlow 1.1+ bucket weights.

GitHub noreply at github.com
Wed Jul 29 16:10:07 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 64e8c446ae140df25fa5976fa0a7f7c58f51ac55
      https://github.com/openvswitch/ovs/commit/64e8c446ae140df25fa5976fa0a7f7c58f51ac55
  Author: Ben Pfaff <blp at nicira.com>
  Date:   2015-07-29 (Wed, 29 Jul 2015)

  Changed paths:
    M lib/ofp-parse.c
    M lib/ofp-print.c
    M lib/ofp-util.c

  Log Message:
  -----------
  Fix treatment of OpenFlow 1.1+ bucket weights.

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>




More information about the git mailing list