lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1411005311-11752-6-git-send-email-simon.horman@netronome.com>
Date:	Thu, 18 Sep 2014 10:55:08 +0900
From:	Simon Horman <simon.horman@...ronome.com>
To:	dev@...nvswitch.org, netdev@...r.kernel.org
Cc:	Pravin Shelar <pshelar@...ira.com>, Jesse Gross <jesse@...ira.com>,
	Thomas Graf <tgraf@...g.ch>,
	Simon Horman <simon.horman@...ronome.com>
Subject: [PATCH/RFC repost 5/8] datapath: Move last_action() helper to datapath.h

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.horman@...ronome.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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ