net: add generic selftest support

Port some parts of the stmmac selftest and reuse it as basic generic selftest
library. This patch was tested with following combinations:
- iMX6DL FEC -> AT8035
- iMX6DL FEC -> SJA1105Q switch -> KSZ8081
- iMX6DL FEC -> SJA1105Q switch -> KSZ9031
- AR9331 ag71xx -> AR9331 PHY
- AR9331 ag71xx -> AR9331 switch -> AR9331 PHY

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Oleksij Rempel
2021-04-19 15:01:03 +02:00
committed by David S. Miller
parent 014068dcb5
commit 3e1e58d64c
4 changed files with 417 additions and 0 deletions

View File

@@ -429,6 +429,10 @@ config GRO_CELLS
config SOCK_VALIDATE_XMIT
bool
config NET_SELFTESTS
def_tristate PHYLIB
depends on PHYLIB
config NET_SOCK_MSG
bool
default n