Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: mvpp2: 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() for the mvpp2 driver.

This simplifies the RX ring count retrieval and aligns mvpp2 with the new
ethtool API for querying RX ring parameters, while keeping the other
rxnfc handlers (GRXCLSRLCNT, GRXCLSRULE, GRXCLSRLALL) intact.

Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20251121-marvell-v1-2-8338f3e55a4c@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Breno Leitao and committed by
Jakub Kicinski
20c20f05 737e14c5

+8 -3
+8 -3
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
··· 5580 5580 return phylink_ethtool_ksettings_set(port->phylink, cmd); 5581 5581 } 5582 5582 5583 + static u32 mvpp2_ethtool_get_rx_ring_count(struct net_device *dev) 5584 + { 5585 + struct mvpp2_port *port = netdev_priv(dev); 5586 + 5587 + return port->nrxqs; 5588 + } 5589 + 5583 5590 static int mvpp2_ethtool_get_rxnfc(struct net_device *dev, 5584 5591 struct ethtool_rxnfc *info, u32 *rules) 5585 5592 { ··· 5597 5590 return -EOPNOTSUPP; 5598 5591 5599 5592 switch (info->cmd) { 5600 - case ETHTOOL_GRXRINGS: 5601 - info->data = port->nrxqs; 5602 - break; 5603 5593 case ETHTOOL_GRXCLSRLCNT: 5604 5594 info->rule_cnt = port->n_rfs_rules; 5605 5595 break; ··· 5831 5827 .set_pauseparam = mvpp2_ethtool_set_pause_param, 5832 5828 .get_link_ksettings = mvpp2_ethtool_get_link_ksettings, 5833 5829 .set_link_ksettings = mvpp2_ethtool_set_link_ksettings, 5830 + .get_rx_ring_count = mvpp2_ethtool_get_rx_ring_count, 5834 5831 .get_rxnfc = mvpp2_ethtool_get_rxnfc, 5835 5832 .set_rxnfc = mvpp2_ethtool_set_rxnfc, 5836 5833 .get_rxfh_indir_size = mvpp2_ethtool_get_rxfh_indir_size,