]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: ethtool: add get_rx_ring_count callback to optimize RX ring queries
authorBreno Leitao <leitao@debian.org>
Wed, 17 Sep 2025 09:58:11 +0000 (02:58 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 18 Sep 2025 14:07:37 +0000 (07:07 -0700)
commit84eaf4359c36b0ba888f571a964138d22ba5914f
tree7c792a03eae86a6788f648d30b03192cee215571
parent87c76c2db002e747269fc5d91461786ce57976d7
net: ethtool: add get_rx_ring_count callback to optimize RX ring queries

Add a new optional get_rx_ring_count callback in ethtool_ops to allow
drivers to provide the number of RX rings directly without going through
the full get_rxnfc flow classification interface.

Create ethtool_get_rx_ring_count() to use .get_rx_ring_count if
available, falling back to get_rxnfc() otherwise. It needs to be
non-static, given it will be called by other ethtool functions laters,
as those calling get_rxfh().

Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://patch.msgid.link/20250917-gxrings-v4-4-dae520e2e1cb@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/ethtool.h
net/ethtool/common.c
net/ethtool/common.h
net/ethtool/ioctl.c