Re: [PATCH] net: drop_monitor: make drop_monitor built-in
From: Masahiro Yamada
Date: Wed Mar 11 2020 - 02:31:27 EST
On Wed, Mar 11, 2020 at 2:50 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
>
> In net/Kconfig, NET_DEVLINK implies NET_DROP_MONITOR.
>
> The original behavior of the 'imply' keyword prevents NET_DROP_MONITOR
> from being 'm' when NET_DEVLINK=y.
>
> With the planned Kconfig change that relaxes the 'imply', the
> combination of NET_DEVLINK=y and NET_DROP_MONITOR=m would be allowed,
> causing a link error of vmlinux.
>
> As far as I see the mainline code, NET_DROP_MONITOR=m does not provide
> any useful case.
>
> The call-site of net_dm_hw_report() only exists in net/core/devlink.c,
> which is always built-in since NET_DEVLINK is a bool type option.
>
> So, NET_DROP_MONITOR=m causes a build error, or creates an unused
> module at best.
>
> Make NET_DROP_MONITOR a bool option, and remove the module exit code.
> I also unexported net_dm_hw_report because I see no other call-site
> in upstream.
>
> Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
Sorry, I take this back.
This is probably not the right fix.
I just sent an alternative patch.
( Replace IS_ENABLE with IS_REACHABLE )
--
Best Regards
Masahiro Yamada