mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
eth: fm10k: migrate to new RXFH callbacks
Migrate to new callbacks added by commit 9bb00786fc ("net: ethtool:
add dedicated callbacks for getting and setting rxfh fields").
.get callback moves out of the switch and set_rxnfc disappears
as ETHTOOL_SRXFH as the only functionality.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Joe Damato <joe@dama.to>
Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250614180907.4167714-5-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
ecb86e1ff4
commit
5bd68c191a
|
|
@ -691,9 +691,11 @@ static int fm10k_set_coalesce(struct net_device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int fm10k_get_rss_hash_opts(struct fm10k_intfc *interface,
|
||||
struct ethtool_rxnfc *cmd)
|
||||
static int fm10k_get_rssh_fields(struct net_device *dev,
|
||||
struct ethtool_rxfh_fields *cmd)
|
||||
{
|
||||
struct fm10k_intfc *interface = netdev_priv(dev);
|
||||
|
||||
cmd->data = 0;
|
||||
|
||||
/* Report default options for RSS on fm10k */
|
||||
|
|
@ -743,9 +745,6 @@ static int fm10k_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
|
|||
cmd->data = interface->num_rx_queues;
|
||||
ret = 0;
|
||||
break;
|
||||
case ETHTOOL_GRXFH:
|
||||
ret = fm10k_get_rss_hash_opts(interface, cmd);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -753,9 +752,11 @@ static int fm10k_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int fm10k_set_rss_hash_opt(struct fm10k_intfc *interface,
|
||||
struct ethtool_rxnfc *nfc)
|
||||
static int fm10k_set_rssh_fields(struct net_device *dev,
|
||||
const struct ethtool_rxfh_fields *nfc,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct fm10k_intfc *interface = netdev_priv(dev);
|
||||
int rss_ipv4_udp = test_bit(FM10K_FLAG_RSS_FIELD_IPV4_UDP,
|
||||
interface->flags);
|
||||
int rss_ipv6_udp = test_bit(FM10K_FLAG_RSS_FIELD_IPV6_UDP,
|
||||
|
|
@ -871,22 +872,6 @@ static int fm10k_set_rss_hash_opt(struct fm10k_intfc *interface,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int fm10k_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
|
||||
{
|
||||
struct fm10k_intfc *interface = netdev_priv(dev);
|
||||
int ret = -EOPNOTSUPP;
|
||||
|
||||
switch (cmd->cmd) {
|
||||
case ETHTOOL_SRXFH:
|
||||
ret = fm10k_set_rss_hash_opt(interface, cmd);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int fm10k_mbx_test(struct fm10k_intfc *interface, u64 *data)
|
||||
{
|
||||
struct fm10k_hw *hw = &interface->hw;
|
||||
|
|
@ -1176,7 +1161,6 @@ static const struct ethtool_ops fm10k_ethtool_ops = {
|
|||
.get_coalesce = fm10k_get_coalesce,
|
||||
.set_coalesce = fm10k_set_coalesce,
|
||||
.get_rxnfc = fm10k_get_rxnfc,
|
||||
.set_rxnfc = fm10k_set_rxnfc,
|
||||
.get_regs = fm10k_get_regs,
|
||||
.get_regs_len = fm10k_get_regs_len,
|
||||
.self_test = fm10k_self_test,
|
||||
|
|
@ -1186,6 +1170,8 @@ static const struct ethtool_ops fm10k_ethtool_ops = {
|
|||
.get_rxfh_key_size = fm10k_get_rssrk_size,
|
||||
.get_rxfh = fm10k_get_rssh,
|
||||
.set_rxfh = fm10k_set_rssh,
|
||||
.get_rxfh_fields = fm10k_get_rssh_fields,
|
||||
.set_rxfh_fields = fm10k_set_rssh_fields,
|
||||
.get_channels = fm10k_get_channels,
|
||||
.set_channels = fm10k_set_channels,
|
||||
.get_ts_info = ethtool_op_get_ts_info,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user