public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Petr Machata <petrm@nvidia•com>
To: Ratheesh Kannoth <rkannoth@marvell•com>
Cc: <netdev@vger•kernel.org>, <linux-kernel@vger•kernel.org>,
	<vladimir.oltean@nxp•com>, <claudiu.manoil@nxp•com>,
	<alexandre.belloni@bootlin•com>, <andrew@lunn•ch>,
	<f.fainelli@gmail•com>, <davem@davemloft•net>,
	<edumazet@google•com>, <kuba@kernel•org>, <pabeni@redhat•com>,
	<olteanv@gmail•com>, <michael.chan@broadcom•com>,
	<rajur@chelsio•com>, <yisen.zhuang@huawei•com>,
	<salil.mehta@huawei•com>, <jesse.brandeburg@intel•com>,
	<anthony.l.nguyen@intel•com>, <sgoutham@marvell•com>,
	<gakula@marvell•com>, <sbhatta@marvell•com>, <hkelam@marvell•com>,
	<taras.chornyi@plvision•eu>, <saeedm@nvidia•com>,
	<leon@kernel•org>, <idosch@nvidia•com>, <petrm@nvidia•com>,
	<horatiu.vultur@microchip•com>, <lars.povlsen@microchip•com>,
	<Steen.Hegelund@microchip•com>, <daniel.machon@microchip•com>,
	<simon.horman@corigine•com>, <aelior@marvell•com>,
	<manishc@marvell•com>, <ecree.xilinx@gmail•com>,
	<habetsm.xilinx@gmail•com>, <peppe.cavallaro@st•com>,
	<alexandre.torgue@foss•st.com>, <joabreu@synopsys•com>,
	<mcoquelin.stm32@gmail•com>, <pablo@netfilter•org>,
	<kadlec@netfilter•org>, <fw@strlen•de>
Subject: Re: [PATCH v1 net-next] dissector: Use 64bits for used_keys
Date: Thu, 27 Jul 2023 18:17:28 +0200	[thread overview]
Message-ID: <87r0otfhr1.fsf@nvidia.com> (raw)
In-Reply-To: <20230727062814.2054345-1-rkannoth@marvell.com>


Ratheesh Kannoth <rkannoth@marvell•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@marvell•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,

  parent reply	other threads:[~2023-07-27 16:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27  6:28 [PATCH v1 net-next] dissector: Use 64bits for used_keys Ratheesh Kannoth
2023-07-27 15:54 ` Petr Machata
2023-07-27 16:17 ` Petr Machata [this message]
2023-07-30 12:12 ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0otfhr1.fsf@nvidia.com \
    --to=petrm@nvidia$(echo .)com \
    --cc=Steen.Hegelund@microchip$(echo .)com \
    --cc=aelior@marvell$(echo .)com \
    --cc=alexandre.belloni@bootlin$(echo .)com \
    --cc=alexandre.torgue@foss$(echo .)st.com \
    --cc=andrew@lunn$(echo .)ch \
    --cc=anthony.l.nguyen@intel$(echo .)com \
    --cc=claudiu.manoil@nxp$(echo .)com \
    --cc=daniel.machon@microchip$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=ecree.xilinx@gmail$(echo .)com \
    --cc=edumazet@google$(echo .)com \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=fw@strlen$(echo .)de \
    --cc=gakula@marvell$(echo .)com \
    --cc=habetsm.xilinx@gmail$(echo .)com \
    --cc=hkelam@marvell$(echo .)com \
    --cc=horatiu.vultur@microchip$(echo .)com \
    --cc=idosch@nvidia$(echo .)com \
    --cc=jesse.brandeburg@intel$(echo .)com \
    --cc=joabreu@synopsys$(echo .)com \
    --cc=kadlec@netfilter$(echo .)org \
    --cc=kuba@kernel$(echo .)org \
    --cc=lars.povlsen@microchip$(echo .)com \
    --cc=leon@kernel$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=manishc@marvell$(echo .)com \
    --cc=mcoquelin.stm32@gmail$(echo .)com \
    --cc=michael.chan@broadcom$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=olteanv@gmail$(echo .)com \
    --cc=pabeni@redhat$(echo .)com \
    --cc=pablo@netfilter$(echo .)org \
    --cc=peppe.cavallaro@st$(echo .)com \
    --cc=rajur@chelsio$(echo .)com \
    --cc=rkannoth@marvell$(echo .)com \
    --cc=saeedm@nvidia$(echo .)com \
    --cc=salil.mehta@huawei$(echo .)com \
    --cc=sbhatta@marvell$(echo .)com \
    --cc=sgoutham@marvell$(echo .)com \
    --cc=simon.horman@corigine$(echo .)com \
    --cc=taras.chornyi@plvision$(echo .)eu \
    --cc=vladimir.oltean@nxp$(echo .)com \
    --cc=yisen.zhuang@huawei$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox