From: Breno Leitao <leitao@debian.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Aijay Adams <aijay@meta.com>
Subject: Re: [PATCH net-next v2 3/3] netconsole: Populate dynamic entry even if netpoll fails
Date: Thu, 22 Aug 2024 04:00:01 -0700 [thread overview]
Message-ID: <ZscaMfmnU3HmZWm5@gmail.com> (raw)
In-Reply-To: <20240821154926.14785d66@kernel.org>
Hello Jakub,
On Wed, Aug 21, 2024 at 03:49:26PM -0700, Jakub Kicinski wrote:
> On Wed, 21 Aug 2024 01:21:58 -0700 Breno Leitao wrote:
> > Another way to write this is:
> >
> > err = netpoll_setup(&nt->np);
> > if (err) {
> > pr_err("Not enabling netconsole. Netpoll setup failed\n");
> > if (!IS_ENABLED(CONFIG_NETCONSOLE_DYNAMIC))
> > goto fail
> > } else {
> > nt->enabled = true;
> > }
> >
> > is it better? Or, Is there a even better way to write this?
>
> Yes, I think this is better! Or at least I wouldn't have made the same
> mistake reading it if it was written this way :)
>
> > > As for the message would it be more helpful to indicate target will be
> > > disabled? Move the print after the check for dynamic and say "Netpoll
> > > setup failed, netconsole target will be disabled" ?
> >
> > In both cases the target will be disabled, right? In one case, it will
> > populate the cmdline0 configfs (if CONFIG_NETCONSOLE_DYNAMIC is set),
> > otherwise it will fail completely. Either way, netconsole will be
> > disabled.
>
> No strong feelings. I was trying to highlight that it's a single target
> that ends up being disabled "netconsole disabled" sounds like the whole
> netconsole module is completely out of commission.
That is fair, let me print the cmdline number, so, we can see something
as:
netpoll: netconsole: local port 6666
netpoll: netconsole: local IPv6 address 2401:db00:3120:21a9:face:0:270:0
netpoll: netconsole: interface 'ethX'
netpoll: netconsole: remote port 1514
netpoll: netconsole: remote IPv6 address 2803:6080:a89c:a670::1
netpoll: netconsole: remote ethernet address 02:90:fb:66:aa:e5
netpoll: netconsole: ethX doesn't exist, aborting
netconsole: Not enabling netconsole for cmdline0. Netpoll setup failed
prev parent reply other threads:[~2024-08-22 11:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-19 10:36 [PATCH net-next v2 0/3] netconsole: Populate dynamic entry even if netpoll fails Breno Leitao
2024-08-19 10:36 ` [PATCH net-next v2 1/3] netpoll: Ensure clean state on setup failures Breno Leitao
2024-08-20 23:20 ` Jakub Kicinski
2024-08-21 8:44 ` Breno Leitao
2024-08-19 10:36 ` [PATCH net-next v2 2/3] netconsole: pr_err() when netpoll_setup fails Breno Leitao
2024-08-20 23:24 ` Jakub Kicinski
2024-08-21 8:41 ` Breno Leitao
2024-08-21 22:54 ` Jakub Kicinski
2024-08-22 10:01 ` Breno Leitao
2024-08-19 10:36 ` [PATCH net-next v2 3/3] netconsole: Populate dynamic entry even if netpoll fails Breno Leitao
2024-08-20 23:27 ` Jakub Kicinski
2024-08-21 8:21 ` Breno Leitao
2024-08-21 22:49 ` Jakub Kicinski
2024-08-22 11:00 ` Breno Leitao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZscaMfmnU3HmZWm5@gmail.com \
--to=leitao@debian.org \
--cc=aijay@meta.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).