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 7/8] net: hns: convert to use .get_rx_ring_count
Date: Mon, 12 Jan 2026 11:02:25 +0800 [thread overview]
Message-ID: <6132864a-ac96-447d-aec7-0db6a109c95d@huawei.com> (raw)
In-Reply-To: <20260109-grxring_big_v1-v1-7-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/hns/hns_ethtool.c | 16 +++-------------
> 1 file changed, 3 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
> index 60a586a951a0..23b295dedaef 100644
> --- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
> +++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
> @@ -1230,21 +1230,11 @@ hns_set_rss(struct net_device *netdev, struct ethtool_rxfh_param *rxfh,
> rxfh->indir, rxfh->key, rxfh->hfunc);
> }
>
> -static int hns_get_rxnfc(struct net_device *netdev,
> - struct ethtool_rxnfc *cmd,
> - u32 *rule_locs)
> +static u32 hns_get_rx_ring_count(struct net_device *netdev)
> {
> struct hns_nic_priv *priv = netdev_priv(netdev);
>
> - switch (cmd->cmd) {
> - case ETHTOOL_GRXRINGS:
> - cmd->data = priv->ae_handle->q_num;
> - break;
> - default:
> - return -EOPNOTSUPP;
> - }
> -
> - return 0;
> + return priv->ae_handle->q_num;
> }
>
> static const struct ethtool_ops hns_ethtool_ops = {
> @@ -1273,7 +1263,7 @@ static const struct ethtool_ops hns_ethtool_ops = {
> .get_rxfh_indir_size = hns_get_rss_indir_size,
> .get_rxfh = hns_get_rss,
> .set_rxfh = hns_set_rss,
> - .get_rxnfc = hns_get_rxnfc,
> + .get_rx_ring_count = hns_get_rx_ring_count,
> .get_link_ksettings = hns_nic_get_link_ksettings,
> .set_link_ksettings = hns_nic_set_link_ksettings,
> };
>
next prev parent reply other threads:[~2026-01-12 3:02 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 [this message]
2026-01-09 17:40 ` [PATCH net-next 8/8] net: hns3: " Breno Leitao
2026-01-12 3:03 ` Jijie Shao
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=6132864a-ac96-447d-aec7-0db6a109c95d@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