mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
eth: nfp: migrate to new RXFH callbacks
Migrate to new callbacks added by commit 9bb00786fc ("net: ethtool:
add dedicated callbacks for getting and setting rxfh fields").
Acked-by: Louis Peens <louis.peens@corigine.com>
Link: https://patch.msgid.link/20250618203823.1336156-8-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
18f4e3898a
commit
6bfd8cf338
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user