[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8f17b1be-cf69-4701-ab62-40141b1cbf99@huawei.com>
Date: Tue, 10 Sep 2024 14:26:10 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: Andrew Lunn <andrew@...n.ch>
CC: <shaojijie@...wei.com>, Kalesh Anakkur Purayil
<kalesh-anakkur.purayil@...adcom.com>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<shenjian15@...wei.com>, <wangpeiyang1@...wei.com>, <liuyonglong@...wei.com>,
<chenhao418@...wei.com>, <sudongming1@...wei.com>, <xujunsheng@...wei.com>,
<shiyongbang@...wei.com>, <libaihan@...wei.com>, <zhuyuan@...wei.com>,
<forest.zhouchang@...wei.com>, <jdamato@...tly.com>, <horms@...nel.org>,
<jonathan.cameron@...wei.com>, <shameerali.kolothum.thodi@...wei.com>,
<salil.mehta@...wei.com>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V8 net-next 05/11] net: hibmcge: Implement some .ndo
functions
on 2024/9/9 22:48, Andrew Lunn wrote:
>> No, HBG_NIC_STATE_OPEN is not intended to ensure that hbg_net_open() and
>> hbg_net_stop() are mutually exclusive.
>>
>> Actually, when the driver do reset or self-test(ethtool -t or ethtool --reset or FLR).
>> We hope that no other data is transmitted or received at this time.
> That is an invalid assumption. You could be receiving line rate
> broadcast traffic for example, because there is a broadcast storm
> happening.
>
> I assume for testing, you are configuring a loopback somewhere? PHY
> loopback or PCS loopback? I've seen some PHYs do 'broken' loopback
> where egress traffic is looped back, but ingress traffic is also still
> received. Is this true for your hardware? Is this why you make this
> assumption?
>
> What is your use case for ethtool --reset? Are you working around
> hardware bugs? Why not simply return -EBUSY if the user tries to use
> --reset when the interface is admin up. You then know the interface is
> down, you don't need open/close to be re-entrant safe.
>
> Same for testing. Return -ENETDOWN if the user tries to do self test
> on an interface which is admin down.
>
> Andrew
Good idea. I'll remove priv->state first in v9. We'll discuss this
internally. Thank you very much. Jiji Shao
Powered by blists - more mailing lists