diff options
| author | Breno Leitao <leitao@debian.org> | 2026-01-09 09:40:54 -0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-01-10 12:21:06 -0800 |
| commit | 415a9d10d1802123249fffc3a553b8c813a2af88 (patch) | |
| tree | f6eb703f5ca3917999f9f310fa7dbe04a077d05e | |
| parent | 08cbb4a3de08e17df3ad00ad7ee02345cb90dd3d (diff) | |
| download | linux-415a9d10d1802123249fffc3a553b8c813a2af88.tar.gz linux-415a9d10d1802123249fffc3a553b8c813a2af88.zip | |
net: enic: 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().
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20260109-grxring_big_v1-v1-3-a0f77f732006@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | drivers/net/ethernet/cisco/enic/enic_ethtool.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/ethernet/cisco/enic/enic_ethtool.c b/drivers/net/ethernet/cisco/enic/enic_ethtool.c index a50f5dad34d5..471613899ec0 100644 --- a/drivers/net/ethernet/cisco/enic/enic_ethtool.c +++ b/drivers/net/ethernet/cisco/enic/enic_ethtool.c @@ -573,6 +573,13 @@ static int enic_get_rx_flow_hash(struct net_device *dev, return 0; } +static u32 enic_get_rx_ring_count(struct net_device *dev) +{ + struct enic *enic = netdev_priv(dev); + + return enic->rq_count; +} + static int enic_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, u32 *rule_locs) { @@ -580,9 +587,6 @@ static int enic_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd, int ret = 0; switch (cmd->cmd) { - case ETHTOOL_GRXRINGS: - cmd->data = enic->rq_count; - break; case ETHTOOL_GRXCLSRLCNT: spin_lock_bh(&enic->rfs_h.lock); cmd->rule_cnt = enic->rfs_h.max - enic->rfs_h.free; @@ -689,6 +693,7 @@ static const struct ethtool_ops enic_ethtool_ops = { .get_coalesce = enic_get_coalesce, .set_coalesce = enic_set_coalesce, .get_rxnfc = enic_get_rxnfc, + .get_rx_ring_count = enic_get_rx_ring_count, .get_rxfh_key_size = enic_get_rxfh_key_size, .get_rxfh = enic_get_rxfh, .set_rxfh = enic_set_rxfh, |
