[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250331135421.018c49db@kernel.org>
Date: Mon, 31 Mar 2025 13:54:21 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Stanislav Fomichev <sdf@...ichev.me>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
pabeni@...hat.com
Subject: Re: [PATCH net v4 05/11] netdevsim: add dummy device notifiers
On Mon, 31 Mar 2025 08:05:57 -0700 Stanislav Fomichev wrote:
> +#if IS_ENABLED(CONFIG_DEBUG_NET)
> +int netdev_debug_event(struct notifier_block *nb, unsigned long event,
> + void *ptr);
> +#else
> +static inline int netdev_debug_event(struct notifier_block *nb,
> + unsigned long event, void *ptr)
> +{
> + return 0;
> +}
> +#endif
Maybe we can wrap the while notifier setup in
if (IS_ENABLED(CONFIG_DEBUG_NET)) {
instead? We don't expect more users of the event callback, and it may
be useful to give readers of the netdevsim code a hint that this
callback will only do something when DEBUG_NET=y
> #endif
> diff --git a/net/core/lock_debug.c b/net/core/lock_debug.c
> index 7ecd28cc1c22..506899164f31 100644
> --- a/net/core/lock_debug.c
> +++ b/net/core/lock_debug.c
> @@ -66,6 +69,7 @@ static int rtnl_net_debug_event(struct notifier_block *nb,
>
> return NOTIFY_DONE;
> }
> +EXPORT_SYMBOL_GPL(netdev_debug_event);
EXPORT_SYMBOL_NS_GPL(netdev_debug_event, "NETDEV_INTERNAL");
Powered by blists - more mailing lists