Commit 3eb72257 authored by Breno Leitao's avatar Breno Leitao Committed by Jakub Kicinski
Browse files

net: mana: convert to use .get_rx_ring_count



Use the newly introduced .get_rx_ring_count ethtool ops callback instead
of handling ETHTOOL_GRXRINGS directly in .get_rxnfc().

Since ETHTOOL_GRXRINGS was the only command handled by mana_get_rxnfc(),
remove the function entirely.

Reviewed-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
Reviewed-by: default avatarBrett Creeley <brett.creeley@amd.com>
Link: https://patch.msgid.link/20260122-grxring_big_v4-v2-4-94dbe4dcaa10@debian.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 46f4ad55
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -282,18 +282,11 @@ static void mana_get_ethtool_stats(struct net_device *ndev,
	}
}

static int mana_get_rxnfc(struct net_device *ndev, struct ethtool_rxnfc *cmd,
			  u32 *rules)
static u32 mana_get_rx_ring_count(struct net_device *ndev)
{
	struct mana_port_context *apc = netdev_priv(ndev);

	switch (cmd->cmd) {
	case ETHTOOL_GRXRINGS:
		cmd->data = apc->num_queues;
		return 0;
	}

	return -EOPNOTSUPP;
	return apc->num_queues;
}

static u32 mana_get_rxfh_key_size(struct net_device *ndev)
@@ -520,7 +513,7 @@ const struct ethtool_ops mana_ethtool_ops = {
	.get_ethtool_stats	= mana_get_ethtool_stats,
	.get_sset_count		= mana_get_sset_count,
	.get_strings		= mana_get_strings,
	.get_rxnfc		= mana_get_rxnfc,
	.get_rx_ring_count	= mana_get_rx_ring_count,
	.get_rxfh_key_size	= mana_get_rxfh_key_size,
	.get_rxfh_indir_size	= mana_rss_indir_size,
	.get_rxfh		= mana_get_rxfh,