From: Jijie Shao <shaojijie@huawei.com>
To: Breno Leitao <leitao@debian.org>,
Sunil Goutham <sgoutham@marvell.com>,
Geetha sowjanya <gakula@marvell.com>,
Subbaraya Sundeep <sbhatta@marvell.com>,
hariprasad <hkelam@marvell.com>,
Bharat Bhushan <bbhushan2@marvell.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Cai Huoqing <cai.huoqing@linux.dev>,
Christian Benvenuti <benve@cisco.com>,
Satish Kharat <satishkh@cisco.com>,
Dimitris Michailidis <dmichail@fungible.com>,
Manish Chopra <manishc@marvell.com>,
Jian Shen <shenjian15@huawei.com>,
Salil Mehta <salil.mehta@huawei.com>
Cc: <shaojijie@huawei.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 8/8] net: hns3: convert to use .get_rx_ring_count
Date: Mon, 12 Jan 2026 11:03:13 +0800 [thread overview]
Message-ID: <b65946e8-a8a9-4bc3-92d8-4a67170e531b@huawei.com> (raw)
In-Reply-To: <20260109-grxring_big_v1-v1-8-a0f77f732006@debian.org>
on 2026/1/10 1:40, Breno Leitao wrote:
> 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>
Thanks,
Reviewed-by: Jijie Shao <shaojijie@huawei.com>
> ---
> drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
> index a5eefa28454c..6d746a9fb687 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
> @@ -988,6 +988,13 @@ static int hns3_get_rxfh_fields(struct net_device *netdev,
> return -EOPNOTSUPP;
> }
>
> +static u32 hns3_get_rx_ring_count(struct net_device *netdev)
> +{
> + struct hnae3_handle *h = hns3_get_handle(netdev);
> +
> + return h->kinfo.num_tqps;
> +}
> +
> static int hns3_get_rxnfc(struct net_device *netdev,
> struct ethtool_rxnfc *cmd,
> u32 *rule_locs)
> @@ -995,9 +1002,6 @@ static int hns3_get_rxnfc(struct net_device *netdev,
> struct hnae3_handle *h = hns3_get_handle(netdev);
>
> switch (cmd->cmd) {
> - case ETHTOOL_GRXRINGS:
> - cmd->data = h->kinfo.num_tqps;
> - return 0;
> case ETHTOOL_GRXCLSRLCNT:
> if (h->ae_algo->ops->get_fd_rule_cnt)
> return h->ae_algo->ops->get_fd_rule_cnt(h, cmd);
> @@ -2148,6 +2152,7 @@ static const struct ethtool_ops hns3vf_ethtool_ops = {
> .get_sset_count = hns3_get_sset_count,
> .get_rxnfc = hns3_get_rxnfc,
> .set_rxnfc = hns3_set_rxnfc,
> + .get_rx_ring_count = hns3_get_rx_ring_count,
> .get_rxfh_key_size = hns3_get_rss_key_size,
> .get_rxfh_indir_size = hns3_get_rss_indir_size,
> .get_rxfh = hns3_get_rss,
> @@ -2187,6 +2192,7 @@ static const struct ethtool_ops hns3_ethtool_ops = {
> .get_sset_count = hns3_get_sset_count,
> .get_rxnfc = hns3_get_rxnfc,
> .set_rxnfc = hns3_set_rxnfc,
> + .get_rx_ring_count = hns3_get_rx_ring_count,
> .get_rxfh_key_size = hns3_get_rss_key_size,
> .get_rxfh_indir_size = hns3_get_rss_indir_size,
> .get_rxfh = hns3_get_rss,
>
next prev parent reply other threads:[~2026-01-12 3:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 17:40 [PATCH net-next 0/8] net: convert drivers to .get_rx_ring_count() Breno Leitao
2026-01-09 17:40 ` [PATCH net-next 1/8] net: octeontx2: convert to use .get_rx_ring_count Breno Leitao
2026-01-12 7:26 ` Hariprasad Kelam
2026-01-09 17:40 ` [PATCH net-next 2/8] net: hinic: " Breno Leitao
2026-01-09 17:40 ` [PATCH net-next 3/8] net: enic: " Breno Leitao
2026-01-09 17:40 ` [PATCH net-next 4/8] net: funeth: " Breno Leitao
2026-01-09 17:40 ` [PATCH net-next 5/8] net: niu: " Breno Leitao
2026-01-09 17:40 ` [PATCH net-next 6/8] net: qede: " Breno Leitao
2026-01-09 17:40 ` [PATCH net-next 7/8] net: hns: " Breno Leitao
2026-01-12 3:02 ` Jijie Shao
2026-01-09 17:40 ` [PATCH net-next 8/8] net: hns3: " Breno Leitao
2026-01-12 3:03 ` Jijie Shao [this message]
2026-01-12 20:57 ` [PATCH net-next 0/8] net: convert drivers to .get_rx_ring_count() patchwork-bot+netdevbpf
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=b65946e8-a8a9-4bc3-92d8-4a67170e531b@huawei.com \
--to=shaojijie@huawei.com \
--cc=andrew+netdev@lunn.ch \
--cc=bbhushan2@marvell.com \
--cc=benve@cisco.com \
--cc=cai.huoqing@linux.dev \
--cc=davem@davemloft.net \
--cc=dmichail@fungible.com \
--cc=edumazet@google.com \
--cc=gakula@marvell.com \
--cc=hkelam@marvell.com \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=salil.mehta@huawei.com \
--cc=satishkh@cisco.com \
--cc=sbhatta@marvell.com \
--cc=sgoutham@marvell.com \
--cc=shenjian15@huawei.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