]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
eth: cisco: migrate to new RXFH callbacks
authorJakub Kicinski <kuba@kernel.org>
Sat, 14 Jun 2025 18:06:34 +0000 (11:06 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 17 Jun 2025 01:14:25 +0000 (18:14 -0700)
Migrate to new callbacks added by commit 9bb00786fc61 ("net: ethtool:
add dedicated callbacks for getting and setting rxfh fields").
This driver's RXFH config is read only / fixed so the conversion
is trivial.

Reviewed-by: Joe Damato <joe@dama.to>
Link: https://patch.msgid.link/20250614180638.4166766-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cisco/enic/enic_ethtool.c

index 529160926a9633f5e2d60e6842c2fcf07492854b..a50f5dad34d5139c6a8d5c69e66361013b9715e9 100644 (file)
@@ -528,8 +528,10 @@ static int enic_grxclsrule(struct enic *enic, struct ethtool_rxnfc *cmd)
        return 0;
 }
 
-static int enic_get_rx_flow_hash(struct enic *enic, struct ethtool_rxnfc *cmd)
+static int enic_get_rx_flow_hash(struct net_device *dev,
+                                struct ethtool_rxfh_fields *cmd)
 {
+       struct enic *enic = netdev_priv(dev);
        u8 rss_hash_type = 0;
        cmd->data = 0;
 
@@ -597,9 +599,6 @@ static int enic_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
                ret = enic_grxclsrule(enic, cmd);
                spin_unlock_bh(&enic->rfs_h.lock);
                break;
-       case ETHTOOL_GRXFH:
-               ret = enic_get_rx_flow_hash(enic, cmd);
-               break;
        default:
                ret = -EOPNOTSUPP;
                break;
@@ -693,6 +692,7 @@ static const struct ethtool_ops enic_ethtool_ops = {
        .get_rxfh_key_size = enic_get_rxfh_key_size,
        .get_rxfh = enic_get_rxfh,
        .set_rxfh = enic_set_rxfh,
+       .get_rxfh_fields = enic_get_rx_flow_hash,
        .get_link_ksettings = enic_get_ksettings,
        .get_ts_info = enic_get_ts_info,
        .get_channels = enic_get_channels,