netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] eth: migrate more drivers to new RXFH callbacks
@ 2025-06-17  1:48 Jakub Kicinski
  2025-06-17  1:48 ` [PATCH net-next 1/5] eth: niu: migrate " Jakub Kicinski
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Jakub Kicinski @ 2025-06-17  1:48 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, madalin.bucur,
	ioana.ciornei, marcin.s.wojtas, bh74.an, Jakub Kicinski

Migrate a batch of drivers to the recently added dedicated
.get_rxfh_fields and .set_rxfh_fields ethtool callbacks.

Jakub Kicinski (5):
  eth: niu: migrate to new RXFH callbacks
  eth: mvpp2: migrate to new RXFH callbacks
  eth: dpaa: migrate to new RXFH callbacks
  eth: dpaa2: migrate to new RXFH callbacks
  eth: sxgbe: migrate to new RXFH callbacks

 .../net/ethernet/marvell/mvpp2/mvpp2_cls.h    |  6 ++-
 .../ethernet/freescale/dpaa/dpaa_ethtool.c    | 44 +++---------------
 .../ethernet/freescale/dpaa2/dpaa2-ethtool.c  | 36 ++++++++++-----
 .../net/ethernet/marvell/mvpp2/mvpp2_cls.c    |  6 ++-
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   | 31 ++++++++++---
 .../ethernet/samsung/sxgbe/sxgbe_ethtool.c    | 45 +++----------------
 drivers/net/ethernet/sun/niu.c                | 17 +++----
 7 files changed, 80 insertions(+), 105 deletions(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH net-next 1/5] eth: niu: migrate to new RXFH callbacks
  2025-06-17  1:48 [PATCH net-next 0/5] eth: migrate more drivers to new RXFH callbacks Jakub Kicinski
@ 2025-06-17  1:48 ` Jakub Kicinski
  2025-06-17 19:20   ` Joe Damato
  2025-06-17  1:48 ` [PATCH net-next 2/5] eth: mvpp2: " Jakub Kicinski
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Jakub Kicinski @ 2025-06-17  1:48 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, madalin.bucur,
	ioana.ciornei, marcin.s.wojtas, bh74.an, Jakub Kicinski

Migrate to new callbacks added by commit 9bb00786fc61 ("net: ethtool:
add dedicated callbacks for getting and setting rxfh fields").

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 drivers/net/ethernet/sun/niu.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index ddca8fc7883e..75d7e10944d4 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -7077,8 +7077,10 @@ static int niu_ethflow_to_flowkey(u64 ethflow, u64 *flow_key)
 
 }
 
-static int niu_get_hash_opts(struct niu *np, struct ethtool_rxnfc *nfc)
+static int niu_get_rxfh_fields(struct net_device *dev,
+			       struct ethtool_rxfh_fields *nfc)
 {
+	struct niu *np = netdev_priv(dev);
 	u64 class;
 
 	nfc->data = 0;
@@ -7290,9 +7292,6 @@ static int niu_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
 	int ret = 0;
 
 	switch (cmd->cmd) {
-	case ETHTOOL_GRXFH:
-		ret = niu_get_hash_opts(np, cmd);
-		break;
 	case ETHTOOL_GRXRINGS:
 		cmd->data = np->num_rx_rings;
 		break;
@@ -7313,8 +7312,11 @@ static int niu_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
 	return ret;
 }
 
-static int niu_set_hash_opts(struct niu *np, struct ethtool_rxnfc *nfc)
+static int niu_set_rxfh_fields(struct net_device *dev,
+			       const struct ethtool_rxfh_fields *nfc,
+			       struct netlink_ext_ack *extack)
 {
+	struct niu *np = netdev_priv(dev);
 	u64 class;
 	u64 flow_key = 0;
 	unsigned long flags;
@@ -7656,9 +7658,6 @@ static int niu_set_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
 	int ret = 0;
 
 	switch (cmd->cmd) {
-	case ETHTOOL_SRXFH:
-		ret = niu_set_hash_opts(np, cmd);
-		break;
 	case ETHTOOL_SRXCLSRLINS:
 		ret = niu_add_ethtool_tcam_entry(np, cmd);
 		break;
@@ -7912,6 +7911,8 @@ static const struct ethtool_ops niu_ethtool_ops = {
 	.set_phys_id		= niu_set_phys_id,
 	.get_rxnfc		= niu_get_nfc,
 	.set_rxnfc		= niu_set_nfc,
+	.get_rxfh_fields	= niu_get_rxfh_fields,
+	.set_rxfh_fields	= niu_set_rxfh_fields,
 	.get_link_ksettings	= niu_get_link_ksettings,
 	.set_link_ksettings	= niu_set_link_ksettings,
 };
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH net-next 2/5] eth: mvpp2: migrate to new RXFH callbacks
  2025-06-17  1:48 [PATCH net-next 0/5] eth: migrate more drivers to new RXFH callbacks Jakub Kicinski
  2025-06-17  1:48 ` [PATCH net-next 1/5] eth: niu: migrate " Jakub Kicinski
@ 2025-06-17  1:48 ` Jakub Kicinski
  2025-06-17 19:24   ` Joe Damato
  2025-06-17  1:48 ` [PATCH net-next 3/5] eth: dpaa: " Jakub Kicinski
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Jakub Kicinski @ 2025-06-17  1:48 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, madalin.bucur,
	ioana.ciornei, marcin.s.wojtas, bh74.an, Jakub Kicinski

Migrate to new callbacks added by commit 9bb00786fc61 ("net: ethtool:
add dedicated callbacks for getting and setting rxfh fields").

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 .../net/ethernet/marvell/mvpp2/mvpp2_cls.h    |  6 ++--
 .../net/ethernet/marvell/mvpp2/mvpp2_cls.c    |  6 ++--
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   | 31 +++++++++++++++----
 3 files changed, 33 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h
index 85c9c6e80678..caadf3aea95d 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.h
@@ -272,8 +272,10 @@ int mvpp22_port_rss_ctx_indir_set(struct mvpp2_port *port, u32 rss_ctx,
 int mvpp22_port_rss_ctx_indir_get(struct mvpp2_port *port, u32 rss_ctx,
 				  u32 *indir);
 
-int mvpp2_ethtool_rxfh_get(struct mvpp2_port *port, struct ethtool_rxnfc *info);
-int mvpp2_ethtool_rxfh_set(struct mvpp2_port *port, struct ethtool_rxnfc *info);
+int mvpp2_ethtool_rxfh_get(struct mvpp2_port *port,
+			   struct ethtool_rxfh_fields *info);
+int mvpp2_ethtool_rxfh_set(struct mvpp2_port *port,
+			   const struct ethtool_rxfh_fields *info);
 
 void mvpp2_cls_init(struct mvpp2 *priv);
 
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
index 8ed83fb98862..44b201817d94 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
@@ -1618,7 +1618,8 @@ int mvpp22_port_rss_ctx_indir_get(struct mvpp2_port *port, u32 port_ctx,
 	return 0;
 }
 
-int mvpp2_ethtool_rxfh_set(struct mvpp2_port *port, struct ethtool_rxnfc *info)
+int mvpp2_ethtool_rxfh_set(struct mvpp2_port *port,
+			   const struct ethtool_rxfh_fields *info)
 {
 	u16 hash_opts = 0;
 	u32 flow_type;
@@ -1656,7 +1657,8 @@ int mvpp2_ethtool_rxfh_set(struct mvpp2_port *port, struct ethtool_rxnfc *info)
 	return mvpp2_port_rss_hash_opts_set(port, flow_type, hash_opts);
 }
 
-int mvpp2_ethtool_rxfh_get(struct mvpp2_port *port, struct ethtool_rxnfc *info)
+int mvpp2_ethtool_rxfh_get(struct mvpp2_port *port,
+			   struct ethtool_rxfh_fields *info)
 {
 	unsigned long hash_opts;
 	u32 flow_type;
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index a7872d14a49d..8ebb985d2573 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -5588,9 +5588,6 @@ static int mvpp2_ethtool_get_rxnfc(struct net_device *dev,
 		return -EOPNOTSUPP;
 
 	switch (info->cmd) {
-	case ETHTOOL_GRXFH:
-		ret = mvpp2_ethtool_rxfh_get(port, info);
-		break;
 	case ETHTOOL_GRXRINGS:
 		info->data = port->nrxqs;
 		break;
@@ -5628,9 +5625,6 @@ static int mvpp2_ethtool_set_rxnfc(struct net_device *dev,
 		return -EOPNOTSUPP;
 
 	switch (info->cmd) {
-	case ETHTOOL_SRXFH:
-		ret = mvpp2_ethtool_rxfh_set(port, info);
-		break;
 	case ETHTOOL_SRXCLSRLINS:
 		ret = mvpp2_ethtool_cls_rule_ins(port, info);
 		break;
@@ -5747,6 +5741,29 @@ static int mvpp2_ethtool_set_rxfh(struct net_device *dev,
 	return mvpp2_modify_rxfh_context(dev, NULL, rxfh, extack);
 }
 
+static int mvpp2_ethtool_get_rxfh_fields(struct net_device *dev,
+					 struct ethtool_rxfh_fields *info)
+{
+	struct mvpp2_port *port = netdev_priv(dev);
+
+	if (!mvpp22_rss_is_supported(port))
+		return -EOPNOTSUPP;
+
+	return mvpp2_ethtool_rxfh_get(port, info);
+}
+
+static int mvpp2_ethtool_set_rxfh_fields(struct net_device *dev,
+					 const struct ethtool_rxfh_fields *info,
+					 struct netlink_ext_ack *extack)
+{
+	struct mvpp2_port *port = netdev_priv(dev);
+
+	if (!mvpp22_rss_is_supported(port))
+		return -EOPNOTSUPP;
+
+	return mvpp2_ethtool_rxfh_set(port, info);
+}
+
 static int mvpp2_ethtool_get_eee(struct net_device *dev,
 				 struct ethtool_keee *eee)
 {
@@ -5813,6 +5830,8 @@ static const struct ethtool_ops mvpp2_eth_tool_ops = {
 	.get_rxfh_indir_size	= mvpp2_ethtool_get_rxfh_indir_size,
 	.get_rxfh		= mvpp2_ethtool_get_rxfh,
 	.set_rxfh		= mvpp2_ethtool_set_rxfh,
+	.get_rxfh_fields	= mvpp2_ethtool_get_rxfh_fields,
+	.set_rxfh_fields	= mvpp2_ethtool_set_rxfh_fields,
 	.create_rxfh_context	= mvpp2_create_rxfh_context,
 	.modify_rxfh_context	= mvpp2_modify_rxfh_context,
 	.remove_rxfh_context	= mvpp2_remove_rxfh_context,
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH net-next 3/5] eth: dpaa: migrate to new RXFH callbacks
  2025-06-17  1:48 [PATCH net-next 0/5] eth: migrate more drivers to new RXFH callbacks Jakub Kicinski
  2025-06-17  1:48 ` [PATCH net-next 1/5] eth: niu: migrate " Jakub Kicinski
  2025-06-17  1:48 ` [PATCH net-next 2/5] eth: mvpp2: " Jakub Kicinski
@ 2025-06-17  1:48 ` Jakub Kicinski
  2025-06-17 19:26   ` Joe Damato
  2025-06-17  1:48 ` [PATCH net-next 4/5] eth: dpaa2: " Jakub Kicinski
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Jakub Kicinski @ 2025-06-17  1:48 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, madalin.bucur,
	ioana.ciornei, marcin.s.wojtas, bh74.an, Jakub Kicinski

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.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 .../ethernet/freescale/dpaa/dpaa_ethtool.c    | 44 +++----------------
 1 file changed, 7 insertions(+), 37 deletions(-)

diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
index 9986f6e1f587..0c588e03b15e 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
@@ -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,
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH net-next 4/5] eth: dpaa2: migrate to new RXFH callbacks
  2025-06-17  1:48 [PATCH net-next 0/5] eth: migrate more drivers to new RXFH callbacks Jakub Kicinski
                   ` (2 preceding siblings ...)
  2025-06-17  1:48 ` [PATCH net-next 3/5] eth: dpaa: " Jakub Kicinski
@ 2025-06-17  1:48 ` Jakub Kicinski
  2025-06-17 19:27   ` Joe Damato
  2025-06-17  1:48 ` [PATCH net-next 5/5] eth: sxgbe: " Jakub Kicinski
  2025-06-18 20:30 ` [PATCH net-next 0/5] eth: migrate more drivers " patchwork-bot+netdevbpf
  5 siblings, 1 reply; 12+ messages in thread
From: Jakub Kicinski @ 2025-06-17  1:48 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, madalin.bucur,
	ioana.ciornei, marcin.s.wojtas, bh74.an, Jakub Kicinski

Migrate to new callbacks added by commit 9bb00786fc61 ("net: ethtool:
add dedicated callbacks for getting and setting rxfh fields").

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 .../ethernet/freescale/dpaa2/dpaa2-ethtool.c  | 36 ++++++++++++-------
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
index 74ef77cb7078..00474ed11d53 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
@@ -719,13 +719,6 @@ static int dpaa2_eth_get_rxnfc(struct net_device *net_dev,
 	int i, j = 0;
 
 	switch (rxnfc->cmd) {
-	case ETHTOOL_GRXFH:
-		/* we purposely ignore cmd->flow_type for now, because the
-		 * classifier only supports a single set of fields for all
-		 * protocols
-		 */
-		rxnfc->data = priv->rx_hash_fields;
-		break;
 	case ETHTOOL_GRXRINGS:
 		rxnfc->data = dpaa2_eth_queue_count(priv);
 		break;
@@ -767,11 +760,6 @@ static int dpaa2_eth_set_rxnfc(struct net_device *net_dev,
 	int err = 0;
 
 	switch (rxnfc->cmd) {
-	case ETHTOOL_SRXFH:
-		if ((rxnfc->data & DPAA2_RXH_SUPPORTED) != rxnfc->data)
-			return -EOPNOTSUPP;
-		err = dpaa2_eth_set_hash(net_dev, rxnfc->data);
-		break;
 	case ETHTOOL_SRXCLSRLINS:
 		err = dpaa2_eth_update_cls_rule(net_dev, &rxnfc->fs, rxnfc->fs.location);
 		break;
@@ -785,6 +773,28 @@ static int dpaa2_eth_set_rxnfc(struct net_device *net_dev,
 	return err;
 }
 
+static int dpaa2_eth_get_rxfh_fields(struct net_device *net_dev,
+				     struct ethtool_rxfh_fields *rxnfc)
+{
+	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
+
+	/* we purposely ignore cmd->flow_type for now, because the
+	 * classifier only supports a single set of fields for all
+	 * protocols
+	 */
+	rxnfc->data = priv->rx_hash_fields;
+	return 0;
+}
+
+static int dpaa2_eth_set_rxfh_fields(struct net_device *net_dev,
+				     const struct ethtool_rxfh_fields *rxnfc,
+				     struct netlink_ext_ack *extack)
+{
+	if ((rxnfc->data & DPAA2_RXH_SUPPORTED) != rxnfc->data)
+		return -EOPNOTSUPP;
+	return dpaa2_eth_set_hash(net_dev, rxnfc->data);
+}
+
 int dpaa2_phc_index = -1;
 EXPORT_SYMBOL(dpaa2_phc_index);
 
@@ -939,6 +949,8 @@ const struct ethtool_ops dpaa2_ethtool_ops = {
 	.get_strings = dpaa2_eth_get_strings,
 	.get_rxnfc = dpaa2_eth_get_rxnfc,
 	.set_rxnfc = dpaa2_eth_set_rxnfc,
+	.get_rxfh_fields = dpaa2_eth_get_rxfh_fields,
+	.set_rxfh_fields = dpaa2_eth_set_rxfh_fields,
 	.get_ts_info = dpaa2_eth_get_ts_info,
 	.get_tunable = dpaa2_eth_get_tunable,
 	.set_tunable = dpaa2_eth_set_tunable,
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH net-next 5/5] eth: sxgbe: migrate to new RXFH callbacks
  2025-06-17  1:48 [PATCH net-next 0/5] eth: migrate more drivers to new RXFH callbacks Jakub Kicinski
                   ` (3 preceding siblings ...)
  2025-06-17  1:48 ` [PATCH net-next 4/5] eth: dpaa2: " Jakub Kicinski
@ 2025-06-17  1:48 ` Jakub Kicinski
  2025-06-17 19:29   ` Joe Damato
  2025-06-18 20:30 ` [PATCH net-next 0/5] eth: migrate more drivers " patchwork-bot+netdevbpf
  5 siblings, 1 reply; 12+ messages in thread
From: Jakub Kicinski @ 2025-06-17  1:48 UTC (permalink / raw)
  To: davem
  Cc: netdev, edumazet, pabeni, andrew+netdev, horms, madalin.bucur,
	ioana.ciornei, marcin.s.wojtas, bh74.an, Jakub Kicinski

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.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 .../ethernet/samsung/sxgbe/sxgbe_ethtool.c    | 45 +++----------------
 1 file changed, 7 insertions(+), 38 deletions(-)

diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
index 4a439b34114d..ad73733644f9 100644
--- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
+++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
@@ -308,8 +308,8 @@ static int sxgbe_set_coalesce(struct net_device *dev,
 	return 0;
 }
 
-static int sxgbe_get_rss_hash_opts(struct sxgbe_priv_data *priv,
-				   struct ethtool_rxnfc *cmd)
+static int sxgbe_get_rxfh_fields(struct net_device *dev,
+				 struct ethtool_rxfh_fields *cmd)
 {
 	cmd->data = 0;
 
@@ -344,26 +344,11 @@ static int sxgbe_get_rss_hash_opts(struct sxgbe_priv_data *priv,
 	return 0;
 }
 
-static int sxgbe_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
-			   u32 *rule_locs)
+static int sxgbe_set_rxfh_fields(struct net_device *dev,
+				 const struct ethtool_rxfh_fields *cmd,
+				 struct netlink_ext_ack *extack)
 {
 	struct sxgbe_priv_data *priv = netdev_priv(dev);
-	int ret = -EOPNOTSUPP;
-
-	switch (cmd->cmd) {
-	case ETHTOOL_GRXFH:
-		ret = sxgbe_get_rss_hash_opts(priv, cmd);
-		break;
-	default:
-		break;
-	}
-
-	return ret;
-}
-
-static int sxgbe_set_rss_hash_opt(struct sxgbe_priv_data *priv,
-				  struct ethtool_rxnfc *cmd)
-{
 	u32 reg_val = 0;
 
 	/* RSS does not support anything other than hashing
@@ -421,22 +406,6 @@ static int sxgbe_set_rss_hash_opt(struct sxgbe_priv_data *priv,
 	return 0;
 }
 
-static int sxgbe_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
-{
-	struct sxgbe_priv_data *priv = netdev_priv(dev);
-	int ret = -EOPNOTSUPP;
-
-	switch (cmd->cmd) {
-	case ETHTOOL_SRXFH:
-		ret = sxgbe_set_rss_hash_opt(priv, cmd);
-		break;
-	default:
-		break;
-	}
-
-	return ret;
-}
-
 static void sxgbe_get_regs(struct net_device *dev,
 			   struct ethtool_regs *regs, void *space)
 {
@@ -489,8 +458,8 @@ static const struct ethtool_ops sxgbe_ethtool_ops = {
 	.get_channels = sxgbe_get_channels,
 	.get_coalesce = sxgbe_get_coalesce,
 	.set_coalesce = sxgbe_set_coalesce,
-	.get_rxnfc = sxgbe_get_rxnfc,
-	.set_rxnfc = sxgbe_set_rxnfc,
+	.get_rxfh_fields = sxgbe_get_rxfh_fields,
+	.set_rxfh_fields = sxgbe_set_rxfh_fields,
 	.get_regs = sxgbe_get_regs,
 	.get_regs_len = sxgbe_get_regs_len,
 	.get_eee = sxgbe_get_eee,
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH net-next 1/5] eth: niu: migrate to new RXFH callbacks
  2025-06-17  1:48 ` [PATCH net-next 1/5] eth: niu: migrate " Jakub Kicinski
@ 2025-06-17 19:20   ` Joe Damato
  0 siblings, 0 replies; 12+ messages in thread
From: Joe Damato @ 2025-06-17 19:20 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
	madalin.bucur, ioana.ciornei, marcin.s.wojtas, bh74.an

On Mon, Jun 16, 2025 at 06:48:44PM -0700, Jakub Kicinski wrote:
> Migrate to new callbacks added by commit 9bb00786fc61 ("net: ethtool:
> add dedicated callbacks for getting and setting rxfh fields").
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
>  drivers/net/ethernet/sun/niu.c | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)

Reviewed-by: Joe Damato <joe@dama.to>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH net-next 2/5] eth: mvpp2: migrate to new RXFH callbacks
  2025-06-17  1:48 ` [PATCH net-next 2/5] eth: mvpp2: " Jakub Kicinski
@ 2025-06-17 19:24   ` Joe Damato
  0 siblings, 0 replies; 12+ messages in thread
From: Joe Damato @ 2025-06-17 19:24 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
	madalin.bucur, ioana.ciornei, marcin.s.wojtas, bh74.an

On Mon, Jun 16, 2025 at 06:48:45PM -0700, Jakub Kicinski wrote:
> Migrate to new callbacks added by commit 9bb00786fc61 ("net: ethtool:
> add dedicated callbacks for getting and setting rxfh fields").
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
>  .../net/ethernet/marvell/mvpp2/mvpp2_cls.h    |  6 ++--
>  .../net/ethernet/marvell/mvpp2/mvpp2_cls.c    |  6 ++--
>  .../net/ethernet/marvell/mvpp2/mvpp2_main.c   | 31 +++++++++++++++----
>  3 files changed, 33 insertions(+), 10 deletions(-)

Reviewed-by: Joe Damato <joe@dama.to>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH net-next 3/5] eth: dpaa: migrate to new RXFH callbacks
  2025-06-17  1:48 ` [PATCH net-next 3/5] eth: dpaa: " Jakub Kicinski
@ 2025-06-17 19:26   ` Joe Damato
  0 siblings, 0 replies; 12+ messages in thread
From: Joe Damato @ 2025-06-17 19:26 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
	madalin.bucur, ioana.ciornei, marcin.s.wojtas, bh74.an

On Mon, Jun 16, 2025 at 06:48:46PM -0700, Jakub Kicinski wrote:
> 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.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
>  .../ethernet/freescale/dpaa/dpaa_ethtool.c    | 44 +++----------------
>  1 file changed, 7 insertions(+), 37 deletions(-)

Reviewed-by: Joe Damato <joe@dama.to>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH net-next 4/5] eth: dpaa2: migrate to new RXFH callbacks
  2025-06-17  1:48 ` [PATCH net-next 4/5] eth: dpaa2: " Jakub Kicinski
@ 2025-06-17 19:27   ` Joe Damato
  0 siblings, 0 replies; 12+ messages in thread
From: Joe Damato @ 2025-06-17 19:27 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
	madalin.bucur, ioana.ciornei, marcin.s.wojtas, bh74.an

On Mon, Jun 16, 2025 at 06:48:47PM -0700, Jakub Kicinski wrote:
> Migrate to new callbacks added by commit 9bb00786fc61 ("net: ethtool:
> add dedicated callbacks for getting and setting rxfh fields").
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
>  .../ethernet/freescale/dpaa2/dpaa2-ethtool.c  | 36 ++++++++++++-------
>  1 file changed, 24 insertions(+), 12 deletions(-)
> 

Reviewed-by: Joe Damato <joe@dama.to>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH net-next 5/5] eth: sxgbe: migrate to new RXFH callbacks
  2025-06-17  1:48 ` [PATCH net-next 5/5] eth: sxgbe: " Jakub Kicinski
@ 2025-06-17 19:29   ` Joe Damato
  0 siblings, 0 replies; 12+ messages in thread
From: Joe Damato @ 2025-06-17 19:29 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
	madalin.bucur, ioana.ciornei, marcin.s.wojtas, bh74.an

On Mon, Jun 16, 2025 at 06:48:48PM -0700, Jakub Kicinski wrote:
> 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.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
>  .../ethernet/samsung/sxgbe/sxgbe_ethtool.c    | 45 +++----------------
>  1 file changed, 7 insertions(+), 38 deletions(-)
>

Reviewed-by: Joe Damato <joe@dama.to>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH net-next 0/5] eth: migrate more drivers to new RXFH callbacks
  2025-06-17  1:48 [PATCH net-next 0/5] eth: migrate more drivers to new RXFH callbacks Jakub Kicinski
                   ` (4 preceding siblings ...)
  2025-06-17  1:48 ` [PATCH net-next 5/5] eth: sxgbe: " Jakub Kicinski
@ 2025-06-18 20:30 ` patchwork-bot+netdevbpf
  5 siblings, 0 replies; 12+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-18 20:30 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
	madalin.bucur, ioana.ciornei, marcin.s.wojtas, bh74.an

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 16 Jun 2025 18:48:43 -0700 you wrote:
> Migrate a batch of drivers to the recently added dedicated
> .get_rxfh_fields and .set_rxfh_fields ethtool callbacks.
> 
> Jakub Kicinski (5):
>   eth: niu: migrate to new RXFH callbacks
>   eth: mvpp2: migrate to new RXFH callbacks
>   eth: dpaa: migrate to new RXFH callbacks
>   eth: dpaa2: migrate to new RXFH callbacks
>   eth: sxgbe: migrate to new RXFH callbacks
> 
> [...]

Here is the summary with links:
  - [net-next,1/5] eth: niu: migrate to new RXFH callbacks
    https://git.kernel.org/netdev/net-next/c/b82d92dd71cb
  - [net-next,2/5] eth: mvpp2: migrate to new RXFH callbacks
    https://git.kernel.org/netdev/net-next/c/b6f7e4fafe77
  - [net-next,3/5] eth: dpaa: migrate to new RXFH callbacks
    https://git.kernel.org/netdev/net-next/c/17da66f140c2
  - [net-next,4/5] eth: dpaa2: migrate to new RXFH callbacks
    https://git.kernel.org/netdev/net-next/c/20ffe3bbc2ce
  - [net-next,5/5] eth: sxgbe: migrate to new RXFH callbacks
    https://git.kernel.org/netdev/net-next/c/c2cd2f6125bd

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-06-18 20:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-17  1:48 [PATCH net-next 0/5] eth: migrate more drivers to new RXFH callbacks Jakub Kicinski
2025-06-17  1:48 ` [PATCH net-next 1/5] eth: niu: migrate " Jakub Kicinski
2025-06-17 19:20   ` Joe Damato
2025-06-17  1:48 ` [PATCH net-next 2/5] eth: mvpp2: " Jakub Kicinski
2025-06-17 19:24   ` Joe Damato
2025-06-17  1:48 ` [PATCH net-next 3/5] eth: dpaa: " Jakub Kicinski
2025-06-17 19:26   ` Joe Damato
2025-06-17  1:48 ` [PATCH net-next 4/5] eth: dpaa2: " Jakub Kicinski
2025-06-17 19:27   ` Joe Damato
2025-06-17  1:48 ` [PATCH net-next 5/5] eth: sxgbe: " Jakub Kicinski
2025-06-17 19:29   ` Joe Damato
2025-06-18 20:30 ` [PATCH net-next 0/5] eth: migrate more drivers " patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).