* [PATCH net-next 1/8] i40e: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 [PATCH net-next 0/8] net: intel: migrate to .get_rx_ring_count() ethtool callback Breno Leitao
@ 2025-11-24 18:19 ` Breno Leitao
2025-11-25 3:48 ` Jakub Kicinski
2025-11-25 6:50 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-11-24 18:19 ` [PATCH net-next 2/8] iavf: " Breno Leitao
` (6 subsequent siblings)
7 siblings, 2 replies; 21+ messages in thread
From: Breno Leitao @ 2025-11-24 18:19 UTC (permalink / raw)
To: aleksander.lobakin, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski, michal.kubiak, maciej.fijalkowski,
intel-wired-lan, netdev, linux-kernel, kernel-team, Breno Leitao
Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
optimize RX ring queries") added specific support for GRXRINGS callback,
simplifying .get_rxnfc.
Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
.get_rx_ring_count().
This simplifies the RX ring count retrieval and aligns i40e with the new
ethtool API for querying RX ring parameters.
Signed-off-by: Breno Leitao <leitao@debian.org>
---
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 86c72596617a..64d0797f5f5e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -3521,6 +3521,20 @@ static int i40e_get_ethtool_fdir_entry(struct i40e_pf *pf,
return 0;
}
+/**
+ * i40e_get_rx_ring_count - get RX ring count
+ * @netdev: network interface device structure
+ *
+ * Returns the number of RX rings.
+ **/
+static u32 i40e_get_rx_ring_count(struct net_device *netdev)
+{
+ struct i40e_netdev_priv *np = netdev_priv(netdev);
+ struct i40e_vsi *vsi = np->vsi;
+
+ return vsi->rss_size;
+}
+
/**
* i40e_get_rxnfc - command to get RX flow classification rules
* @netdev: network interface device structure
@@ -3538,10 +3552,6 @@ static int i40e_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
int ret = -EOPNOTSUPP;
switch (cmd->cmd) {
- case ETHTOOL_GRXRINGS:
- cmd->data = vsi->rss_size;
- ret = 0;
- break;
case ETHTOOL_GRXCLSRLCNT:
cmd->rule_cnt = pf->fdir_pf_active_filters;
/* report total rule count */
@@ -5819,6 +5829,7 @@ static const struct ethtool_ops i40e_ethtool_ops = {
.set_msglevel = i40e_set_msglevel,
.get_rxnfc = i40e_get_rxnfc,
.set_rxnfc = i40e_set_rxnfc,
+ .get_rx_ring_count = i40e_get_rx_ring_count,
.self_test = i40e_diag_test,
.get_strings = i40e_get_strings,
.get_eee = i40e_get_eee,
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread* Re: [PATCH net-next 1/8] i40e: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 ` [PATCH net-next 1/8] i40e: extract GRXRINGS from .get_rxnfc Breno Leitao
@ 2025-11-25 3:48 ` Jakub Kicinski
2025-11-25 9:21 ` Breno Leitao
2025-11-25 6:50 ` [Intel-wired-lan] " Loktionov, Aleksandr
1 sibling, 1 reply; 21+ messages in thread
From: Jakub Kicinski @ 2025-11-25 3:48 UTC (permalink / raw)
To: Breno Leitao
Cc: aleksander.lobakin, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Paolo Abeni, michal.swiatkowski,
michal.kubiak, maciej.fijalkowski, intel-wired-lan, netdev,
linux-kernel, kernel-team
On Mon, 24 Nov 2025 10:19:05 -0800 Breno Leitao wrote:
> + * Returns the number of RX rings.
I suspect you used this format because the rest of the driver does,
but let's avoid adding new kdoc warnings. I think Andy is trying
to clean up the "Returns" vs "Return:" in Intel drivers..
drivers/net/ethernet/intel/i40e/i40e_ethtool.c:3530 No description found for return value of 'i40e_get_rx_ring_count'
(similar warnings to first 4 patches of the series)
--
pw-bot: cr
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH net-next 1/8] i40e: extract GRXRINGS from .get_rxnfc
2025-11-25 3:48 ` Jakub Kicinski
@ 2025-11-25 9:21 ` Breno Leitao
0 siblings, 0 replies; 21+ messages in thread
From: Breno Leitao @ 2025-11-25 9:21 UTC (permalink / raw)
To: Jakub Kicinski
Cc: aleksander.lobakin, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Paolo Abeni, michal.swiatkowski,
michal.kubiak, maciej.fijalkowski, intel-wired-lan, netdev,
linux-kernel, kernel-team
Hello Jakub,
On Mon, Nov 24, 2025 at 07:48:23PM -0800, Jakub Kicinski wrote:
> On Mon, 24 Nov 2025 10:19:05 -0800 Breno Leitao wrote:
> > + * Returns the number of RX rings.
>
> I suspect you used this format because the rest of the driver does,
Correct. I have jsut followed the other kdoc format in the code.
> but let's avoid adding new kdoc warnings. I think Andy is trying
> to clean up the "Returns" vs "Return:" in Intel drivers..
>
> drivers/net/ethernet/intel/i40e/i40e_ethtool.c:3530 No description found for return value of 'i40e_get_rx_ring_count'
>
> (similar warnings to first 4 patches of the series)
Ack! I will get them fixed.
Thanks for the review,
--breno
^ permalink raw reply [flat|nested] 21+ messages in thread
* RE: [Intel-wired-lan] [PATCH net-next 1/8] i40e: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 ` [PATCH net-next 1/8] i40e: extract GRXRINGS from .get_rxnfc Breno Leitao
2025-11-25 3:48 ` Jakub Kicinski
@ 2025-11-25 6:50 ` Loktionov, Aleksandr
1 sibling, 0 replies; 21+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-25 6:50 UTC (permalink / raw)
To: Breno Leitao, Lobakin, Aleksander, Nguyen, Anthony L,
Kitszel, Przemyslaw, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski@linux.intel.com, michal.kubiak@intel.com,
Fijalkowski, Maciej, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Breno Leitao
> Sent: Monday, November 24, 2025 7:19 PM
> To: Lobakin, Aleksander <aleksander.lobakin@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>; David
> S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub
> Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>
> Cc: michal.swiatkowski@linux.intel.com; michal.kubiak@intel.com;
> Fijalkowski, Maciej <maciej.fijalkowski@intel.com>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> kernel-team@meta.com; Breno Leitao <leitao@debian.org>
> Subject: [Intel-wired-lan] [PATCH net-next 1/8] i40e: extract GRXRINGS from
> .get_rxnfc
>
> Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
> optimize RX ring queries") added specific support for GRXRINGS callback,
> simplifying .get_rxnfc.
>
> Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
> .get_rx_ring_count().
>
> This simplifies the RX ring count retrieval and aligns i40e with the new
> ethtool API for querying RX ring parameters.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> index 86c72596617a..64d0797f5f5e 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
> @@ -3521,6 +3521,20 @@ static int i40e_get_ethtool_fdir_entry(struct i40e_pf
> *pf,
> return 0;
> }
>
> +/**
> + * i40e_get_rx_ring_count - get RX ring count
> + * @netdev: network interface device structure
> + *
> + * Returns the number of RX rings.
> + **/
> +static u32 i40e_get_rx_ring_count(struct net_device *netdev) {
> + struct i40e_netdev_priv *np = netdev_priv(netdev);
> + struct i40e_vsi *vsi = np->vsi;
> +
> + return vsi->rss_size;
> +}
> +
> /**
> * i40e_get_rxnfc - command to get RX flow classification rules
> * @netdev: network interface device structure @@ -3538,10 +3552,6 @@
> static int i40e_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc
> *cmd,
> int ret = -EOPNOTSUPP;
>
> switch (cmd->cmd) {
> - case ETHTOOL_GRXRINGS:
> - cmd->data = vsi->rss_size;
> - ret = 0;
> - break;
> case ETHTOOL_GRXCLSRLCNT:
> cmd->rule_cnt = pf->fdir_pf_active_filters;
> /* report total rule count */
> @@ -5819,6 +5829,7 @@ static const struct ethtool_ops i40e_ethtool_ops = {
> .set_msglevel = i40e_set_msglevel,
> .get_rxnfc = i40e_get_rxnfc,
> .set_rxnfc = i40e_set_rxnfc,
> + .get_rx_ring_count = i40e_get_rx_ring_count,
> .self_test = i40e_diag_test,
> .get_strings = i40e_get_strings,
> .get_eee = i40e_get_eee,
>
> --
> 2.47.3
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH net-next 2/8] iavf: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 [PATCH net-next 0/8] net: intel: migrate to .get_rx_ring_count() ethtool callback Breno Leitao
2025-11-24 18:19 ` [PATCH net-next 1/8] i40e: extract GRXRINGS from .get_rxnfc Breno Leitao
@ 2025-11-24 18:19 ` Breno Leitao
2025-11-25 6:50 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-11-24 18:19 ` [PATCH net-next 3/8] ice: " Breno Leitao
` (5 subsequent siblings)
7 siblings, 1 reply; 21+ messages in thread
From: Breno Leitao @ 2025-11-24 18:19 UTC (permalink / raw)
To: aleksander.lobakin, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski, michal.kubiak, maciej.fijalkowski,
intel-wired-lan, netdev, linux-kernel, kernel-team, Breno Leitao
Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
optimize RX ring queries") added specific support for GRXRINGS callback,
simplifying .get_rxnfc.
Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
.get_rx_ring_count().
This simplifies the RX ring count retrieval and aligns iavf with the new
ethtool API for querying RX ring parameters.
Signed-off-by: Breno Leitao <leitao@debian.org>
---
drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
index a3f8ced23266..08ff90e73803 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
@@ -1638,6 +1638,19 @@ static int iavf_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd)
return ret;
}
+/**
+ * iavf_get_rx_ring_count - get RX ring count
+ * @netdev: network interface device structure
+ *
+ * Returns the number of RX rings.
+ **/
+static u32 iavf_get_rx_ring_count(struct net_device *netdev)
+{
+ struct iavf_adapter *adapter = netdev_priv(netdev);
+
+ return adapter->num_active_queues;
+}
+
/**
* iavf_get_rxnfc - command to get RX flow classification rules
* @netdev: network interface device structure
@@ -1653,10 +1666,6 @@ static int iavf_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
int ret = -EOPNOTSUPP;
switch (cmd->cmd) {
- case ETHTOOL_GRXRINGS:
- cmd->data = adapter->num_active_queues;
- ret = 0;
- break;
case ETHTOOL_GRXCLSRLCNT:
if (!(adapter->flags & IAVF_FLAG_FDIR_ENABLED))
break;
@@ -1866,6 +1875,7 @@ static const struct ethtool_ops iavf_ethtool_ops = {
.set_per_queue_coalesce = iavf_set_per_queue_coalesce,
.set_rxnfc = iavf_set_rxnfc,
.get_rxnfc = iavf_get_rxnfc,
+ .get_rx_ring_count = iavf_get_rx_ring_count,
.get_rxfh_indir_size = iavf_get_rxfh_indir_size,
.get_rxfh = iavf_get_rxfh,
.set_rxfh = iavf_set_rxfh,
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread* RE: [Intel-wired-lan] [PATCH net-next 2/8] iavf: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 ` [PATCH net-next 2/8] iavf: " Breno Leitao
@ 2025-11-25 6:50 ` Loktionov, Aleksandr
0 siblings, 0 replies; 21+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-25 6:50 UTC (permalink / raw)
To: Breno Leitao, Lobakin, Aleksander, Nguyen, Anthony L,
Kitszel, Przemyslaw, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski@linux.intel.com, michal.kubiak@intel.com,
Fijalkowski, Maciej, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Breno Leitao
> Sent: Monday, November 24, 2025 7:19 PM
> To: Lobakin, Aleksander <aleksander.lobakin@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>; David
> S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub
> Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>
> Cc: michal.swiatkowski@linux.intel.com; michal.kubiak@intel.com;
> Fijalkowski, Maciej <maciej.fijalkowski@intel.com>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> kernel-team@meta.com; Breno Leitao <leitao@debian.org>
> Subject: [Intel-wired-lan] [PATCH net-next 2/8] iavf: extract GRXRINGS from
> .get_rxnfc
>
> Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
> optimize RX ring queries") added specific support for GRXRINGS callback,
> simplifying .get_rxnfc.
>
> Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
> .get_rx_ring_count().
>
> This simplifies the RX ring count retrieval and aligns iavf with the new
> ethtool API for querying RX ring parameters.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 18 ++++++++++++++----
> 1 file changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
> b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
> index a3f8ced23266..08ff90e73803 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
> @@ -1638,6 +1638,19 @@ static int iavf_set_rxnfc(struct net_device *netdev,
> struct ethtool_rxnfc *cmd)
> return ret;
> }
>
> +/**
> + * iavf_get_rx_ring_count - get RX ring count
> + * @netdev: network interface device structure
> + *
> + * Returns the number of RX rings.
> + **/
> +static u32 iavf_get_rx_ring_count(struct net_device *netdev) {
> + struct iavf_adapter *adapter = netdev_priv(netdev);
> +
> + return adapter->num_active_queues;
> +}
> +
> /**
> * iavf_get_rxnfc - command to get RX flow classification rules
> * @netdev: network interface device structure @@ -1653,10 +1666,6 @@
> static int iavf_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc
> *cmd,
> int ret = -EOPNOTSUPP;
>
> switch (cmd->cmd) {
> - case ETHTOOL_GRXRINGS:
> - cmd->data = adapter->num_active_queues;
> - ret = 0;
> - break;
> case ETHTOOL_GRXCLSRLCNT:
> if (!(adapter->flags & IAVF_FLAG_FDIR_ENABLED))
> break;
> @@ -1866,6 +1875,7 @@ static const struct ethtool_ops iavf_ethtool_ops = {
> .set_per_queue_coalesce = iavf_set_per_queue_coalesce,
> .set_rxnfc = iavf_set_rxnfc,
> .get_rxnfc = iavf_get_rxnfc,
> + .get_rx_ring_count = iavf_get_rx_ring_count,
> .get_rxfh_indir_size = iavf_get_rxfh_indir_size,
> .get_rxfh = iavf_get_rxfh,
> .set_rxfh = iavf_set_rxfh,
>
> --
> 2.47.3
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH net-next 3/8] ice: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 [PATCH net-next 0/8] net: intel: migrate to .get_rx_ring_count() ethtool callback Breno Leitao
2025-11-24 18:19 ` [PATCH net-next 1/8] i40e: extract GRXRINGS from .get_rxnfc Breno Leitao
2025-11-24 18:19 ` [PATCH net-next 2/8] iavf: " Breno Leitao
@ 2025-11-24 18:19 ` Breno Leitao
2025-11-25 6:49 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-11-24 18:19 ` [PATCH net-next 4/8] idpf: " Breno Leitao
` (4 subsequent siblings)
7 siblings, 1 reply; 21+ messages in thread
From: Breno Leitao @ 2025-11-24 18:19 UTC (permalink / raw)
To: aleksander.lobakin, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski, michal.kubiak, maciej.fijalkowski,
intel-wired-lan, netdev, linux-kernel, kernel-team, Breno Leitao
Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
optimize RX ring queries") added specific support for GRXRINGS callback,
simplifying .get_rxnfc.
Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
.get_rx_ring_count().
This simplifies the RX ring count retrieval and aligns ice with the new
ethtool API for querying RX ring parameters.
Signed-off-by: Breno Leitao <leitao@debian.org>
---
drivers/net/ethernet/intel/ice/ice_ethtool.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index a1d9abee97e5..adb6e10ccb1b 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -3083,6 +3083,20 @@ static int ice_set_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd)
return -EOPNOTSUPP;
}
+/**
+ * ice_get_rx_ring_count - get RX ring count
+ * @netdev: network interface device structure
+ *
+ * Returns the number of RX rings.
+ */
+static u32 ice_get_rx_ring_count(struct net_device *netdev)
+{
+ struct ice_netdev_priv *np = netdev_priv(netdev);
+ struct ice_vsi *vsi = np->vsi;
+
+ return vsi->rss_size;
+}
+
/**
* ice_get_rxnfc - command to get Rx flow classification rules
* @netdev: network interface device structure
@@ -3103,10 +3117,6 @@ ice_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
hw = &vsi->back->hw;
switch (cmd->cmd) {
- case ETHTOOL_GRXRINGS:
- cmd->data = vsi->rss_size;
- ret = 0;
- break;
case ETHTOOL_GRXCLSRLCNT:
cmd->rule_cnt = hw->fdir_active_fltr;
/* report total rule count */
@@ -4853,6 +4863,7 @@ static const struct ethtool_ops ice_ethtool_ops = {
.get_sset_count = ice_get_sset_count,
.get_rxnfc = ice_get_rxnfc,
.set_rxnfc = ice_set_rxnfc,
+ .get_rx_ring_count = ice_get_rx_ring_count,
.get_ringparam = ice_get_ringparam,
.set_ringparam = ice_set_ringparam,
.nway_reset = ice_nway_reset,
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread* RE: [Intel-wired-lan] [PATCH net-next 3/8] ice: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 ` [PATCH net-next 3/8] ice: " Breno Leitao
@ 2025-11-25 6:49 ` Loktionov, Aleksandr
0 siblings, 0 replies; 21+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-25 6:49 UTC (permalink / raw)
To: Breno Leitao, Lobakin, Aleksander, Nguyen, Anthony L,
Kitszel, Przemyslaw, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski@linux.intel.com, michal.kubiak@intel.com,
Fijalkowski, Maciej, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Breno Leitao
> Sent: Monday, November 24, 2025 7:19 PM
> To: Lobakin, Aleksander <aleksander.lobakin@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>; David
> S. Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub
> Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>
> Cc: michal.swiatkowski@linux.intel.com; michal.kubiak@intel.com;
> Fijalkowski, Maciej <maciej.fijalkowski@intel.com>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> kernel-team@meta.com; Breno Leitao <leitao@debian.org>
> Subject: [Intel-wired-lan] [PATCH net-next 3/8] ice: extract GRXRINGS from
> .get_rxnfc
>
> Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
> optimize RX ring queries") added specific support for GRXRINGS callback,
> simplifying .get_rxnfc.
>
> Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
> .get_rx_ring_count().
>
> This simplifies the RX ring count retrieval and aligns ice with the new
> ethtool API for querying RX ring parameters.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> drivers/net/ethernet/intel/ice/ice_ethtool.c | 19 +++++++++++++++----
> 1 file changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> index a1d9abee97e5..adb6e10ccb1b 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> @@ -3083,6 +3083,20 @@ static int ice_set_rxnfc(struct net_device *netdev,
> struct ethtool_rxnfc *cmd)
> return -EOPNOTSUPP;
> }
>
> +/**
> + * ice_get_rx_ring_count - get RX ring count
> + * @netdev: network interface device structure
> + *
> + * Returns the number of RX rings.
> + */
> +static u32 ice_get_rx_ring_count(struct net_device *netdev) {
> + struct ice_netdev_priv *np = netdev_priv(netdev);
> + struct ice_vsi *vsi = np->vsi;
> +
> + return vsi->rss_size;
> +}
> +
> /**
> * ice_get_rxnfc - command to get Rx flow classification rules
> * @netdev: network interface device structure @@ -3103,10 +3117,6 @@
> ice_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
> hw = &vsi->back->hw;
>
> switch (cmd->cmd) {
> - case ETHTOOL_GRXRINGS:
> - cmd->data = vsi->rss_size;
> - ret = 0;
> - break;
> case ETHTOOL_GRXCLSRLCNT:
> cmd->rule_cnt = hw->fdir_active_fltr;
> /* report total rule count */
> @@ -4853,6 +4863,7 @@ static const struct ethtool_ops ice_ethtool_ops = {
> .get_sset_count = ice_get_sset_count,
> .get_rxnfc = ice_get_rxnfc,
> .set_rxnfc = ice_set_rxnfc,
> + .get_rx_ring_count = ice_get_rx_ring_count,
> .get_ringparam = ice_get_ringparam,
> .set_ringparam = ice_set_ringparam,
> .nway_reset = ice_nway_reset,
>
> --
> 2.47.3
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH net-next 4/8] idpf: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 [PATCH net-next 0/8] net: intel: migrate to .get_rx_ring_count() ethtool callback Breno Leitao
` (2 preceding siblings ...)
2025-11-24 18:19 ` [PATCH net-next 3/8] ice: " Breno Leitao
@ 2025-11-24 18:19 ` Breno Leitao
2025-11-25 6:48 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-11-25 6:49 ` Loktionov, Aleksandr
2025-11-24 18:19 ` [PATCH net-next 5/8] igb: " Breno Leitao
` (3 subsequent siblings)
7 siblings, 2 replies; 21+ messages in thread
From: Breno Leitao @ 2025-11-24 18:19 UTC (permalink / raw)
To: aleksander.lobakin, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski, michal.kubiak, maciej.fijalkowski,
intel-wired-lan, netdev, linux-kernel, kernel-team, Breno Leitao
Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
optimize RX ring queries") added specific support for GRXRINGS callback,
simplifying .get_rxnfc.
Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
.get_rx_ring_count().
This simplifies the RX ring count retrieval and aligns idpf with the new
ethtool API for querying RX ring parameters.
I was not totatly convinced I needed to have the lock, but, I decided to
be on the safe side and get the exact same behaviour it was before.
Signed-off-by: Breno Leitao <leitao@debian.org>
---
drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
index a5a1eec9ade8..1b21747b8b13 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
@@ -5,6 +5,25 @@
#include "idpf_ptp.h"
#include "idpf_virtchnl.h"
+/**
+ * idpf_get_rx_ring_count - get RX ring count
+ * @netdev: network interface device structure
+ *
+ * Returns the number of RX rings.
+ */
+static u32 idpf_get_rx_ring_count(struct net_device *netdev)
+{
+ struct idpf_vport *vport;
+ u32 num_rxq;
+
+ idpf_vport_ctrl_lock(netdev);
+ vport = idpf_netdev_to_vport(netdev);
+ num_rxq = vport->num_rxq;
+ idpf_vport_ctrl_unlock(netdev);
+
+ return num_rxq;
+}
+
/**
* idpf_get_rxnfc - command to get RX flow classification rules
* @netdev: network interface device structure
@@ -28,9 +47,6 @@ static int idpf_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
user_config = &np->adapter->vport_config[np->vport_idx]->user_config;
switch (cmd->cmd) {
- case ETHTOOL_GRXRINGS:
- cmd->data = vport->num_rxq;
- break;
case ETHTOOL_GRXCLSRLCNT:
cmd->rule_cnt = user_config->num_fsteer_fltrs;
cmd->data = idpf_fsteer_max_rules(vport);
@@ -1757,6 +1773,7 @@ static const struct ethtool_ops idpf_ethtool_ops = {
.get_channels = idpf_get_channels,
.get_rxnfc = idpf_get_rxnfc,
.set_rxnfc = idpf_set_rxnfc,
+ .get_rx_ring_count = idpf_get_rx_ring_count,
.get_rxfh_key_size = idpf_get_rxfh_key_size,
.get_rxfh_indir_size = idpf_get_rxfh_indir_size,
.get_rxfh = idpf_get_rxfh,
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread* RE: [Intel-wired-lan] [PATCH net-next 4/8] idpf: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 ` [PATCH net-next 4/8] idpf: " Breno Leitao
@ 2025-11-25 6:48 ` Loktionov, Aleksandr
2025-11-25 9:22 ` Breno Leitao
2025-11-25 6:49 ` Loktionov, Aleksandr
1 sibling, 1 reply; 21+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-25 6:48 UTC (permalink / raw)
To: Breno Leitao, Lobakin, Aleksander, Nguyen, Anthony L,
Kitszel, Przemyslaw, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski@linux.intel.com, michal.kubiak@intel.com,
Fijalkowski, Maciej, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Breno Leitao
> Sent: Monday, November 24, 2025 7:19 PM
> To: Lobakin, Aleksander <aleksander.lobakin@intel.com>; Nguyen,
> Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>;
> David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>
> Cc: michal.swiatkowski@linux.intel.com; michal.kubiak@intel.com;
> Fijalkowski, Maciej <maciej.fijalkowski@intel.com>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; kernel-team@meta.com; Breno Leitao
> <leitao@debian.org>
> Subject: [Intel-wired-lan] [PATCH net-next 4/8] idpf: extract GRXRINGS
> from .get_rxnfc
>
> Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
> optimize RX ring queries") added specific support for GRXRINGS
> callback, simplifying .get_rxnfc.
>
> Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the
> new .get_rx_ring_count().
>
> This simplifies the RX ring count retrieval and aligns idpf with the
> new ethtool API for querying RX ring parameters.
>
> I was not totatly convinced I needed to have the lock, but, I decided
totatly -> totally
With the best regards
Alex
...
^ permalink raw reply [flat|nested] 21+ messages in thread* Re: [Intel-wired-lan] [PATCH net-next 4/8] idpf: extract GRXRINGS from .get_rxnfc
2025-11-25 6:48 ` [Intel-wired-lan] " Loktionov, Aleksandr
@ 2025-11-25 9:22 ` Breno Leitao
0 siblings, 0 replies; 21+ messages in thread
From: Breno Leitao @ 2025-11-25 9:22 UTC (permalink / raw)
To: Loktionov, Aleksandr
Cc: Lobakin, Aleksander, Nguyen, Anthony L, Kitszel, Przemyslaw,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, michal.swiatkowski@linux.intel.com,
michal.kubiak@intel.com, Fijalkowski, Maciej,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-team@meta.com
Hello Alex,
On Tue, Nov 25, 2025 at 06:48:08AM +0000, Loktionov, Aleksandr wrote:
>
>
> > -----Original Message-----
> > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> > Of Breno Leitao
> > Sent: Monday, November 24, 2025 7:19 PM
> > To: Lobakin, Aleksander <aleksander.lobakin@intel.com>; Nguyen,
> > Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> > <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>;
> > David S. Miller <davem@davemloft.net>; Eric Dumazet
> > <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> > <pabeni@redhat.com>
> > Cc: michal.swiatkowski@linux.intel.com; michal.kubiak@intel.com;
> > Fijalkowski, Maciej <maciej.fijalkowski@intel.com>; intel-wired-
> > lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> > kernel@vger.kernel.org; kernel-team@meta.com; Breno Leitao
> > <leitao@debian.org>
> > Subject: [Intel-wired-lan] [PATCH net-next 4/8] idpf: extract GRXRINGS
> > from .get_rxnfc
> >
> > Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
> > optimize RX ring queries") added specific support for GRXRINGS
> > callback, simplifying .get_rxnfc.
> >
> > Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the
> > new .get_rx_ring_count().
> >
> > This simplifies the RX ring count retrieval and aligns idpf with the
> > new ethtool API for querying RX ring parameters.
> >
> > I was not totatly convinced I needed to have the lock, but, I decided
>
> totatly -> totally
Good catch, I will update and respin with your "Signed-off-by".
Thanks for the review,
--breno
^ permalink raw reply [flat|nested] 21+ messages in thread
* RE: [Intel-wired-lan] [PATCH net-next 4/8] idpf: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 ` [PATCH net-next 4/8] idpf: " Breno Leitao
2025-11-25 6:48 ` [Intel-wired-lan] " Loktionov, Aleksandr
@ 2025-11-25 6:49 ` Loktionov, Aleksandr
1 sibling, 0 replies; 21+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-25 6:49 UTC (permalink / raw)
To: Breno Leitao, Lobakin, Aleksander, Nguyen, Anthony L,
Kitszel, Przemyslaw, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski@linux.intel.com, michal.kubiak@intel.com,
Fijalkowski, Maciej, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Breno Leitao
> Sent: Monday, November 24, 2025 7:19 PM
> To: Lobakin, Aleksander <aleksander.lobakin@intel.com>; Nguyen,
> Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>;
> David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>
> Cc: michal.swiatkowski@linux.intel.com; michal.kubiak@intel.com;
> Fijalkowski, Maciej <maciej.fijalkowski@intel.com>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; kernel-team@meta.com; Breno Leitao
> <leitao@debian.org>
> Subject: [Intel-wired-lan] [PATCH net-next 4/8] idpf: extract GRXRINGS
> from .get_rxnfc
>
> Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
> optimize RX ring queries") added specific support for GRXRINGS
> callback, simplifying .get_rxnfc.
>
> Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the
> new .get_rx_ring_count().
>
> This simplifies the RX ring count retrieval and aligns idpf with the
> new ethtool API for querying RX ring parameters.
>
> I was not totatly convinced I needed to have the lock, but, I decided
> to be on the safe side and get the exact same behaviour it was before.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> drivers/net/ethernet/intel/idpf/idpf_ethtool.c | 23
> ++++++++++++++++++++---
> 1 file changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
> b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
> index a5a1eec9ade8..1b21747b8b13 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_ethtool.c
> @@ -5,6 +5,25 @@
> #include "idpf_ptp.h"
> #include "idpf_virtchnl.h"
>
> +/**
> + * idpf_get_rx_ring_count - get RX ring count
> + * @netdev: network interface device structure
> + *
> + * Returns the number of RX rings.
> + */
> +static u32 idpf_get_rx_ring_count(struct net_device *netdev) {
> + struct idpf_vport *vport;
> + u32 num_rxq;
> +
> + idpf_vport_ctrl_lock(netdev);
> + vport = idpf_netdev_to_vport(netdev);
> + num_rxq = vport->num_rxq;
> + idpf_vport_ctrl_unlock(netdev);
> +
> + return num_rxq;
> +}
> +
> /**
> * idpf_get_rxnfc - command to get RX flow classification rules
> * @netdev: network interface device structure @@ -28,9 +47,6 @@
> static int idpf_get_rxnfc(struct net_device *netdev, struct
> ethtool_rxnfc *cmd,
> user_config = &np->adapter->vport_config[np->vport_idx]-
> >user_config;
>
> switch (cmd->cmd) {
> - case ETHTOOL_GRXRINGS:
> - cmd->data = vport->num_rxq;
> - break;
> case ETHTOOL_GRXCLSRLCNT:
> cmd->rule_cnt = user_config->num_fsteer_fltrs;
> cmd->data = idpf_fsteer_max_rules(vport); @@ -1757,6
> +1773,7 @@ static const struct ethtool_ops idpf_ethtool_ops = {
> .get_channels = idpf_get_channels,
> .get_rxnfc = idpf_get_rxnfc,
> .set_rxnfc = idpf_set_rxnfc,
> + .get_rx_ring_count = idpf_get_rx_ring_count,
> .get_rxfh_key_size = idpf_get_rxfh_key_size,
> .get_rxfh_indir_size = idpf_get_rxfh_indir_size,
> .get_rxfh = idpf_get_rxfh,
>
> --
> 2.47.3
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH net-next 5/8] igb: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 [PATCH net-next 0/8] net: intel: migrate to .get_rx_ring_count() ethtool callback Breno Leitao
` (3 preceding siblings ...)
2025-11-24 18:19 ` [PATCH net-next 4/8] idpf: " Breno Leitao
@ 2025-11-24 18:19 ` Breno Leitao
2025-11-25 6:49 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-11-24 18:19 ` [PATCH net-next 6/8] igc: " Breno Leitao
` (2 subsequent siblings)
7 siblings, 1 reply; 21+ messages in thread
From: Breno Leitao @ 2025-11-24 18:19 UTC (permalink / raw)
To: aleksander.lobakin, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski, michal.kubiak, maciej.fijalkowski,
intel-wired-lan, netdev, linux-kernel, kernel-team, Breno Leitao
Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
optimize RX ring queries") added specific support for GRXRINGS callback,
simplifying .get_rxnfc.
Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
.get_rx_ring_count().
This simplifies the RX ring count retrieval and aligns igb with the new
ethtool API for querying RX ring parameters.
Signed-off-by: Breno Leitao <leitao@debian.org>
---
drivers/net/ethernet/intel/igb/igb_ethtool.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 10e2445e0ded..b507576b28b2 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -2541,6 +2541,13 @@ static int igb_get_rxfh_fields(struct net_device *dev,
return 0;
}
+static u32 igb_get_rx_ring_count(struct net_device *dev)
+{
+ struct igb_adapter *adapter = netdev_priv(dev);
+
+ return adapter->num_rx_queues;
+}
+
static int igb_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
u32 *rule_locs)
{
@@ -2548,10 +2555,6 @@ static int igb_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
int ret = -EOPNOTSUPP;
switch (cmd->cmd) {
- case ETHTOOL_GRXRINGS:
- cmd->data = adapter->num_rx_queues;
- ret = 0;
- break;
case ETHTOOL_GRXCLSRLCNT:
cmd->rule_cnt = adapter->nfc_filter_count;
ret = 0;
@@ -3473,6 +3476,7 @@ static const struct ethtool_ops igb_ethtool_ops = {
.get_ts_info = igb_get_ts_info,
.get_rxnfc = igb_get_rxnfc,
.set_rxnfc = igb_set_rxnfc,
+ .get_rx_ring_count = igb_get_rx_ring_count,
.get_eee = igb_get_eee,
.set_eee = igb_set_eee,
.get_module_info = igb_get_module_info,
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread* RE: [Intel-wired-lan] [PATCH net-next 5/8] igb: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 ` [PATCH net-next 5/8] igb: " Breno Leitao
@ 2025-11-25 6:49 ` Loktionov, Aleksandr
0 siblings, 0 replies; 21+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-25 6:49 UTC (permalink / raw)
To: Breno Leitao, Lobakin, Aleksander, Nguyen, Anthony L,
Kitszel, Przemyslaw, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski@linux.intel.com, michal.kubiak@intel.com,
Fijalkowski, Maciej, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Breno Leitao
> Sent: Monday, November 24, 2025 7:19 PM
> To: Lobakin, Aleksander <aleksander.lobakin@intel.com>; Nguyen,
> Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>;
> David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>
> Cc: michal.swiatkowski@linux.intel.com; michal.kubiak@intel.com;
> Fijalkowski, Maciej <maciej.fijalkowski@intel.com>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; kernel-team@meta.com; Breno Leitao
> <leitao@debian.org>
> Subject: [Intel-wired-lan] [PATCH net-next 5/8] igb: extract GRXRINGS
> from .get_rxnfc
>
> Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
> optimize RX ring queries") added specific support for GRXRINGS
> callback, simplifying .get_rxnfc.
>
> Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the
> new .get_rx_ring_count().
>
> This simplifies the RX ring count retrieval and aligns igb with the
> new ethtool API for querying RX ring parameters.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> drivers/net/ethernet/intel/igb/igb_ethtool.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c
> b/drivers/net/ethernet/intel/igb/igb_ethtool.c
> index 10e2445e0ded..b507576b28b2 100644
> --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
> +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
> @@ -2541,6 +2541,13 @@ static int igb_get_rxfh_fields(struct
> net_device *dev,
> return 0;
> }
>
> +static u32 igb_get_rx_ring_count(struct net_device *dev) {
> + struct igb_adapter *adapter = netdev_priv(dev);
> +
> + return adapter->num_rx_queues;
> +}
> +
> static int igb_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc
> *cmd,
> u32 *rule_locs)
> {
> @@ -2548,10 +2555,6 @@ static int igb_get_rxnfc(struct net_device
> *dev, struct ethtool_rxnfc *cmd,
> int ret = -EOPNOTSUPP;
>
> switch (cmd->cmd) {
> - case ETHTOOL_GRXRINGS:
> - cmd->data = adapter->num_rx_queues;
> - ret = 0;
> - break;
> case ETHTOOL_GRXCLSRLCNT:
> cmd->rule_cnt = adapter->nfc_filter_count;
> ret = 0;
> @@ -3473,6 +3476,7 @@ static const struct ethtool_ops igb_ethtool_ops
> = {
> .get_ts_info = igb_get_ts_info,
> .get_rxnfc = igb_get_rxnfc,
> .set_rxnfc = igb_set_rxnfc,
> + .get_rx_ring_count = igb_get_rx_ring_count,
> .get_eee = igb_get_eee,
> .set_eee = igb_set_eee,
> .get_module_info = igb_get_module_info,
>
> --
> 2.47.3
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH net-next 6/8] igc: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 [PATCH net-next 0/8] net: intel: migrate to .get_rx_ring_count() ethtool callback Breno Leitao
` (4 preceding siblings ...)
2025-11-24 18:19 ` [PATCH net-next 5/8] igb: " Breno Leitao
@ 2025-11-24 18:19 ` Breno Leitao
2025-11-25 6:49 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-11-24 18:19 ` [PATCH net-next 7/8] ixgbevf: " Breno Leitao
2025-11-24 18:19 ` [PATCH net-next 8/8] fm10k: " Breno Leitao
7 siblings, 1 reply; 21+ messages in thread
From: Breno Leitao @ 2025-11-24 18:19 UTC (permalink / raw)
To: aleksander.lobakin, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski, michal.kubiak, maciej.fijalkowski,
intel-wired-lan, netdev, linux-kernel, kernel-team, Breno Leitao
Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
optimize RX ring queries") added specific support for GRXRINGS callback,
simplifying .get_rxnfc.
Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
.get_rx_ring_count().
This simplifies the RX ring count retrieval and aligns igc with the new
ethtool API for querying RX ring parameters.
Signed-off-by: Breno Leitao <leitao@debian.org>
---
drivers/net/ethernet/intel/igc/igc_ethtool.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c
index bb783042d1af..e94c1922b97a 100644
--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
+++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
@@ -1091,15 +1091,19 @@ static int igc_ethtool_get_rxfh_fields(struct net_device *dev,
return 0;
}
+static u32 igc_ethtool_get_rx_ring_count(struct net_device *dev)
+{
+ struct igc_adapter *adapter = netdev_priv(dev);
+
+ return adapter->num_rx_queues;
+}
+
static int igc_ethtool_get_rxnfc(struct net_device *dev,
struct ethtool_rxnfc *cmd, u32 *rule_locs)
{
struct igc_adapter *adapter = netdev_priv(dev);
switch (cmd->cmd) {
- case ETHTOOL_GRXRINGS:
- cmd->data = adapter->num_rx_queues;
- return 0;
case ETHTOOL_GRXCLSRLCNT:
cmd->rule_cnt = adapter->nfc_rule_count;
return 0;
@@ -2170,6 +2174,7 @@ static const struct ethtool_ops igc_ethtool_ops = {
.set_coalesce = igc_ethtool_set_coalesce,
.get_rxnfc = igc_ethtool_get_rxnfc,
.set_rxnfc = igc_ethtool_set_rxnfc,
+ .get_rx_ring_count = igc_ethtool_get_rx_ring_count,
.get_rxfh_indir_size = igc_ethtool_get_rxfh_indir_size,
.get_rxfh = igc_ethtool_get_rxfh,
.set_rxfh = igc_ethtool_set_rxfh,
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread* RE: [Intel-wired-lan] [PATCH net-next 6/8] igc: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 ` [PATCH net-next 6/8] igc: " Breno Leitao
@ 2025-11-25 6:49 ` Loktionov, Aleksandr
0 siblings, 0 replies; 21+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-25 6:49 UTC (permalink / raw)
To: Breno Leitao, Lobakin, Aleksander, Nguyen, Anthony L,
Kitszel, Przemyslaw, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski@linux.intel.com, michal.kubiak@intel.com,
Fijalkowski, Maciej, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Breno Leitao
> Sent: Monday, November 24, 2025 7:19 PM
> To: Lobakin, Aleksander <aleksander.lobakin@intel.com>; Nguyen,
> Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>;
> David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>
> Cc: michal.swiatkowski@linux.intel.com; michal.kubiak@intel.com;
> Fijalkowski, Maciej <maciej.fijalkowski@intel.com>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; kernel-team@meta.com; Breno Leitao
> <leitao@debian.org>
> Subject: [Intel-wired-lan] [PATCH net-next 6/8] igc: extract GRXRINGS
> from .get_rxnfc
>
> Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
> optimize RX ring queries") added specific support for GRXRINGS
> callback, simplifying .get_rxnfc.
>
> Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the
> new .get_rx_ring_count().
>
> This simplifies the RX ring count retrieval and aligns igc with the
> new ethtool API for querying RX ring parameters.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> drivers/net/ethernet/intel/igc/igc_ethtool.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c
> b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> index bb783042d1af..e94c1922b97a 100644
> --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c
> +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c
> @@ -1091,15 +1091,19 @@ static int igc_ethtool_get_rxfh_fields(struct
> net_device *dev,
> return 0;
> }
>
> +static u32 igc_ethtool_get_rx_ring_count(struct net_device *dev) {
> + struct igc_adapter *adapter = netdev_priv(dev);
> +
> + return adapter->num_rx_queues;
> +}
> +
> static int igc_ethtool_get_rxnfc(struct net_device *dev,
> struct ethtool_rxnfc *cmd, u32 *rule_locs)
> {
> struct igc_adapter *adapter = netdev_priv(dev);
>
> switch (cmd->cmd) {
> - case ETHTOOL_GRXRINGS:
> - cmd->data = adapter->num_rx_queues;
> - return 0;
> case ETHTOOL_GRXCLSRLCNT:
> cmd->rule_cnt = adapter->nfc_rule_count;
> return 0;
> @@ -2170,6 +2174,7 @@ static const struct ethtool_ops igc_ethtool_ops
> = {
> .set_coalesce = igc_ethtool_set_coalesce,
> .get_rxnfc = igc_ethtool_get_rxnfc,
> .set_rxnfc = igc_ethtool_set_rxnfc,
> + .get_rx_ring_count = igc_ethtool_get_rx_ring_count,
> .get_rxfh_indir_size = igc_ethtool_get_rxfh_indir_size,
> .get_rxfh = igc_ethtool_get_rxfh,
> .set_rxfh = igc_ethtool_set_rxfh,
>
> --
> 2.47.3
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH net-next 7/8] ixgbevf: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 [PATCH net-next 0/8] net: intel: migrate to .get_rx_ring_count() ethtool callback Breno Leitao
` (5 preceding siblings ...)
2025-11-24 18:19 ` [PATCH net-next 6/8] igc: " Breno Leitao
@ 2025-11-24 18:19 ` Breno Leitao
2025-11-25 6:48 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-11-24 18:19 ` [PATCH net-next 8/8] fm10k: " Breno Leitao
7 siblings, 1 reply; 21+ messages in thread
From: Breno Leitao @ 2025-11-24 18:19 UTC (permalink / raw)
To: aleksander.lobakin, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski, michal.kubiak, maciej.fijalkowski,
intel-wired-lan, netdev, linux-kernel, kernel-team, Breno Leitao
Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
optimize RX ring queries") added specific support for GRXRINGS callback,
simplifying .get_rxnfc.
Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
.get_rx_ring_count().
This simplifies the RX ring count retrieval and aligns ixgbevf with the new
ethtool API for querying RX ring parameters.
Signed-off-by: Breno Leitao <leitao@debian.org>
---
drivers/net/ethernet/intel/ixgbevf/ethtool.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ethtool.c b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
index bebad564188e..537a60d5276f 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
@@ -867,19 +867,11 @@ static int ixgbevf_set_coalesce(struct net_device *netdev,
return 0;
}
-static int ixgbevf_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
- u32 *rules __always_unused)
+static u32 ixgbevf_get_rx_ring_count(struct net_device *dev)
{
struct ixgbevf_adapter *adapter = netdev_priv(dev);
- switch (info->cmd) {
- case ETHTOOL_GRXRINGS:
- info->data = adapter->num_rx_queues;
- return 0;
- default:
- hw_dbg(&adapter->hw, "Command parameters not supported\n");
- return -EOPNOTSUPP;
- }
+ return adapter->num_rx_queues;
}
static u32 ixgbevf_get_rxfh_indir_size(struct net_device *netdev)
@@ -987,7 +979,7 @@ static const struct ethtool_ops ixgbevf_ethtool_ops = {
.get_ethtool_stats = ixgbevf_get_ethtool_stats,
.get_coalesce = ixgbevf_get_coalesce,
.set_coalesce = ixgbevf_set_coalesce,
- .get_rxnfc = ixgbevf_get_rxnfc,
+ .get_rx_ring_count = ixgbevf_get_rx_ring_count,
.get_rxfh_indir_size = ixgbevf_get_rxfh_indir_size,
.get_rxfh_key_size = ixgbevf_get_rxfh_key_size,
.get_rxfh = ixgbevf_get_rxfh,
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread* RE: [Intel-wired-lan] [PATCH net-next 7/8] ixgbevf: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 ` [PATCH net-next 7/8] ixgbevf: " Breno Leitao
@ 2025-11-25 6:48 ` Loktionov, Aleksandr
0 siblings, 0 replies; 21+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-25 6:48 UTC (permalink / raw)
To: Breno Leitao, Lobakin, Aleksander, Nguyen, Anthony L,
Kitszel, Przemyslaw, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski@linux.intel.com, michal.kubiak@intel.com,
Fijalkowski, Maciej, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Breno Leitao
> Sent: Monday, November 24, 2025 7:19 PM
> To: Lobakin, Aleksander <aleksander.lobakin@intel.com>; Nguyen,
> Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>;
> David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>
> Cc: michal.swiatkowski@linux.intel.com; michal.kubiak@intel.com;
> Fijalkowski, Maciej <maciej.fijalkowski@intel.com>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; kernel-team@meta.com; Breno Leitao
> <leitao@debian.org>
> Subject: [Intel-wired-lan] [PATCH net-next 7/8] ixgbevf: extract
> GRXRINGS from .get_rxnfc
>
> Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
> optimize RX ring queries") added specific support for GRXRINGS
> callback, simplifying .get_rxnfc.
>
> Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the
> new .get_rx_ring_count().
>
> This simplifies the RX ring count retrieval and aligns ixgbevf with
> the new ethtool API for querying RX ring parameters.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> drivers/net/ethernet/intel/ixgbevf/ethtool.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbevf/ethtool.c
> b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
> index bebad564188e..537a60d5276f 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/ethtool.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
> @@ -867,19 +867,11 @@ static int ixgbevf_set_coalesce(struct
> net_device *netdev,
> return 0;
> }
>
> -static int ixgbevf_get_rxnfc(struct net_device *dev, struct
> ethtool_rxnfc *info,
> - u32 *rules __always_unused)
> +static u32 ixgbevf_get_rx_ring_count(struct net_device *dev)
> {
> struct ixgbevf_adapter *adapter = netdev_priv(dev);
>
> - switch (info->cmd) {
> - case ETHTOOL_GRXRINGS:
> - info->data = adapter->num_rx_queues;
> - return 0;
> - default:
> - hw_dbg(&adapter->hw, "Command parameters not
> supported\n");
> - return -EOPNOTSUPP;
> - }
> + return adapter->num_rx_queues;
> }
>
> static u32 ixgbevf_get_rxfh_indir_size(struct net_device *netdev) @@
> -987,7 +979,7 @@ static const struct ethtool_ops ixgbevf_ethtool_ops =
> {
> .get_ethtool_stats = ixgbevf_get_ethtool_stats,
> .get_coalesce = ixgbevf_get_coalesce,
> .set_coalesce = ixgbevf_set_coalesce,
> - .get_rxnfc = ixgbevf_get_rxnfc,
> + .get_rx_ring_count = ixgbevf_get_rx_ring_count,
> .get_rxfh_indir_size = ixgbevf_get_rxfh_indir_size,
> .get_rxfh_key_size = ixgbevf_get_rxfh_key_size,
> .get_rxfh = ixgbevf_get_rxfh,
>
> --
> 2.47.3
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH net-next 8/8] fm10k: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 [PATCH net-next 0/8] net: intel: migrate to .get_rx_ring_count() ethtool callback Breno Leitao
` (6 preceding siblings ...)
2025-11-24 18:19 ` [PATCH net-next 7/8] ixgbevf: " Breno Leitao
@ 2025-11-24 18:19 ` Breno Leitao
2025-11-25 6:49 ` [Intel-wired-lan] " Loktionov, Aleksandr
7 siblings, 1 reply; 21+ messages in thread
From: Breno Leitao @ 2025-11-24 18:19 UTC (permalink / raw)
To: aleksander.lobakin, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski, michal.kubiak, maciej.fijalkowski,
intel-wired-lan, netdev, linux-kernel, kernel-team, Breno Leitao
Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
optimize RX ring queries") added specific support for GRXRINGS callback,
simplifying .get_rxnfc.
Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the new
.get_rx_ring_count().
This simplifies the RX ring count retrieval and aligns fm10k with the new
ethtool API for querying RX ring parameters.
Signed-off-by: Breno Leitao <leitao@debian.org>
---
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
index bf2029144c1d..76e42abca965 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -734,22 +734,11 @@ static int fm10k_get_rssh_fields(struct net_device *dev,
return 0;
}
-static int fm10k_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
- u32 __always_unused *rule_locs)
+static u32 fm10k_get_rx_ring_count(struct net_device *dev)
{
struct fm10k_intfc *interface = netdev_priv(dev);
- int ret = -EOPNOTSUPP;
- switch (cmd->cmd) {
- case ETHTOOL_GRXRINGS:
- cmd->data = interface->num_rx_queues;
- ret = 0;
- break;
- default:
- break;
- }
-
- return ret;
+ return interface->num_rx_queues;
}
static int fm10k_set_rssh_fields(struct net_device *dev,
@@ -1160,7 +1149,7 @@ static const struct ethtool_ops fm10k_ethtool_ops = {
.set_ringparam = fm10k_set_ringparam,
.get_coalesce = fm10k_get_coalesce,
.set_coalesce = fm10k_set_coalesce,
- .get_rxnfc = fm10k_get_rxnfc,
+ .get_rx_ring_count = fm10k_get_rx_ring_count,
.get_regs = fm10k_get_regs,
.get_regs_len = fm10k_get_regs_len,
.self_test = fm10k_self_test,
--
2.47.3
^ permalink raw reply related [flat|nested] 21+ messages in thread* RE: [Intel-wired-lan] [PATCH net-next 8/8] fm10k: extract GRXRINGS from .get_rxnfc
2025-11-24 18:19 ` [PATCH net-next 8/8] fm10k: " Breno Leitao
@ 2025-11-25 6:49 ` Loktionov, Aleksandr
0 siblings, 0 replies; 21+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-25 6:49 UTC (permalink / raw)
To: Breno Leitao, Lobakin, Aleksander, Nguyen, Anthony L,
Kitszel, Przemyslaw, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: michal.swiatkowski@linux.intel.com, michal.kubiak@intel.com,
Fijalkowski, Maciej, intel-wired-lan@lists.osuosl.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@meta.com
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf
> Of Breno Leitao
> Sent: Monday, November 24, 2025 7:19 PM
> To: Lobakin, Aleksander <aleksander.lobakin@intel.com>; Nguyen,
> Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>;
> David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>
> Cc: michal.swiatkowski@linux.intel.com; michal.kubiak@intel.com;
> Fijalkowski, Maciej <maciej.fijalkowski@intel.com>; intel-wired-
> lan@lists.osuosl.org; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; kernel-team@meta.com; Breno Leitao
> <leitao@debian.org>
> Subject: [Intel-wired-lan] [PATCH net-next 8/8] fm10k: extract
> GRXRINGS from .get_rxnfc
>
> Commit 84eaf4359c36 ("net: ethtool: add get_rx_ring_count callback to
> optimize RX ring queries") added specific support for GRXRINGS
> callback, simplifying .get_rxnfc.
>
> Remove the handling of GRXRINGS in .get_rxnfc() by moving it to the
> new .get_rx_ring_count().
>
> This simplifies the RX ring count retrieval and aligns fm10k with the
> new ethtool API for querying RX ring parameters.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 17 +++------------
> --
> 1 file changed, 3 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
> b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
> index bf2029144c1d..76e42abca965 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
> @@ -734,22 +734,11 @@ static int fm10k_get_rssh_fields(struct
> net_device *dev,
> return 0;
> }
>
> -static int fm10k_get_rxnfc(struct net_device *dev, struct
> ethtool_rxnfc *cmd,
> - u32 __always_unused *rule_locs)
> +static u32 fm10k_get_rx_ring_count(struct net_device *dev)
> {
> struct fm10k_intfc *interface = netdev_priv(dev);
> - int ret = -EOPNOTSUPP;
>
> - switch (cmd->cmd) {
> - case ETHTOOL_GRXRINGS:
> - cmd->data = interface->num_rx_queues;
> - ret = 0;
> - break;
> - default:
> - break;
> - }
> -
> - return ret;
> + return interface->num_rx_queues;
> }
>
> static int fm10k_set_rssh_fields(struct net_device *dev, @@ -1160,7
> +1149,7 @@ static const struct ethtool_ops fm10k_ethtool_ops = {
> .set_ringparam = fm10k_set_ringparam,
> .get_coalesce = fm10k_get_coalesce,
> .set_coalesce = fm10k_set_coalesce,
> - .get_rxnfc = fm10k_get_rxnfc,
> + .get_rx_ring_count = fm10k_get_rx_ring_count,
> .get_regs = fm10k_get_regs,
> .get_regs_len = fm10k_get_regs_len,
> .self_test = fm10k_self_test,
>
> --
> 2.47.3
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
^ permalink raw reply [flat|nested] 21+ messages in thread