ofp-actions: Make composing actions harder to screw up.
authorBen Pfaff <blp@ovn.org>
Wed, 23 Dec 2015 21:23:48 +0000 (13:23 -0800)
committerBen Pfaff <blp@ovn.org>
Tue, 5 Jan 2016 00:07:51 +0000 (16:07 -0800)
commit2bd318dec2428ae6c0febbf79453982676ccb672
tree1f125218c305b9832bbdbafa0c5055865a6025fb
parentad61c98d7a41f706eda54731080aef95f7d31fb4
ofp-actions: Make composing actions harder to screw up.

Until now, composing a fixed-length action with ofpact_put_<NAME>() failed
to append any padding required after the action.  This commit changes that
so that these calls now add padding.  This meant that the function
ofpact_pad(), which was until now required in various unintuitive places,
is no longer required, and removes it.

Variable-length actions still require calling ofpact_update_len() after
composition.  I don't see a way to avoid that.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Russell Bryant <russell@ovn.org>
lib/learn.c
lib/learning-switch.c
lib/ofp-actions.c
lib/ofp-actions.h
ofproto/connmgr.c
ofproto/fail-open.c
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif.c