diff options
author | Florian Westphal <fw@strlen.de> | 2024-06-09 00:10:40 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-06-12 14:33:38 -0700 |
commit | d1dab4f71d372e00e2d34a9c32bf261623e3a95c (patch) | |
tree | 75f6dda28ad47e21ce91e564a90e198ffad5b409 /include/linux/skbuff.h | |
parent | b975d3ee5962237c1e2f5d5aeeaaf0dc2173486c (diff) | |
download | linux-d1dab4f71d372e00e2d34a9c32bf261623e3a95c.tar.gz linux-d1dab4f71d372e00e2d34a9c32bf261623e3a95c.tar.bz2 linux-d1dab4f71d372e00e2d34a9c32bf261623e3a95c.zip |
net: add and use __skb_get_hash_symmetric_net
Similar to previous patch: apply same logic for
__skb_get_hash_symmetric and let callers pass the netns to the dissector
core.
Existing function is turned into a wrapper to avoid adjusting all
callers, nft_hash.c uses new function.
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20240608221057.16070-3-fw@strlen.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 6e78019f899a..813406a9bd6c 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -1498,8 +1498,14 @@ __skb_set_sw_hash(struct sk_buff *skb, __u32 hash, bool is_l4) __skb_set_hash(skb, hash, true, is_l4); } +u32 __skb_get_hash_symmetric_net(const struct net *net, const struct sk_buff *skb); + +static inline u32 __skb_get_hash_symmetric(const struct sk_buff *skb) +{ + return __skb_get_hash_symmetric_net(NULL, skb); +} + void __skb_get_hash_net(const struct net *net, struct sk_buff *skb); -u32 __skb_get_hash_symmetric(const struct sk_buff *skb); u32 skb_get_poff(const struct sk_buff *skb); u32 __skb_get_poff(const struct sk_buff *skb, const void *data, const struct flow_keys_basic *keys, int hlen); |