diff options
author | Ratheesh Kannoth <rkannoth@marvell.com> | 2023-07-29 04:52:15 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-07-31 09:11:24 +0100 |
commit | 2b3082c6ef3b0104d822f6f18d2afbe5fc9a5c2c (patch) | |
tree | f85b41dcc3c1e7a24e0da96c92557d07bf657f60 /include/net/flow_dissector.h | |
parent | 64a37272fa5fb2d951ebd1a96fd42b045d64924c (diff) | |
download | lwn-2b3082c6ef3b0104d822f6f18d2afbe5fc9a5c2c.tar.gz lwn-2b3082c6ef3b0104d822f6f18d2afbe5fc9a5c2c.zip |
net: flow_dissector: Use 64bits for used_keys
As 32bits of dissector->used_keys are exhausted,
increase the size to 64bits.
This is base change for ESP/AH flow dissector patch.
Please find patch and discussions at
https://lore.kernel.org/netdev/ZMDNjD46BvZ5zp5I@corigine.com/T/#t
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
Tested-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Martin Habets <habetsm.xilinx@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.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.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/flow_dissector.h b/include/net/flow_dissector.h index 8664ed4fbbdf..830f06b2f36d 100644 --- a/include/net/flow_dissector.h +++ b/include/net/flow_dissector.h @@ -370,7 +370,8 @@ struct flow_dissector_key { }; struct flow_dissector { - unsigned int used_keys; /* each bit repesents presence of one key id */ + unsigned long long used_keys; + /* each bit represents presence of one key id */ unsigned short int offset[FLOW_DISSECTOR_KEY_MAX]; }; @@ -430,7 +431,7 @@ void skb_flow_get_icmp_tci(const struct sk_buff *skb, 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); + return flow_dissector->used_keys & (1ULL << key_id); } static inline void *skb_flow_dissector_target(struct flow_dissector *flow_dissector, |