diff mbox

[ovs-dev,v2,02/11] ofp-actions: Move function for struct ofpact_nest near struct definition.

Message ID 20161216222537.2221-3-blp@ovn.org
State Superseded
Headers show

Commit Message

Ben Pfaff Dec. 16, 2016, 10:25 p.m. UTC
This seems like a logical place for it.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 include/openvswitch/ofp-actions.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/include/openvswitch/ofp-actions.h b/include/openvswitch/ofp-actions.h
index 946beaf..ecafbea 100644
--- a/include/openvswitch/ofp-actions.h
+++ b/include/openvswitch/ofp-actions.h
@@ -543,6 +543,12 @@  BUILD_ASSERT_DECL(offsetof(struct ofpact_nest, actions) % OFPACT_ALIGNTO == 0);
 BUILD_ASSERT_DECL(offsetof(struct ofpact_nest, actions)
                   == sizeof(struct ofpact_nest));
 
+static inline size_t
+ofpact_nest_get_action_len(const struct ofpact_nest *on)
+{
+    return on->ofpact.len - offsetof(struct ofpact_nest, actions);
+}
+
 /* Bits for 'flags' in struct nx_action_conntrack.
  *
  * If NX_CT_F_COMMIT is set, then the connection entry is moved from the
@@ -584,12 +590,6 @@  ofpact_ct_get_action_len(const struct ofpact_conntrack *oc)
     return oc->ofpact.len - offsetof(struct ofpact_conntrack, actions);
 }
 
-static inline size_t
-ofpact_nest_get_action_len(const struct ofpact_nest *on)
-{
-    return on->ofpact.len - offsetof(struct ofpact_nest, actions);
-}
-
 void ofpacts_execute_action_set(struct ofpbuf *action_list,
                                 const struct ofpbuf *action_set);