Skip to content

Commit

Permalink
ofp-util: Rename OpenFlow 1.1 buckets decoder.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
shorman-netronome authored and blp committed Nov 10, 2014
1 parent 4498bea commit 655ed3a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/ofp-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 *
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 655ed3a

Please sign in to comment.