public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Wang Liang <wangliang74@huawei.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org, dsahern@kernel.org,
	yuehaibing@huawei.com, zhangchangzhong@huawei.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: add sysctl ndisc_debug
Date: Tue, 24 Jun 2025 17:31:15 +0300	[thread overview]
Message-ID: <aFq2s3SnM1lzuGHb@shredder> (raw)
In-Reply-To: <20250624125115.3926152-1-wangliang74@huawei.com>

On Tue, Jun 24, 2025 at 08:51:15PM +0800, Wang Liang wrote:
> Ipv6 ndisc uses ND_PRINTK to print logs. However it only works when
> ND_DEBUG was set in the compilation phase. This patch adds sysctl
> ndisc_debug, so we can change the print switch when system is running and
> get ipv6 ndisc log to debug.

Is there a good reason to do this instead of using dynamic debug? Note
that we will never be able to remove this sysctl.

Users of vanilla kernels can only see the messages printed with 'val'
being 0 or 1. Maybe convert them to call net_{err,warn}_ratelimited()
instead of ND_PRINTK() and convert the rest to net_dbg_ratelimited() so
that users will be able to enable / disable them during runtime via the
dynamic debug interface?

  reply	other threads:[~2025-06-24 14:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24 12:51 [PATCH net-next] net: add sysctl ndisc_debug Wang Liang
2025-06-24 14:31 ` Ido Schimmel [this message]
2025-06-27  1:13   ` Wang Liang

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=aFq2s3SnM1lzuGHb@shredder \
    --to=idosch@idosch.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=wangliang74@huawei.com \
    --cc=yuehaibing@huawei.com \
    --cc=zhangchangzhong@huawei.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