From: sashiko-bot@kernel.org
To: "Shradha Gupta" <shradhagupta@linux.microsoft.com>
Cc: linux-hyperv@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH net-next] net: mana: add XDP RX hash metadata
Date: Fri, 04 Dec 2026 11:32:16 +0000 [thread overview]
Message-ID: <sashiko-outbox-249687@kernel.org> (raw)
In-Reply-To: <20261203113055.431519-1-shradhagupta@linux.microsoft.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] net: mana: NDIS_HASH_IPV6 shadows NDIS_HASH_IPV6_EX in
mana_xdp_rss_type()
--
commit a23000e64af6f7600430222158d1aa0f1d0fc454
Author: Shradha Gupta <shradhagupta@linux.microsoft.com>
net: mana: add XDP RX hash metadata
This commit exposes the hardware RSS hash and hash type to XDP programs on
MANA devices via xdp_metadata_ops.
> diff --git a/drivers/net/ethernet/microsoft/mana/mana_bpf.c b/drivers/net/ethernet/microsoft/mana/mana_bpf.c
> index 494267b3069a3..5aec18b1940b3 100644
> --- a/drivers/net/ethernet/microsoft/mana/mana_bpf.c
> +++ b/drivers/net/ethernet/microsoft/mana/mana_bpf.c
> @@ -10,6 +10,54 @@
>
> #include <net/mana/mana.h>
>
> +static enum xdp_rss_hash_type mana_xdp_rss_type(u16 hash_type)
> +{
> + if (hash_type & NDIS_HASH_TCP_IPV4)
> + return XDP_RSS_TYPE_L4_IPV4_TCP;
> + if (hash_type & NDIS_HASH_UDP_IPV4)
> + return XDP_RSS_TYPE_L4_IPV4_UDP;
> + if (hash_type & NDIS_HASH_TCP_IPV6_EX)
> + return XDP_RSS_TYPE_L4_IPV6_TCP_EX;
> + if (hash_type & NDIS_HASH_UDP_IPV6_EX)
> + return XDP_RSS_TYPE_L4_IPV6_UDP_EX;
> + if (hash_type & NDIS_HASH_TCP_IPV6)
> + return XDP_RSS_TYPE_L4_IPV6_TCP;
> + if (hash_type & NDIS_HASH_UDP_IPV6)
> + return XDP_RSS_TYPE_L4_IPV6_UDP;
> + if (hash_type & NDIS_HASH_IPV4)
> + return XDP_RSS_TYPE_L3_IPV4;
> + if (hash_type & NDIS_HASH_IPV6)
> + return XDP_RSS_TYPE_L3_IPV6;
> + if (hash_type & NDIS_HASH_IPV6_EX)
> + return XDP_RSS_TYPE_L3_IPV6_EX;
[Severity: Low]
Should NDIS_HASH_IPV6_EX be checked before NDIS_HASH_IPV6 here?
For L4 IPv6 above, the _EX bits are tested before the base bits. Checking
NDIS_HASH_IPV6 first shadows NDIS_HASH_IPV6_EX whenever both bits are set
in cqe->rx_hashtype, returning XDP_RSS_TYPE_L3_IPV6 and dropping
XDP_RSS_L3_DYNHDR from the hash type reported to XDP programs.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203113055.431519-1-shradhagupta@linux.microsoft.com?part=1
prev parent reply other threads:[~2026-12-04 11:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 11:30 [PATCH net-next] net: mana: add XDP RX hash metadata Shradha Gupta
2026-12-04 10:47 ` Jesper Dangaard Brouer
2026-12-04 11:32 ` sashiko-bot [this message]
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=sashiko-outbox-249687@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shradhagupta@linux.microsoft.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.