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] [day] [month] [year] [list]
Message-ID: <20250911142504.2518-1-gongfan1@huawei.com>
Date: Thu, 11 Sep 2025 22:25:04 +0800
From: Fan Gong <gongfan1@...wei.com>
To: <horms@...nel.org>
CC: <andrew+netdev@...n.ch>, <christophe.jaillet@...adoo.fr>,
	<corbet@....net>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<gongfan1@...wei.com>, <guoxin09@...wei.com>, <gur.stavi@...wei.com>,
	<helgaas@...nel.org>, <jdamato@...tly.com>, <kuba@...nel.org>,
	<lee@...ger.us>, <linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<luosifu@...wei.com>, <luoyang82@...artners.com>, <meny.yossefi@...wei.com>,
	<mpe@...erman.id.au>, <netdev@...r.kernel.org>, <pabeni@...hat.com>,
	<przemyslaw.kitszel@...el.com>, <shenchenyang1@...ilicon.com>,
	<shijing34@...wei.com>, <sumang@...vell.com>, <vadim.fedorenko@...ux.dev>,
	<wulike1@...wei.com>, <zhoushuai28@...wei.com>, <zhuyikai1@...artners.com>
Subject: Re: [PATCH net-next v05 12/14] hinic3: Add port management

On 9/11/2025 8:33 PM, Simon Horman wrote:

> > +	err = hinic3_get_link_status(nic_dev->hwdev, &link_status_up);
> > +	if (!err && link_status_up)
> > +		netif_carrier_on(netdev);
> > +
> > +	return 0;
> > +
> > +err_flush_qps_res:
> > +	hinic3_flush_qps_res(nic_dev->hwdev);
> > +	/* wait to guarantee that no packets will be sent to host */
> > +	msleep(100);
> 
> I realise that Jakub's feedback on msleep() in his review of v3 was
> in a different code path. But I do wonder if there is a better way.

...

> > +	hinic3_flush_txqs(netdev);
> > +	/* wait to guarantee that no packets will be sent to host */
> > +	msleep(100);
> 
> Likewise, here.

Thanks for your review, Simon.

Firstly, The main issue on the code of Jakub's feedback on msleep() is
duplicate code function. The msleep() in hinic3_vport_down and
hinic3_free_hwdev is repetitive because of our oversight. So we removed
msleep() in hinic3_free_hwdev in v04 patch.

Secondly, there is no better way indeed. As our HW bad decision, HW 
didn't have an accurate way of checking if rq has been flushed. The
only way is to close the func & port . Then we wait for HW to process
the pkts and upload them to driver. 
The sleep time is determined through our testing. The two calls of
msleep() are the same issue.

Finally, we have received your reviews on other patches and we will
fix them soon in the next version.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ