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

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.