[PATCH net-next v1 1/1] net: selftest: provide option to disable generic selftests

Geert Uytterhoeven geert at linux-m68k.org
Fri Apr 30 17:25:35 BST 2021


Hi Oleksij,

On Fri, Apr 30, 2021 at 5:42 PM Oleksij Rempel <o.rempel at 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 at linux-m68k.org>
> > > Fixes: 3e1e58d64c3d ("net: add generic selftest support")
> > > Signed-off-by: Oleksij Rempel <o.rempel at 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 at 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



More information about the linux-arm-kernel mailing list