This is in preparation for using last_action() from
more than one C file as part of supporting an odp select group action.

Signed-off-by: Simon Horman <simon.hor...@netronome.com>
---
 datapath/actions.c  | 6 ------
 datapath/datapath.h | 5 +++++
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/datapath/actions.c b/datapath/actions.c
index 51ca40b..9d27234 100644
--- a/datapath/actions.c
+++ b/datapath/actions.c
@@ -752,11 +752,6 @@ static int output_userspace(struct datapath *dp, struct 
sk_buff *skb,
        return ovs_dp_upcall(dp, skb, &upcall);
 }
 
-static bool last_action(const struct nlattr *a, int rem)
-{
-       return a->nla_len == rem;
-}
-
 static int sample(struct datapath *dp, struct sk_buff *skb,
                  const struct nlattr *attr)
 {
@@ -841,7 +836,6 @@ static int select_group(struct datapath *dp, struct sk_buff 
*skb,
        const struct nlattr *best_bucket = NULL;
        const struct nlattr *acts_list;
        const struct nlattr *bucket;
-       struct sk_buff *sample_skb;
        u32 best_score = 0;
        u32 basis;
        u32 i = 0;
diff --git a/datapath/datapath.h b/datapath/datapath.h
index c5d3c86..74a15e6 100644
--- a/datapath/datapath.h
+++ b/datapath/datapath.h
@@ -209,4 +209,9 @@ do {                                                        
        \
        if (net_ratelimit())                                    \
                pr_info("netlink: " fmt, ##__VA_ARGS__);        \
 } while (0)
+
+static inline bool last_action(const struct nlattr *a, int rem)
+{
+       return a->nla_len == rem;
+}
 #endif /* datapath.h */
-- 
2.0.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to