From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Ratheesh Kannoth <rkannoth@marvell.com>
Cc: taras.chornyi@plvision.eu, andrew@lunn.ch,
alexandre.belloni@bootlin.com,
linux-stm32@st-md-mailman.stormreply.com,
simon.horman@corigine.com, jdamato@fastly.com,
kurt@linutronix.de, alexandre.torgue@foss.st.com,
edumazet@google.com, anthony.l.nguyen@intel.com,
ioana.ciornei@nxp.com, gerhard@engleder-embedded.com,
UNGLinuxDriver@microchip.com, horatiu.vultur@microchip.com,
lanhao@huawei.com, louis.peens@corigine.com,
f.fainelli@gmail.com, leon@kernel.org, linux-net-drivers@amd.com,
Steen.Hegelund@microchip.com, jesse.brandeburg@intel.com,
kadlec@netfilter.org, huangguangbin2@huawei.com,
joabreu@synopsys.com, intel-wired-lan@lists.osuosl.org,
linux-arm-kernel@lists.infradead.org, kuba@kernel.org,
d-tatianin@yandex-team.ru, pabeni@redhat.com,
yisen.zhuang@huawei.com, pablo@netfilter.org,
linux-rdma@vger.kernel.org, grygorii.strashko@ti.com,
aelior@marvell.com, daniel.machon@microchip.com,
idosch@nvidia.com, wenjuan.geng@corigine.com,
claudiu.manoil@nxp.com, coreteam@netfilter.org,
habetsm.xilinx@gmail.com, hui.zhou@corigine.com,
peppe.cavallaro@st.com, michael.chan@broadcom.com,
linux-omap@vger.kernel.org, lars.povlsen@microchip.com,
petrm@nvidia.com, zdoychev@maxlinear.com, salil.mehta@huawei.com,
wentao.jia@corigine.com, manishc@marvell.com,
netdev@vger.kernel.org, oss-drivers@corigine.com, fw@strlen.de,
linux-kernel@vger.kernel.org, shenjian15@huawei.com,
ecree.xilinx@gmail.com, netfilter-devel@vger.kernel.org,
shmulik.ladkani@gmail.com, mcoquelin.stm32@gmail.com,
rajur@chelsio.com, olteanv@gmail.com, saeedm@nvidia.com,
davem@davemloft.net
Subject: Re: [Intel-wired-lan] [PATCH v3 net-next] net: flow_dissector: Use 64bits for used_keys
Date: Sat, 29 Jul 2023 03:47:02 +0300 [thread overview]
Message-ID: <20230729004702.oiloyrt3p3x46u7s@skbuf> (raw)
In-Reply-To: <20230728232215.2071351-1-rkannoth@marvell.com> <20230728232215.2071351-1-rkannoth@marvell.com>
On Sat, Jul 29, 2023 at 04:52:15AM +0530, Ratheesh Kannoth wrote:
> 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>
>
> ---
> ChangeLog
>
> v2 -> v3: commit message subject line fix as per comment of Petr Machata
> v1 -> v2: Commit message typo fix.
> v0 -> v1: Fix errors reported by kernel test robot
> ---
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c
> index 2b80fe73549d..8c531f4ec912 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ct_fs_smfs.c
> @@ -221,16 +221,21 @@ mlx5_ct_fs_smfs_destroy(struct mlx5_ct_fs *fs)
> }
>
> static inline bool
> -mlx5_tc_ct_valid_used_dissector_keys(const u32 used_keys)
> +mlx5_tc_ct_valid_used_dissector_keys(const u64 used_keys)
> {
> -#define DISS_BIT(name) BIT(FLOW_DISSECTOR_KEY_ ## name)
> - const u32 basic_keys = DISS_BIT(BASIC) | DISS_BIT(CONTROL) | DISS_BIT(META);
> - const u32 ipv4_tcp = basic_keys | DISS_BIT(IPV4_ADDRS) | DISS_BIT(PORTS) | DISS_BIT(TCP);
> - const u32 ipv6_tcp = basic_keys | DISS_BIT(IPV6_ADDRS) | DISS_BIT(PORTS) | DISS_BIT(TCP);
> - const u32 ipv4_udp = basic_keys | DISS_BIT(IPV4_ADDRS) | DISS_BIT(PORTS);
> - const u32 ipv6_udp = basic_keys | DISS_BIT(IPV6_ADDRS) | DISS_BIT(PORTS);
> - const u32 ipv4_gre = basic_keys | DISS_BIT(IPV4_ADDRS);
> - const u32 ipv6_gre = basic_keys | DISS_BIT(IPV6_ADDRS);
> +#define DISS_BIT(name) BIT_ULL(FLOW_DISSECTOR_KEY_ ## name)
> + const u64 basic_keys = DISS_BIT(BASIC) | DISS_BIT(CONTROL) |
> + DISS_BIT(META);
> + const u64 ipv4_tcp = basic_keys | DISS_BIT(IPV4_ADDRS) |
> + DISS_BIT(PORTS) | DISS_BIT(TCP);
> + const u64 ipv6_tcp = basic_keys | DISS_BIT(IPV6_ADDRS) |
> + DISS_BIT(PORTS) | DISS_BIT(TCP);
> + const u64 ipv4_udp = basic_keys | DISS_BIT(IPV4_ADDRS) |
> + DISS_BIT(PORTS);
> + const u64 ipv6_udp = basic_keys | DISS_BIT(IPV6_ADDRS) |
> + DISS_BIT(PORTS);
> + const u64 ipv4_gre = basic_keys | DISS_BIT(IPV4_ADDRS);
> + const u64 ipv6_gre = basic_keys | DISS_BIT(IPV6_ADDRS);
>
> return (used_keys == ipv4_tcp || used_keys == ipv4_udp || used_keys == ipv6_tcp ||
> used_keys == ipv6_udp || used_keys == ipv4_gre || used_keys == ipv6_gre);
Probably leaving the style alone here, and just changing the types,
would have been a better choice. Anyway...
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2023-07-29 0:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 23:22 [Intel-wired-lan] [PATCH v3 net-next] net: flow_dissector: Use 64bits for used_keys Ratheesh Kannoth
2023-07-29 0:47 ` Vladimir Oltean [this message]
2023-07-31 8:20 ` patchwork-bot+netdevbpf
2023-08-01 13:58 ` Alexander Lobakin
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=20230729004702.oiloyrt3p3x46u7s@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@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=coreteam@netfilter.org \
--cc=d-tatianin@yandex-team.ru \
--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=gerhard@engleder-embedded.com \
--cc=grygorii.strashko@ti.com \
--cc=habetsm.xilinx@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=huangguangbin2@huawei.com \
--cc=hui.zhou@corigine.com \
--cc=idosch@nvidia.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=ioana.ciornei@nxp.com \
--cc=jdamato@fastly.com \
--cc=jesse.brandeburg@intel.com \
--cc=joabreu@synopsys.com \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=lanhao@huawei.com \
--cc=lars.povlsen@microchip.com \
--cc=leon@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net-drivers@amd.com \
--cc=linux-omap@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=louis.peens@corigine.com \
--cc=manishc@marvell.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=oss-drivers@corigine.com \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=peppe.cavallaro@st.com \
--cc=petrm@nvidia.com \
--cc=rajur@chelsio.com \
--cc=rkannoth@marvell.com \
--cc=saeedm@nvidia.com \
--cc=salil.mehta@huawei.com \
--cc=shenjian15@huawei.com \
--cc=shmulik.ladkani@gmail.com \
--cc=simon.horman@corigine.com \
--cc=taras.chornyi@plvision.eu \
--cc=wenjuan.geng@corigine.com \
--cc=wentao.jia@corigine.com \
--cc=yisen.zhuang@huawei.com \
--cc=zdoychev@maxlinear.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox