Re: [PATCH net-next v2 2/3] netconsole: pr_err() when netpoll_setup fails

From: Jakub Kicinski
Date: Tue Aug 20 2024 - 19:24:18 EST


On Mon, 19 Aug 2024 03:36:12 -0700 Breno Leitao wrote:
> netpoll_setup() can fail in several ways, some of which print an error
> message, while others simply return without any message. For example,
> __netpoll_setup() returns in a few places without printing anything.
>
> To address this issue, modify the code to print an error message on
> netconsole if the target is not enabled. This will help us identify and
> troubleshoot netcnsole issues related to netpoll setup failures
> more easily.

Only if memory allocation fails, it seems, and memory allocation
failures with GFP_KERNEL will be quite noisy.

BTW I looked thru 4 random implementations of ndo_netpoll_setup
and they look almost identical :S Perhaps they can be refactored?