[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r0otfhr1.fsf@nvidia.com>
Date: Thu, 27 Jul 2023 18:17:28 +0200
From: Petr Machata <petrm@...dia.com>
To: Ratheesh Kannoth <rkannoth@...vell.com>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<vladimir.oltean@....com>, <claudiu.manoil@....com>,
<alexandre.belloni@...tlin.com>, <andrew@...n.ch>,
<f.fainelli@...il.com>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<olteanv@...il.com>, <michael.chan@...adcom.com>,
<rajur@...lsio.com>, <yisen.zhuang@...wei.com>,
<salil.mehta@...wei.com>, <jesse.brandeburg@...el.com>,
<anthony.l.nguyen@...el.com>, <sgoutham@...vell.com>,
<gakula@...vell.com>, <sbhatta@...vell.com>, <hkelam@...vell.com>,
<taras.chornyi@...ision.eu>, <saeedm@...dia.com>,
<leon@...nel.org>, <idosch@...dia.com>, <petrm@...dia.com>,
<horatiu.vultur@...rochip.com>, <lars.povlsen@...rochip.com>,
<Steen.Hegelund@...rochip.com>, <daniel.machon@...rochip.com>,
<simon.horman@...igine.com>, <aelior@...vell.com>,
<manishc@...vell.com>, <ecree.xilinx@...il.com>,
<habetsm.xilinx@...il.com>, <peppe.cavallaro@...com>,
<alexandre.torgue@...s.st.com>, <joabreu@...opsys.com>,
<mcoquelin.stm32@...il.com>, <pablo@...filter.org>,
<kadlec@...filter.org>, <fw@...len.de>
Subject: Re: [PATCH v1 net-next] dissector: Use 64bits for used_keys
Ratheesh Kannoth <rkannoth@...vell.com> writes:
> As 32bit of dissectory->used_keys are exhausted,
But s/dissectory/dissector/.
Also the subject should probably be:
net: flow_dissector: ...
> increase the size to 64bits.
>
> This is base changes 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@...vell.com>
> 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 */
This unnecessarily adds an extra space before the field name.
> 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,
Powered by blists - more mailing lists