mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 06:10:45 -04:00
eth: igc: 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-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -1045,9 +1045,11 @@ static int igc_ethtool_get_nfc_rules(struct igc_adapter *adapter,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int igc_ethtool_get_rss_hash_opts(struct igc_adapter *adapter,
|
||||
struct ethtool_rxnfc *cmd)
|
||||
static int igc_ethtool_get_rxfh_fields(struct net_device *dev,
|
||||
struct ethtool_rxfh_fields *cmd)
|
||||
{
|
||||
struct igc_adapter *adapter = netdev_priv(dev);
|
||||
|
||||
cmd->data = 0;
|
||||
|
||||
/* Report default options for RSS on igc */
|
||||
@@ -1103,8 +1105,6 @@ static int igc_ethtool_get_rxnfc(struct net_device *dev,
|
||||
return igc_ethtool_get_nfc_rule(adapter, cmd);
|
||||
case ETHTOOL_GRXCLSRLALL:
|
||||
return igc_ethtool_get_nfc_rules(adapter, cmd, rule_locs);
|
||||
case ETHTOOL_GRXFH:
|
||||
return igc_ethtool_get_rss_hash_opts(adapter, cmd);
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
@@ -1112,9 +1112,11 @@ static int igc_ethtool_get_rxnfc(struct net_device *dev,
|
||||
|
||||
#define UDP_RSS_FLAGS (IGC_FLAG_RSS_FIELD_IPV4_UDP | \
|
||||
IGC_FLAG_RSS_FIELD_IPV6_UDP)
|
||||
static int igc_ethtool_set_rss_hash_opt(struct igc_adapter *adapter,
|
||||
struct ethtool_rxnfc *nfc)
|
||||
static int igc_ethtool_set_rxfh_fields(struct net_device *dev,
|
||||
const struct ethtool_rxfh_fields *nfc,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct igc_adapter *adapter = netdev_priv(dev);
|
||||
u32 flags = adapter->flags;
|
||||
|
||||
/* RSS does not support anything other than hashing
|
||||
@@ -1425,8 +1427,6 @@ static int igc_ethtool_set_rxnfc(struct net_device *dev,
|
||||
struct igc_adapter *adapter = netdev_priv(dev);
|
||||
|
||||
switch (cmd->cmd) {
|
||||
case ETHTOOL_SRXFH:
|
||||
return igc_ethtool_set_rss_hash_opt(adapter, cmd);
|
||||
case ETHTOOL_SRXCLSRLINS:
|
||||
return igc_ethtool_add_nfc_rule(adapter, cmd);
|
||||
case ETHTOOL_SRXCLSRLDEL:
|
||||
@@ -2144,6 +2144,8 @@ static const struct ethtool_ops igc_ethtool_ops = {
|
||||
.get_rxfh_indir_size = igc_ethtool_get_rxfh_indir_size,
|
||||
.get_rxfh = igc_ethtool_get_rxfh,
|
||||
.set_rxfh = igc_ethtool_set_rxfh,
|
||||
.get_rxfh_fields = igc_ethtool_get_rxfh_fields,
|
||||
.set_rxfh_fields = igc_ethtool_set_rxfh_fields,
|
||||
.get_ts_info = igc_ethtool_get_ts_info,
|
||||
.get_channels = igc_ethtool_get_channels,
|
||||
.set_channels = igc_ethtool_set_channels,
|
||||
|
||||
Reference in New Issue
Block a user