ofp-util: Rename OpenFlow 1.1 buckets decoder.
authorSimon Horman <simon.horman@netronome.com>
Mon, 10 Nov 2014 04:47:55 +0000 (13:47 +0900)
committerBen Pfaff <blp@nicira.com>
Mon, 10 Nov 2014 18:04:28 +0000 (10:04 -0800)
Rename ofputil_pull_buckets() as ofputil_pull_buckets11()
to denote that it decodes OpenFlow 1.1 buckets (also used in
OpenFlow 1.2 to 1.4).

This refactoring is in preparation for supporting decoding
of (draft) OpenFlow 1.5 group mod messages and their
buckets.

ONF-JIRA: EXT-350
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ofp-util.c

index 0a1b7d6..96bc6a4 100644 (file)
@@ -7259,8 +7259,8 @@ ofputil_append_group_desc_reply(const struct ofputil_group_desc *gds,
 }
 
 static enum ofperr
-ofputil_pull_buckets(struct ofpbuf *msg, size_t buckets_length,
-                     enum ofp_version version, struct list *buckets)
+ofputil_pull_ofp11_buckets(struct ofpbuf *msg, size_t buckets_length,
+                           enum ofp_version version, struct list *buckets)
 {
     struct ofp11_bucket *ob;
 
@@ -7360,8 +7360,8 @@ ofputil_decode_group_desc_reply(struct ofputil_group_desc *gd,
         return OFPERR_OFPBRC_BAD_LEN;
     }
 
-    return ofputil_pull_buckets(msg, length - sizeof *ogds, version,
-                                &gd->buckets);
+    return ofputil_pull_ofp11_buckets(msg, length - sizeof *ogds, version,
+                                      &gd->buckets);
 }
 
 static struct ofpbuf *
@@ -7439,7 +7439,8 @@ ofputil_decode_group_mod(const struct ofp_header *oh,
     gm->type = ogm->type;
     gm->group_id = ntohl(ogm->group_id);
 
-    err = ofputil_pull_buckets(&msg, ofpbuf_size(&msg), oh->version, &gm->buckets);
+    err = ofputil_pull_ofp11_buckets(&msg, ofpbuf_size(&msg), oh->version,
+                                     &gm->buckets);
     if (err) {
         return err;
     }