From: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: "Andrew Lunn" <andrew+netdev@lunn.ch>,
"Jakub Kicinski" <kuba@kernel.org>,
davem@davemloft.net, "Eric Dumazet" <edumazet@google.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Russell King" <linux@armlinux.org.uk>,
"Nicolai Buchwitz" <nb@tipi-net.de>,
"Jitendra Vegiraju" <jitendra.vegiraju@broadcom.com>,
thomas.petazzoni@bootlin.com,
"Alexis Lothoré" <alexis.lothore@bootlin.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
"Peter Robinson" <pbrobinson@gmail.com>
Subject: Re: [PATCH net-next v2 1/2] net: stmmac: Introduce a helper to check RSS support
Date: Tue, 29 Sep 2026 09:10:49 +0200 [thread overview]
Message-ID: <artkeRrj8cIntC5Q@lore-desk> (raw)
In-Reply-To: <20260928145043.1228968-2-maxime.chevallier@bootlin.com>
[-- Attachment #1: Type: text/plain, Size: 2470 bytes --]
> The RSS feature is only available in stmmac if the hardware reports it
> through the DMA caps and if the platform glue sets rss_en.
>
> Introduce a helper that checks both.
>
> For now, no platform sets rss_en, but there's interest in the topic so
> leave the door open instead of dropping the feature altogether.
>
> No functional changes intended.
>
> Suggested-by: Nicolai Buchwitz <nb@tipi-net.de>
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Acked-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac.h | 5 +++++
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> index 7582fca63741..e2873d46e049 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h
> @@ -433,6 +433,11 @@ struct timespec64 stmmac_calc_tas_basetime(ktime_t old_base_time,
> ktime_t current_time,
> u64 cycle_time);
>
> +static inline bool stmmac_rss_is_supported(const struct stmmac_priv *priv)
> +{
> + return priv->dma_cap.rssen && priv->plat->rss_en;
> +}
> +
> #if IS_ENABLED(CONFIG_STMMAC_SELFTESTS)
> void stmmac_selftest_run(struct net_device *dev,
> struct ethtool_test *etest, u64 *buf);
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 4dee3542df3b..08feb18d62ba 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -3538,7 +3538,7 @@ static void stmmac_mac_config_rx_queues_routing(struct stmmac_priv *priv)
>
> static void stmmac_mac_config_rss(struct stmmac_priv *priv)
> {
> - if (!priv->dma_cap.rssen || !priv->plat->rss_en) {
> + if (!stmmac_rss_is_supported(priv)) {
> priv->rss.enable = false;
> return;
> }
> @@ -8037,7 +8037,7 @@ static int __stmmac_dvr_probe(struct device *device,
> for (i = 0; i < ARRAY_SIZE(priv->rss.table); i++)
> priv->rss.table[i] = ethtool_rxfh_indir_default(i, rxq);
>
> - if (priv->dma_cap.rssen && priv->plat->rss_en)
> + if (stmmac_rss_is_supported(priv))
> ndev->features |= NETIF_F_RXHASH;
>
> ndev->vlan_features |= ndev->features;
> --
> 2.55.0
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-09-29 7:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 14:50 [PATCH net-next v2 0/2] net: stmmac: Report RSS as not supported Maxime Chevallier
2026-09-28 14:50 ` [PATCH net-next v2 1/2] net: stmmac: Introduce a helper to check RSS support Maxime Chevallier
2026-09-29 0:07 ` Joe Damato
2026-09-29 7:10 ` Lorenzo Bianconi [this message]
2026-09-28 14:50 ` [PATCH net-next v2 2/2] net: stmmac: Don't set or get RSS parameters when not supported Maxime Chevallier
2026-09-29 0:07 ` Joe Damato
2026-09-29 7:13 ` Lorenzo Bianconi
2026-09-29 8:48 ` netdev-bot+sashiko
2026-09-29 8:57 ` Maxime Chevallier
2026-09-30 1:09 ` Jakub Kicinski
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=artkeRrj8cIntC5Q@lore-desk \
--to=lorenzo.bianconi@oss.qualcomm.com \
--cc=alexandre.torgue@foss.st.com \
--cc=alexis.lothore@bootlin.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jitendra.vegiraju@broadcom.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=nb@tipi-net.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pbrobinson@gmail.com \
--cc=thomas.petazzoni@bootlin.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
all inboxes | Powered by JetHome®