summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorJoe Stringer <joestringer@nicira.com>2015-09-21 16:59:01 -0700
committerJoe Stringer <joestringer@nicira.com>2015-10-13 15:34:15 -0700
commitf3cd3ac7d1209f445fab07d5cf52ef46661b91bd (patch)
tree0e7825147daa41b4db3eb775e556ad9da18a5b50 /build-aux
parente56e30ac9380711289c5f27f7f9479c842f1c475 (diff)
downloadopenvswitch-f3cd3ac7d1209f445fab07d5cf52ef46661b91bd.tar.gz
ofp-actions: Pass ofp_version to decode functions.
A future patch will make use of this version parameter to pass nested attributes. Prepare for that by adding the parameter as an unused variable for the existing functions. Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'build-aux')
-rwxr-xr-xbuild-aux/extract-ofp-actions9
1 files changed, 5 insertions, 4 deletions
diff --git a/build-aux/extract-ofp-actions b/build-aux/extract-ofp-actions
index 524209366..3a7234943 100755
--- a/build-aux/extract-ofp-actions
+++ b/build-aux/extract-ofp-actions
@@ -314,7 +314,7 @@ def extract_ofp_actions(fn, definitions):
print """\
static enum ofperr
ofpact_decode(const struct ofp_action_header *a, enum ofp_raw_action_type raw,
- uint64_t arg, struct ofpbuf *out)
+ enum ofp_version version, uint64_t arg, struct ofpbuf *out)
{
switch (raw) {\
"""
@@ -333,7 +333,7 @@ ofpact_decode(const struct ofp_action_header *a, enum ofp_raw_action_type raw,
arg = "%s(arg)" % hton
else:
arg = "arg"
- print " return decode_%s(%s, out);" % (enum, arg)
+ print " return decode_%s(%s, version, out);" % (enum, arg)
print
print """\
default:
@@ -348,15 +348,16 @@ ofpact_decode(const struct ofp_action_header *a, enum ofp_raw_action_type raw,
base_argtype = versions[0]["base_argtype"]
if base_argtype != 'void':
if base_argtype.startswith('struct'):
- prototype += "const %s *, " % base_argtype
+ prototype += "const %s *, enum ofp_version, " % base_argtype
else:
- prototype += "%s, " % base_argtype
+ prototype += "%s, enum ofp_version, " % base_argtype
prototype += "struct ofpbuf *);"
print prototype
print """
static enum ofperr ofpact_decode(const struct ofp_action_header *,
enum ofp_raw_action_type raw,
+ enum ofp_version version,
uint64_t arg, struct ofpbuf *out);
"""