Re: [PATCH net-next 2/7] net: hibmcge: Add self test supported in this module

From: Jijie Shao
Date: Thu Feb 13 2025 - 21:47:25 EST



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@xxxxxxxxxx>
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.

Thanks,
Jijie Shao