From: Wei Fang <wei.fang@nxp.com>
To: claudiu.manoil@nxp.com, vladimir.oltean@nxp.com,
xiaoning.wang@nxp.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: christophe.leroy@csgroup.eu, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, imx@lists.linux.dev,
linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 net-next 07/13] net: enetc: check if the RSS hfunc is toeplitz
Date: Tue, 4 Mar 2025 15:21:55 +0800 [thread overview]
Message-ID: <20250304072201.1332603-8-wei.fang@nxp.com> (raw)
In-Reply-To: <20250304072201.1332603-1-wei.fang@nxp.com>
Both ENETC v1 and ENETC v4 only support the toeplitz algorithm for RSS,
so add a check for RSS hfunc.
Signed-off-by: Wei Fang <wei.fang@nxp.com>
---
drivers/net/ethernet/freescale/enetc/enetc_ethtool.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
index bc65135925b8..6a47e2bd1d4f 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
@@ -753,6 +753,13 @@ static int enetc_set_rxfh(struct net_device *ndev,
struct enetc_si *si = priv->si;
int err = 0;
+ if (rxfh->hfunc != ETH_RSS_HASH_NO_CHANGE &&
+ rxfh->hfunc != ETH_RSS_HASH_TOP) {
+ netdev_err(ndev, "Only toeplitz hash function is supported\n");
+
+ return -EOPNOTSUPP;
+ }
+
/* set hash key, if PF */
if (rxfh->key && enetc_si_is_pf(si))
enetc_set_rss_key(si, rxfh->key);
--
2.34.1
next prev parent reply other threads:[~2025-03-04 7:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 7:21 [PATCH v3 net-next 00/13] Add more feautues for ENETC v4 - round 2 Wei Fang
2025-03-04 7:21 ` [PATCH v3 net-next 01/13] net: enetc: add initial netc-lib driver to support NTMP Wei Fang
2025-03-06 22:28 ` Jakub Kicinski
2025-03-07 1:47 ` Wei Fang
2025-03-08 2:05 ` Wei Fang
2025-03-08 2:59 ` Jakub Kicinski
2025-03-08 6:58 ` Wei Fang
2025-03-04 7:21 ` [PATCH v3 net-next 02/13] net: enetc: add command BD ring support for i.MX95 ENETC Wei Fang
2025-03-04 7:21 ` [PATCH v3 net-next 03/13] net: enetc: move generic MAC filterng interfaces to enetc-core Wei Fang
2025-03-04 7:21 ` [PATCH v3 net-next 04/13] net: enetc: add MAC filter for i.MX95 ENETC PF Wei Fang
2025-03-06 14:29 ` Paolo Abeni
2025-03-07 1:22 ` Wei Fang
2025-03-04 7:21 ` [PATCH v3 net-next 05/13] net: enetc: add debugfs interface to dump MAC filter Wei Fang
2025-03-04 7:21 ` [PATCH v3 net-next 06/13] net: enetc: add RSS support for i.MX95 ENETC PF Wei Fang
2025-03-06 22:34 ` Jakub Kicinski
2025-03-04 7:21 ` Wei Fang [this message]
2025-03-06 22:35 ` [PATCH v3 net-next 07/13] net: enetc: check if the RSS hfunc is toeplitz Jakub Kicinski
2025-03-04 7:21 ` [PATCH v3 net-next 08/13] net: enetc: enable RSS feature by default Wei Fang
2025-03-04 7:21 ` [PATCH v3 net-next 09/13] net: enetc: move generic VLAN filter interfaces to enetc-core Wei Fang
2025-03-04 7:21 ` [PATCH v3 net-next 10/13] net: enetc: move generic VLAN hash filter functions to enetc_pf_common.c Wei Fang
2025-03-04 7:21 ` [PATCH v3 net-next 11/13] net: enetc: add VLAN filtering support for i.MX95 ENETC PF Wei Fang
2025-03-04 7:22 ` [PATCH v3 net-next 12/13] net: enetc: add loopback " Wei Fang
2025-03-04 7:22 ` [PATCH v3 net-next 13/13] MAINTAINERS: add new file ntmp.h to ENETC driver Wei Fang
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=20250304072201.1332603-8-wei.fang@nxp.com \
--to=wei.fang@nxp.com \
--cc=andrew+netdev@lunn.ch \
--cc=christophe.leroy@csgroup.eu \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=imx@lists.linux.dev \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.com \
--cc=xiaoning.wang@nxp.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;
as well as URLs for NNTP newsgroup(s).