From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org,
ajit.khaparde@broadcom.com, sriharsha.basavapatna@broadcom.com,
somnath.kotur@broadcom.com, shenjian15@huawei.com,
salil.mehta@huawei.com, shaojijie@huawei.com,
cai.huoqing@linux.dev, saeedm@nvidia.com, tariqt@nvidia.com,
louis.peens@corigine.com, mbloch@nvidia.com, manishc@marvell.com,
ecree.xilinx@gmail.com, joe@dama.to,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 07/10] eth: nfp: migrate to new RXFH callbacks
Date: Wed, 18 Jun 2025 13:38:20 -0700 [thread overview]
Message-ID: <20250618203823.1336156-8-kuba@kernel.org> (raw)
In-Reply-To: <20250618203823.1336156-1-kuba@kernel.org>
Migrate to new callbacks added by commit 9bb00786fc61 ("net: ethtool:
add dedicated callbacks for getting and setting rxfh fields").
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
.../ethernet/netronome/nfp/nfp_net_ethtool.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
index fbca8d0efd85..a36215195923 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c
@@ -1303,9 +1303,10 @@ static u32 ethtool_flow_to_nfp_flag(u32 flow_type)
return xlate_ethtool_to_nfp[flow_type];
}
-static int nfp_net_get_rss_hash_opts(struct nfp_net *nn,
- struct ethtool_rxnfc *cmd)
+static int nfp_net_get_rxfh_fields(struct net_device *netdev,
+ struct ethtool_rxfh_fields *cmd)
{
+ struct nfp_net *nn = netdev_priv(netdev);
u32 nfp_rss_flag;
cmd->data = 0;
@@ -1451,16 +1452,16 @@ static int nfp_net_get_rxnfc(struct net_device *netdev,
case ETHTOOL_GRXCLSRLALL:
cmd->data = NFP_FS_MAX_ENTRY;
return nfp_net_get_fs_loc(nn, rule_locs);
- case ETHTOOL_GRXFH:
- return nfp_net_get_rss_hash_opts(nn, cmd);
default:
return -EOPNOTSUPP;
}
}
-static int nfp_net_set_rss_hash_opt(struct nfp_net *nn,
- struct ethtool_rxnfc *nfc)
+static int nfp_net_set_rxfh_fields(struct net_device *netdev,
+ const struct ethtool_rxfh_fields *nfc,
+ struct netlink_ext_ack *extack)
{
+ struct nfp_net *nn = netdev_priv(netdev);
u32 new_rss_cfg = nn->rss_cfg;
u32 nfp_rss_flag;
int err;
@@ -1763,8 +1764,6 @@ static int nfp_net_set_rxnfc(struct net_device *netdev,
struct nfp_net *nn = netdev_priv(netdev);
switch (cmd->cmd) {
- case ETHTOOL_SRXFH:
- return nfp_net_set_rss_hash_opt(nn, cmd);
case ETHTOOL_SRXCLSRLINS:
return nfp_net_fs_add(nn, cmd);
case ETHTOOL_SRXCLSRLDEL:
@@ -2506,6 +2505,8 @@ static const struct ethtool_ops nfp_net_ethtool_ops = {
.get_rxfh_key_size = nfp_net_get_rxfh_key_size,
.get_rxfh = nfp_net_get_rxfh,
.set_rxfh = nfp_net_set_rxfh,
+ .get_rxfh_fields = nfp_net_get_rxfh_fields,
+ .set_rxfh_fields = nfp_net_set_rxfh_fields,
.get_regs_len = nfp_net_get_regs_len,
.get_regs = nfp_net_get_regs,
.set_dump = nfp_app_set_dump,
--
2.49.0
next prev parent reply other threads:[~2025-06-18 20:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 20:38 [PATCH net-next 00/10] eth: finish migration to the new RXFH callbacks Jakub Kicinski
2025-06-18 20:38 ` [PATCH net-next 01/10] eth: sfc: falcon: migrate to " Jakub Kicinski
2025-06-18 20:38 ` [PATCH net-next 02/10] eth: sfc: siena: " Jakub Kicinski
2025-06-18 20:38 ` [PATCH net-next 03/10] eth: sfc: " Jakub Kicinski
2025-06-18 20:38 ` [PATCH net-next 04/10] eth: benet: " Jakub Kicinski
2025-06-20 9:48 ` Simon Horman
2025-06-21 14:55 ` Jakub Kicinski
2025-06-18 20:38 ` [PATCH net-next 05/10] eth: qede: " Jakub Kicinski
2025-06-20 9:49 ` Simon Horman
2025-06-18 20:38 ` [PATCH net-next 06/10] eth: mlx5: " Jakub Kicinski
2025-06-19 14:02 ` Dragos Tatulea
2025-06-18 20:38 ` Jakub Kicinski [this message]
2025-06-19 8:11 ` [PATCH net-next 07/10] eth: nfp: " Louis Peens
2025-06-18 20:38 ` [PATCH net-next 08/10] eth: hinic: " Jakub Kicinski
2025-06-20 9:49 ` Simon Horman
2025-06-18 20:38 ` [PATCH net-next 09/10] eth: hns3: " Jakub Kicinski
2025-06-19 12:44 ` Jijie Shao
2025-06-18 20:38 ` [PATCH net-next 10/10] net: ethtool: don't mux RXFH via rxnfc callbacks Jakub Kicinski
2025-06-20 9:50 ` Simon Horman
2025-06-21 15:10 ` [PATCH net-next 00/10] eth: finish migration to the new RXFH callbacks patchwork-bot+netdevbpf
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=20250618203823.1336156-8-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=ajit.khaparde@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=cai.huoqing@linux.dev \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=joe@dama.to \
--cc=louis.peens@corigine.com \
--cc=manishc@marvell.com \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=salil.mehta@huawei.com \
--cc=shaojijie@huawei.com \
--cc=shenjian15@huawei.com \
--cc=somnath.kotur@broadcom.com \
--cc=sriharsha.basavapatna@broadcom.com \
--cc=tariqt@nvidia.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).