mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
eth: igb: migrate to new RXFH callbacks
Migrate to new callbacks added by commit 9bb00786fc ("net: ethtool:
add dedicated callbacks for getting and setting rxfh fields").
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-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
dd610e706f
commit
f148250e35
|
|
@ -2500,9 +2500,11 @@ static int igb_get_ethtool_nfc_all(struct igb_adapter *adapter,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int igb_get_rss_hash_opts(struct igb_adapter *adapter,
|
||||
struct ethtool_rxnfc *cmd)
|
||||
static int igb_get_rxfh_fields(struct net_device *dev,
|
||||
struct ethtool_rxfh_fields *cmd)
|
||||
{
|
||||
struct igb_adapter *adapter = netdev_priv(dev);
|
||||
|
||||
cmd->data = 0;
|
||||
|
||||
/* Report default options for RSS on igb */
|
||||
|
|
@ -2563,9 +2565,6 @@ static int igb_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
|
|||
case ETHTOOL_GRXCLSRLALL:
|
||||
ret = igb_get_ethtool_nfc_all(adapter, cmd, rule_locs);
|
||||
break;
|
||||
case ETHTOOL_GRXFH:
|
||||
ret = igb_get_rss_hash_opts(adapter, cmd);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -2575,9 +2574,11 @@ static int igb_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
|
|||
|
||||
#define UDP_RSS_FLAGS (IGB_FLAG_RSS_FIELD_IPV4_UDP | \
|
||||
IGB_FLAG_RSS_FIELD_IPV6_UDP)
|
||||
static int igb_set_rss_hash_opt(struct igb_adapter *adapter,
|
||||
struct ethtool_rxnfc *nfc)
|
||||
static int igb_set_rxfh_fields(struct net_device *dev,
|
||||
const struct ethtool_rxfh_fields *nfc,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct igb_adapter *adapter = netdev_priv(dev);
|
||||
u32 flags = adapter->flags;
|
||||
|
||||
/* RSS does not support anything other than hashing
|
||||
|
|
@ -3005,9 +3006,6 @@ static int igb_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
|
|||
int ret = -EOPNOTSUPP;
|
||||
|
||||
switch (cmd->cmd) {
|
||||
case ETHTOOL_SRXFH:
|
||||
ret = igb_set_rss_hash_opt(adapter, cmd);
|
||||
break;
|
||||
case ETHTOOL_SRXCLSRLINS:
|
||||
ret = igb_add_ethtool_nfc_entry(adapter, cmd);
|
||||
break;
|
||||
|
|
@ -3485,6 +3483,8 @@ static const struct ethtool_ops igb_ethtool_ops = {
|
|||
.get_rxfh_indir_size = igb_get_rxfh_indir_size,
|
||||
.get_rxfh = igb_get_rxfh,
|
||||
.set_rxfh = igb_set_rxfh,
|
||||
.get_rxfh_fields = igb_get_rxfh_fields,
|
||||
.set_rxfh_fields = igb_set_rxfh_fields,
|
||||
.get_channels = igb_get_channels,
|
||||
.set_channels = igb_set_channels,
|
||||
.get_priv_flags = igb_get_priv_flags,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user