From: Amir Vadai <amir@vadai.me>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org,
John Fastabend <john.r.fastabend@intel.com>,
Jiri Pirko <jiri@mellanox.com>,
Or Gerlitz <ogerlitz@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
Hadar Har-Zion <hadarh@mellanox.com>,
Rony Efraim <ronye@mellanox.com>, Amir Vadai <amir@vadai.me>
Subject: [PATCH net-next V3 02/10] net/flow_dissector: Make dissector_uses_key() and skb_flow_dissector_target() public
Date: Tue, 8 Mar 2016 12:42:30 +0200 [thread overview]
Message-ID: <1457433758-9193-3-git-send-email-amir@vadai.me> (raw)
In-Reply-To: <1457433758-9193-1-git-send-email-amir@vadai.me>
Will be used in a following patch to query if a key is being used, and
what it's value in the target object.
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Amir Vadai <amir@vadai.me>
---
include/net/flow_dissector.h | 13 +++++++++++++
net/core/flow_dissector.c | 13 -------------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h
index 8c8548c..d3d60dc 100644
--- a/include/net/flow_dissector.h
+++ b/include/net/flow_dissector.h
@@ -184,4 +184,17 @@ static inline bool flow_keys_have_l4(struct flow_keys *keys)
u32 flow_hash_from_keys(struct flow_keys *keys);
+static inline bool dissector_uses_key(const struct flow_dissector *flow_dissector,
+ enum flow_dissector_key_id key_id)
+{
+ return flow_dissector->used_keys & (1 << key_id);
+}
+
+static inline void *skb_flow_dissector_target(struct flow_dissector *flow_dissector,
+ enum flow_dissector_key_id key_id,
+ void *target_container)
+{
+ return ((char *)target_container) + flow_dissector->offset[key_id];
+}
+
#endif
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 7c7b873..a669dea 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -19,25 +19,12 @@
#include <net/flow_dissector.h>
#include <scsi/fc/fc_fcoe.h>
-static bool dissector_uses_key(const struct flow_dissector *flow_dissector,
- enum flow_dissector_key_id key_id)
-{
- return flow_dissector->used_keys & (1 << key_id);
-}
-
static void dissector_set_key(struct flow_dissector *flow_dissector,
enum flow_dissector_key_id key_id)
{
flow_dissector->used_keys |= (1 << key_id);
}
-static void *skb_flow_dissector_target(struct flow_dissector *flow_dissector,
- enum flow_dissector_key_id key_id,
- void *target_container)
-{
- return ((char *) target_container) + flow_dissector->offset[key_id];
-}
-
void skb_flow_dissector_init(struct flow_dissector *flow_dissector,
const struct flow_dissector_key *key,
unsigned int key_count)
--
2.7.0
next prev parent reply other threads:[~2016-03-08 10:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-08 10:42 [PATCH net-next V3 00/10] cls_flower hardware offload support Amir Vadai
2016-03-08 10:42 ` [PATCH net-next V3 01/10] net/flower: Introduce " Amir Vadai
2016-03-08 10:42 ` Amir Vadai [this message]
2016-03-08 10:42 ` [PATCH net-next V3 03/10] net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef Amir Vadai
2016-03-08 10:42 ` [PATCH net-next V3 04/10] net/act_skbedit: Utility functions for mark action Amir Vadai
2016-03-08 10:42 ` [PATCH net-next V3 05/10] net/mlx5_core: Set flow steering dest only for forward rules Amir Vadai
2016-03-08 10:42 ` [PATCH net-next V3 06/10] net/mlx5e: Relax ndo_setup_tc handle restriction Amir Vadai
2016-03-08 10:42 ` [PATCH net-next V3 07/10] net/mlx5e: Add a new priority for kernel flow tables Amir Vadai
2016-03-08 10:42 ` [PATCH net-next V3 08/10] net/mlx5e: Introduce tc offload support Amir Vadai
2016-03-08 10:42 ` [PATCH net-next V3 09/10] net/mlx5e: Support offload cls_flower with drop action Amir Vadai
2016-03-08 10:42 ` [PATCH net-next V3 10/10] net/mlx5e: Support offload cls_flower with skbedit mark action Amir Vadai
2016-03-10 21:24 ` [PATCH net-next V3 00/10] cls_flower hardware offload support David Miller
2016-05-09 20:31 ` Or Gerlitz
2016-05-10 1:14 ` David Miller
2016-05-10 7:37 ` Or Gerlitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457433758-9193-3-git-send-email-amir@vadai.me \
--to=amir@vadai.me \
--cc=davem@davemloft.net \
--cc=hadarh@mellanox.com \
--cc=jiri@mellanox.com \
--cc=john.r.fastabend@intel.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=ronye@mellanox.com \
--cc=saeedm@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).