From: javen <javen_xu@realsil.com.cn>
To: <hkallweit1@gmail.com>, <nic_swsd@realtek.com>,
<andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<horms@kernel.org>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Javen Xu <javen_xu@realsil.com.cn>
Subject: [PATCH net-next v14 7/7] r8169: add get_channel support for ethtool
Date: Fri, 18 Sep 2026 14:19:23 +0800 [thread overview]
Message-ID: <20260918061923.313-8-javen_xu@realsil.com.cn> (raw)
In-Reply-To: <20260918061923.313-1-javen_xu@realsil.com.cn>
From: Javen Xu <javen_xu@realsil.com.cn>
Add get_channel support for ethtool.
Signed-off-by: Javen Xu <javen_xu@realsil.com.cn>
---
Changes in v11:
- new file, no change
Changes in v12:
- no changes
Changes in v13:
- no changes
Changes in v14:
- no changes
---
drivers/net/ethernet/realtek/r8169_main.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 3be6f6e708f2..7a61c2ecc7d1 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -6713,6 +6713,22 @@ static void r8169_init_napi(struct rtl8169_private *tp)
}
}
+static void rtl8169_get_channels(struct net_device *dev,
+ struct ethtool_channels *ch)
+{
+ struct rtl8169_private *tp = netdev_priv(dev);
+
+ if (tp->irq_nvecs > 1) {
+ ch->max_rx = tp->hw_supp_num_rx_queues;
+ ch->max_tx = 1;
+ ch->rx_count = tp->num_rx_rings;
+ ch->tx_count = 1;
+ } else {
+ ch->max_combined = 1;
+ ch->combined_count = 1;
+ }
+}
+
static const struct ethtool_ops rtl8169_ethtool_ops = {
.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
ETHTOOL_COALESCE_MAX_FRAMES,
@@ -6731,6 +6747,7 @@ static const struct ethtool_ops rtl8169_ethtool_ops = {
.nway_reset = rtl8169_nway_reset,
.get_eee = rtl8169_get_eee,
.set_eee = rtl8169_set_eee,
+ .get_channels = rtl8169_get_channels,
.get_link_ksettings = rtl8169_get_link_ksettings,
.set_link_ksettings = rtl8169_set_link_ksettings,
.get_ringparam = rtl8169_get_ringparam,
--
2.43.0
next prev parent reply other threads:[~2026-09-18 6:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 6:19 [PATCH net-next v14 0/7] r8169: add RSS support for RTL8127 javen
2026-09-18 6:19 ` [PATCH net-next v14 1/7] r8169: prepare for multi irqs and napi javen
2026-09-22 6:52 ` netdev-bot+sashiko
2026-09-18 6:19 ` [PATCH net-next v14 2/7] r8169: refactor RX path to prepare for multi-queue javen
2026-09-22 6:52 ` netdev-bot+sashiko
2026-09-18 6:19 ` [PATCH net-next v14 3/7] r8169: add support for new interrupt mapping javen
2026-09-22 6:52 ` netdev-bot+sashiko
2026-09-18 6:19 ` [PATCH net-next v14 4/7] r8169: enable " javen
2026-09-22 6:53 ` netdev-bot+sashiko
2026-09-18 6:19 ` [PATCH net-next v14 5/7] r8169: add support and enable rss javen
2026-09-22 6:53 ` netdev-bot+sashiko
2026-09-18 6:19 ` [PATCH net-next v14 6/7] r8169: move struct ethtool_ops javen
2026-09-22 6:53 ` netdev-bot+sashiko
2026-09-18 6:19 ` javen [this message]
2026-09-22 6:53 ` [PATCH net-next v14 7/7] r8169: add get_channel support for ethtool netdev-bot+sashiko
2026-09-24 10:07 ` [PATCH net-next v14 0/7] r8169: add RSS support for RTL8127 Paolo Abeni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260918061923.313-8-javen_xu@realsil.com.cn \
--to=javen_xu@realsil.com.cn \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox