[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250912164446.GA224143@horms.kernel.org>
Date: Fri, 12 Sep 2025 17:44:46 +0100
From: Simon Horman <horms@...nel.org>
To: Fan Gong <gongfan1@...wei.com>
Cc: andrew+netdev@...n.ch, christophe.jaillet@...adoo.fr, corbet@....net,
davem@...emloft.net, edumazet@...gle.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 Thu, Sep 11, 2025 at 10:25:04PM +0800, Fan Gong wrote:
> 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.
Thanks for the clarification, much appreciated.
> 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