[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3c0861b7-c999-4202-b5c9-12ca714107f6@huawei.com>
Date: Tue, 18 Feb 2025 09:12:58 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: Andrew Lunn <andrew@...n.ch>
CC: <shaojijie@...wei.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
<kuba@...nel.org>, <pabeni@...hat.com>, <andrew+netdev@...n.ch>,
<horms@...nel.org>, <shenjian15@...wei.com>, <wangpeiyang1@...wei.com>,
<liuyonglong@...wei.com>, <chenhao418@...wei.com>, <sudongming1@...wei.com>,
<xujunsheng@...wei.com>, <shiyongbang@...wei.com>, <libaihan@...wei.com>,
<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 net-next 2/7] net: hibmcge: Add self test supported in
this module
on 2025/2/14 21:53, Andrew Lunn wrote:
> On Fri, Feb 14, 2025 at 10:46:31AM +0800, Jijie Shao wrote:
>> on 2025/2/14 3:59, Andrew Lunn wrote:
>>> On Thu, Feb 13, 2025 at 11:55:24AM +0800, Jijie Shao wrote:
>>>> This patch supports many self test: Mac, SerDes and Phy.
>>>>
>>>> To implement self test, this patch implements a simple packet sending and
>>>> receiving function in the driver. By sending a packet in a specific format,
>>>> driver considers that the test is successful if the packet is received.
>>>> Otherwise, the test fails.
>>>>
>>>> The SerDes hardware is on the BMC side, Therefore, when the SerDes loopback
>>>> need enabled, driver notifies the BMC through an event message.
>>>>
>>>> Signed-off-by: Jijie Shao <shaojijie@...wei.com>
>>> Please take a look at the work Gerhard Engleder is doing, and try not
>>> to reinvent net/core/selftest.c
>>>
>>> Andrew
>> I actually knew about this, but after browsing the source code, I gave up using it.
>>
>> I have an additional requirement: serdes loopback and mac loopback.
>> However, they are not supported in net/core/selftest.c.
> Which is why i pointed you toward Gerhard. He found similar
> limitations in the code, wanting to add in extra tests, same as you.
> Two developers wanting to do that same things, suggests the core
> should be extended to support that, not two different copies hidden
> away in drivers.
>
> Maybe my initial advice about not exporting the helpers was bad? I
> don't know. Please chat with Gerhard and come up with a design that
> makes the core usable for both your uses cases, and anybody else
> wanting to embed similar self tests in their driver.
>
> Andrew
OK, this patch will be removed from this patchset in v2.
I will re-send it as RFC to discuss it.
Thanks,
Jijie Shao
Powered by blists - more mailing lists