]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
eth: dpaa: migrate to new RXFH callbacks
authorJakub Kicinski <kuba@kernel.org>
Tue, 17 Jun 2025 01:48:46 +0000 (18:48 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Jun 2025 20:19:00 +0000 (13:19 -0700)
Migrate to new callbacks added by commit 9bb00786fc61 ("net: ethtool:
add dedicated callbacks for getting and setting rxfh fields").

RXFH is all this driver supports in RXNFC so old callbacks are
completely removed.

Reviewed-by: Joe Damato <joe@dama.to>
Link: https://patch.msgid.link/20250617014848.436741-4-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c

index 9986f6e1f5877478df87db152e33fa2127e939a6..0c588e03b15e2f38a1803615b45ae08433b16567 100644 (file)
@@ -263,8 +263,8 @@ static void dpaa_get_strings(struct net_device *net_dev, u32 stringset,
                ethtool_puts(&data, dpaa_stats_global[i]);
 }
 
-static int dpaa_get_hash_opts(struct net_device *dev,
-                             struct ethtool_rxnfc *cmd)
+static int dpaa_get_rxfh_fields(struct net_device *dev,
+                               struct ethtool_rxfh_fields *cmd)
 {
        struct dpaa_priv *priv = netdev_priv(dev);
 
@@ -299,22 +299,6 @@ static int dpaa_get_hash_opts(struct net_device *dev,
        return 0;
 }
 
-static int dpaa_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
-                         u32 *unused)
-{
-       int ret = -EOPNOTSUPP;
-
-       switch (cmd->cmd) {
-       case ETHTOOL_GRXFH:
-               ret = dpaa_get_hash_opts(dev, cmd);
-               break;
-       default:
-               break;
-       }
-
-       return ret;
-}
-
 static void dpaa_set_hash(struct net_device *net_dev, bool enable)
 {
        struct mac_device *mac_dev;
@@ -329,8 +313,9 @@ static void dpaa_set_hash(struct net_device *net_dev, bool enable)
        priv->keygen_in_use = enable;
 }
 
-static int dpaa_set_hash_opts(struct net_device *dev,
-                             struct ethtool_rxnfc *nfc)
+static int dpaa_set_rxfh_fields(struct net_device *dev,
+                               const struct ethtool_rxfh_fields *nfc,
+                               struct netlink_ext_ack *extack)
 {
        int ret = -EINVAL;
 
@@ -364,21 +349,6 @@ static int dpaa_set_hash_opts(struct net_device *dev,
        return ret;
 }
 
-static int dpaa_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
-{
-       int ret = -EOPNOTSUPP;
-
-       switch (cmd->cmd) {
-       case ETHTOOL_SRXFH:
-               ret = dpaa_set_hash_opts(dev, cmd);
-               break;
-       default:
-               break;
-       }
-
-       return ret;
-}
-
 static int dpaa_get_ts_info(struct net_device *net_dev,
                            struct kernel_ethtool_ts_info *info)
 {
@@ -510,8 +480,8 @@ const struct ethtool_ops dpaa_ethtool_ops = {
        .get_strings = dpaa_get_strings,
        .get_link_ksettings = dpaa_get_link_ksettings,
        .set_link_ksettings = dpaa_set_link_ksettings,
-       .get_rxnfc = dpaa_get_rxnfc,
-       .set_rxnfc = dpaa_set_rxnfc,
+       .get_rxfh_fields = dpaa_get_rxfh_fields,
+       .set_rxfh_fields = dpaa_set_rxfh_fields,
        .get_ts_info = dpaa_get_ts_info,
        .get_coalesce = dpaa_get_coalesce,
        .set_coalesce = dpaa_set_coalesce,