ofp-util: Use OFPGMFC_OUT_OF_BUCKETS for indirect groups with !=1 buckets.
authorBen Pfaff <blp@nicira.com>
Fri, 8 May 2015 16:15:43 +0000 (09:15 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 8 May 2015 18:33:58 +0000 (11:33 -0700)
OpenFlow 1.3 says:

    If a switch cannot add the incoming group entry due to restrictions
    (hardware or otherwise) limiting the number of group buckets, it must
    refuse to add the group entry and must send an ofp_error_msg with
    OFPET_GROUP_MOD_FAILED type and OFPGMFC_OUT_OF_BUCKETS code.

This indicates that OFPGMFC_OUT_OF_BUCKETS is appropriate for an indirect
group with the wrong number of buckets, but OVS was using a different
error.  This fixes the problem.

ONF-JIRA: EXT-546
Reported-by: Mrinmoy Das <mrdas@ixiacom.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
AUTHORS
lib/ofp-util.c

diff --git a/AUTHORS b/AUTHORS
index 53fd835..891cfe9 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -303,6 +303,7 @@ Mike Bursell            mike.bursell@citrix.com
 Mike Kruze              mkruze@nicira.com
 Min Chen                ustcer.tonychan@gmail.com
 Mikael Doverhag         mdoverhag@nicira.com
+Mrinmoy Das             mrdas@ixiacom.com
 Nagi Reddy Jonnala      njonnala@Brocade.com
 Niels van Adrichem      N.L.M.vanAdrichem@tudelft.nl
 Niklas Andersson        nandersson@nicira.com
index 60cc674..6366919 100644 (file)
@@ -8375,7 +8375,7 @@ ofputil_decode_group_mod(const struct ofp_header *oh,
     switch (gm->type) {
     case OFPGT11_INDIRECT:
         if (!list_is_singleton(&gm->buckets)) {
-            return OFPERR_OFPGMFC_INVALID_GROUP;
+            return OFPERR_OFPGMFC_OUT_OF_BUCKETS;
         }
         break;
     case OFPGT11_ALL: