net/flow_dissector: Make dissector_uses_key() and skb_flow_dissector_target() public
authorAmir Vadai <amir@vadai.me>
Tue, 8 Mar 2016 10:42:30 +0000 (12:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Mar 2016 21:24:02 +0000 (16:24 -0500)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/flow_dissector.h
net/core/flow_dissector.c

index 8c8548c..d3d60dc 100644 (file)
@@ -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
index 7c7b873..a669dea 100644 (file)
 #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)