summaryrefslogtreecommitdiffstats
path: root/include/net/flow_dissector.h
diff options
context:
space:
mode:
authorTom Herbert <tom@herbertland.com>2015-09-01 09:24:24 -0700
committerDavid S. Miller <davem@davemloft.net>2015-09-01 15:06:22 -0700
commitbcc83839ffdb063dd2b0370cd85c4f825761fc59 (patch)
tree060ce8e2ec5d30607e3bad22a680b225e264143c /include/net/flow_dissector.h
parente5276937ae6e654a811345f0716266f12e77bede (diff)
downloadop-kernel-dev-bcc83839ffdb063dd2b0370cd85c4f825761fc59.zip
op-kernel-dev-bcc83839ffdb063dd2b0370cd85c4f825761fc59.tar.gz
skbuff: Make __skb_set_sw_hash a general function
Move __skb_set_sw_hash to skbuff.h and add __skb_set_hash which is a common method (between __skb_set_sw_hash and skb_set_hash) to set the hash in an skbuff. Also, move skb_clear_hash to be closer to __skb_set_hash. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/flow_dissector.h')
-rw-r--r--include/net/flow_dissector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h
index 6777a84..af76c49 100644
--- a/include/net/flow_dissector.h
+++ b/include/net/flow_dissector.h
@@ -167,4 +167,9 @@ struct flow_keys_digest {
void make_flow_keys_digest(struct flow_keys_digest *digest,
const struct flow_keys *flow);
+static inline bool flow_keys_have_l4(struct flow_keys *keys)
+{
+ return (keys->ports.ports || keys->tags.flow_label);
+}
+
#endif
OpenPOWER on IntegriCloud