* [PATCH net-next v1 1/1] net: selftest: provide option to disable generic selftests
@ 2021-04-30 9:53 Oleksij Rempel
2021-04-30 15:13 ` Randy Dunlap
0 siblings, 1 reply; 7+ messages in thread
From: Oleksij Rempel @ 2021-04-30 9:53 UTC (permalink / raw)
To: Shawn Guo, Sascha Hauer, Andrew Lunn, Florian Fainelli,
Heiner Kallweit, Fugang Duan
Cc: Oleksij Rempel, Geert Uytterhoeven, kernel, netdev,
linux-arm-kernel, linux-kernel, linux-imx, Fabio Estevam,
David Jander, Russell King, Philippe Schenker
Some systems may need to disable selftests to reduce kernel size or for
some policy reasons. This patch provide option to disable generic selftests.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: 3e1e58d64c3d ("net: add generic selftest support")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
net/Kconfig | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/Kconfig b/net/Kconfig
index f5ee7c65e6b4..dac98c73fcd8 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -431,7 +431,12 @@ config SOCK_VALIDATE_XMIT
config NET_SELFTESTS
def_tristate PHYLIB
+ prompt "Support for generic selftests"
depends on PHYLIB && INET
+ help
+ These selftests are build automatically if any driver with generic
+ selftests support is enabled. This option can be used to disable
+ selftests to reduce kernel size.
config NET_SOCK_MSG
bool
--
2.29.2
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH net-next v1 1/1] net: selftest: provide option to disable generic selftests 2021-04-30 9:53 [PATCH net-next v1 1/1] net: selftest: provide option to disable generic selftests Oleksij Rempel @ 2021-04-30 15:13 ` Randy Dunlap 2021-04-30 15:41 ` Oleksij Rempel 0 siblings, 1 reply; 7+ messages in thread From: Randy Dunlap @ 2021-04-30 15:13 UTC (permalink / raw) To: Oleksij Rempel, Shawn Guo, Sascha Hauer, Andrew Lunn, Florian Fainelli, Heiner Kallweit, Fugang Duan Cc: Geert Uytterhoeven, kernel, netdev, linux-arm-kernel, linux-kernel, linux-imx, Fabio Estevam, David Jander, Russell King, Philippe Schenker On 4/30/21 2:53 AM, Oleksij Rempel wrote: > Some systems may need to disable selftests to reduce kernel size or for > some policy reasons. This patch provide option to disable generic selftests. > > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> > Fixes: 3e1e58d64c3d ("net: add generic selftest support") > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> > --- > net/Kconfig | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/net/Kconfig b/net/Kconfig > index f5ee7c65e6b4..dac98c73fcd8 100644 > --- a/net/Kconfig > +++ b/net/Kconfig > @@ -431,7 +431,12 @@ config SOCK_VALIDATE_XMIT > > config NET_SELFTESTS > def_tristate PHYLIB > + prompt "Support for generic selftests" > depends on PHYLIB && INET > + help > + These selftests are build automatically if any driver with generic built > + selftests support is enabled. This option can be used to disable > + selftests to reduce kernel size. > > config NET_SOCK_MSG > bool > Thanks for the patch/option. But I think it should just default to n, not PHYLIB. -- ~Randy ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v1 1/1] net: selftest: provide option to disable generic selftests 2021-04-30 15:13 ` Randy Dunlap @ 2021-04-30 15:41 ` Oleksij Rempel 2021-04-30 16:23 ` Andrew Lunn 2021-04-30 16:25 ` Geert Uytterhoeven 0 siblings, 2 replies; 7+ messages in thread From: Oleksij Rempel @ 2021-04-30 15:41 UTC (permalink / raw) To: Randy Dunlap Cc: Shawn Guo, Sascha Hauer, Andrew Lunn, Florian Fainelli, Heiner Kallweit, Fugang Duan, Geert Uytterhoeven, kernel, netdev, linux-arm-kernel, linux-kernel, linux-imx, Fabio Estevam, David Jander, Russell King, Philippe Schenker On Fri, Apr 30, 2021 at 08:13:12AM -0700, Randy Dunlap wrote: > On 4/30/21 2:53 AM, Oleksij Rempel wrote: > > Some systems may need to disable selftests to reduce kernel size or for > > some policy reasons. This patch provide option to disable generic selftests. > > > > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> > > Fixes: 3e1e58d64c3d ("net: add generic selftest support") > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> > > --- > > net/Kconfig | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/net/Kconfig b/net/Kconfig > > index f5ee7c65e6b4..dac98c73fcd8 100644 > > --- a/net/Kconfig > > +++ b/net/Kconfig > > @@ -431,7 +431,12 @@ config SOCK_VALIDATE_XMIT > > > > config NET_SELFTESTS > > def_tristate PHYLIB > > + prompt "Support for generic selftests" > > depends on PHYLIB && INET > > + help > > + These selftests are build automatically if any driver with generic > > built > > > + selftests support is enabled. This option can be used to disable > > + selftests to reduce kernel size. > > > > config NET_SOCK_MSG > > bool > > > > Thanks for the patch/option. But I think it should just default to n, > not PHYLIB. It should be enabled by default for every device supporting this kind of selftests. This tests extend functionality of cable tests, which are not optional. Disabling it by default makes even less sense, at least for me. It depends on PHYLIB, if PHYLIB is build as module, this this part should be build as module too. And since Geert asking to make it optional, I provided this patch. Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v1 1/1] net: selftest: provide option to disable generic selftests 2021-04-30 15:41 ` Oleksij Rempel @ 2021-04-30 16:23 ` Andrew Lunn 2021-04-30 16:33 ` Randy Dunlap 2021-04-30 16:25 ` Geert Uytterhoeven 1 sibling, 1 reply; 7+ messages in thread From: Andrew Lunn @ 2021-04-30 16:23 UTC (permalink / raw) To: Oleksij Rempel Cc: Randy Dunlap, Shawn Guo, Sascha Hauer, Florian Fainelli, Heiner Kallweit, Fugang Duan, Geert Uytterhoeven, kernel, netdev, linux-arm-kernel, linux-kernel, linux-imx, Fabio Estevam, David Jander, Russell King, Philippe Schenker > > Thanks for the patch/option. But I think it should just default to n, > > not PHYLIB. > > It should be enabled by default for every device supporting this kind of > selftests. I agree. I still wonder if there is confusion about self test here. Maybe putting ethtool into the description will help people understand it has nothing to do with the kernel self test infrastructure and kernel self testing. Andrew ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v1 1/1] net: selftest: provide option to disable generic selftests 2021-04-30 16:23 ` Andrew Lunn @ 2021-04-30 16:33 ` Randy Dunlap 2021-04-30 16:56 ` Andrew Lunn 0 siblings, 1 reply; 7+ messages in thread From: Randy Dunlap @ 2021-04-30 16:33 UTC (permalink / raw) To: Andrew Lunn, Oleksij Rempel Cc: Shawn Guo, Sascha Hauer, Florian Fainelli, Heiner Kallweit, Fugang Duan, Geert Uytterhoeven, kernel, netdev, linux-arm-kernel, linux-kernel, linux-imx, Fabio Estevam, David Jander, Russell King, Philippe Schenker On 4/30/21 9:23 AM, Andrew Lunn wrote: >>> Thanks for the patch/option. But I think it should just default to n, >>> not PHYLIB. >> >> It should be enabled by default for every device supporting this kind of >> selftests. > > I agree. > > I still wonder if there is confusion about self test here. Maybe Probably. > putting ethtool into the description will help people understand it > has nothing to do with the kernel self test infrastructure and kernel > self testing. So it's a hardware check that is required to be run if it's implemented in a driver? Required by who/what? thanks. -- ~Randy ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v1 1/1] net: selftest: provide option to disable generic selftests 2021-04-30 16:33 ` Randy Dunlap @ 2021-04-30 16:56 ` Andrew Lunn 0 siblings, 0 replies; 7+ messages in thread From: Andrew Lunn @ 2021-04-30 16:56 UTC (permalink / raw) To: Randy Dunlap Cc: Oleksij Rempel, Shawn Guo, Sascha Hauer, Florian Fainelli, Heiner Kallweit, Fugang Duan, Geert Uytterhoeven, kernel, netdev, linux-arm-kernel, linux-kernel, linux-imx, Fabio Estevam, David Jander, Russell King, Philippe Schenker On Fri, Apr 30, 2021 at 09:33:42AM -0700, Randy Dunlap wrote: > On 4/30/21 9:23 AM, Andrew Lunn wrote: > >>> Thanks for the patch/option. But I think it should just default to n, > >>> not PHYLIB. > >> > >> It should be enabled by default for every device supporting this kind of > >> selftests. > > > > I agree. > > > > I still wonder if there is confusion about self test here. Maybe > > Probably. > > > putting ethtool into the description will help people understand it > > has nothing to do with the kernel self test infrastructure and kernel > > self testing. > > So it's a hardware check that is required to be run if it's implemented > in a driver? > > Required by who/what? It is not required, but it is a useful debug tool for the educated user. Root can run the self tests on the network interface. If the self test pass, but the interface does not work, you probably have a cabling or configuration issue. Networking is complex and being able to eliminate the interface hardware lets you concentrate on some other part of the problem. You can then maybe next use the cable test option of ethtool to see if the cable has a problem. Andrew ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v1 1/1] net: selftest: provide option to disable generic selftests 2021-04-30 15:41 ` Oleksij Rempel 2021-04-30 16:23 ` Andrew Lunn @ 2021-04-30 16:25 ` Geert Uytterhoeven 1 sibling, 0 replies; 7+ messages in thread From: Geert Uytterhoeven @ 2021-04-30 16:25 UTC (permalink / raw) To: Oleksij Rempel Cc: Randy Dunlap, Shawn Guo, Sascha Hauer, Andrew Lunn, Florian Fainelli, Heiner Kallweit, Fugang Duan, Sascha Hauer, netdev, Linux ARM, Linux Kernel Mailing List, NXP Linux Team, Fabio Estevam, David Jander, Russell King, Philippe Schenker Hi Oleksij, On Fri, Apr 30, 2021 at 5:42 PM Oleksij Rempel <o.rempel@pengutronix.de> wrote: > On Fri, Apr 30, 2021 at 08:13:12AM -0700, Randy Dunlap wrote: > > On 4/30/21 2:53 AM, Oleksij Rempel wrote: > > > Some systems may need to disable selftests to reduce kernel size or for > > > some policy reasons. This patch provide option to disable generic selftests. > > > > > > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> > > > Fixes: 3e1e58d64c3d ("net: add generic selftest support") > > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> > > > --- > > > net/Kconfig | 5 +++++ > > > 1 file changed, 5 insertions(+) > > > > > > diff --git a/net/Kconfig b/net/Kconfig > > > index f5ee7c65e6b4..dac98c73fcd8 100644 > > > --- a/net/Kconfig > > > +++ b/net/Kconfig > > > @@ -431,7 +431,12 @@ config SOCK_VALIDATE_XMIT > > > > > > config NET_SELFTESTS > > > def_tristate PHYLIB > > > + prompt "Support for generic selftests" > > > depends on PHYLIB && INET > > > + help > > > + These selftests are build automatically if any driver with generic > > > > built > > > > > + selftests support is enabled. This option can be used to disable > > > + selftests to reduce kernel size. > > > > > > config NET_SOCK_MSG > > > bool > > > > > > > Thanks for the patch/option. But I think it should just default to n, > > not PHYLIB. > > It should be enabled by default for every device supporting this kind of > selftests. This tests extend functionality of cable tests, which are not > optional. Disabling it by default makes even less sense, at least for > me. Drivers using it ( AG71XX, FEC, NET_DSA) already select it, right? Or better, imply it, which assumes it's optional. > It depends on PHYLIB, if PHYLIB is build as module, this > this part should be build as module too. And since Geert asking to make > it optional, I provided this patch. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-04-30 16:56 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-04-30 9:53 [PATCH net-next v1 1/1] net: selftest: provide option to disable generic selftests Oleksij Rempel 2021-04-30 15:13 ` Randy Dunlap 2021-04-30 15:41 ` Oleksij Rempel 2021-04-30 16:23 ` Andrew Lunn 2021-04-30 16:33 ` Randy Dunlap 2021-04-30 16:56 ` Andrew Lunn 2021-04-30 16:25 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox