lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6132864a-ac96-447d-aec7-0db6a109c95d@huawei.com>
Date: Mon, 12 Jan 2026 11:02:25 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: Breno Leitao <leitao@...ian.org>, Sunil Goutham <sgoutham@...vell.com>,
	Geetha sowjanya <gakula@...vell.com>, Subbaraya Sundeep
	<sbhatta@...vell.com>, hariprasad <hkelam@...vell.com>, Bharat Bhushan
	<bbhushan2@...vell.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David S.
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub
 Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Cai Huoqing
	<cai.huoqing@...ux.dev>, Christian Benvenuti <benve@...co.com>, Satish Kharat
	<satishkh@...co.com>, Dimitris Michailidis <dmichail@...gible.com>, Manish
 Chopra <manishc@...vell.com>, Jian Shen <shenjian15@...wei.com>, Salil Mehta
	<salil.mehta@...wei.com>
CC: <shaojijie@...wei.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 7/8] net: hns: convert to use .get_rx_ring_count


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@...ian.org>

Thanks,

Reviewed-by: Jijie Shao <shaojijie@...wei.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,
>   };
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ