From: netdev-bot+sashiko@kernel.org
To: leitao@debian.org
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
corbet@lwn.net, skhan@linuxfoundation.org, shuah@kernel.org,
rdunlap@infradead.org, paulmck@kernel.org, gustavold@gmail.com,
asantostc@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kselftest@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH net-next v2 3/4] netconsole: allow configuring the rate limit burst through configfs
Date: Sat, 12 Sep 2026 00:06:35 +0000 [thread overview]
Message-ID: <178917159585.219967.569342306075085345@kernel.org> (raw)
In-Reply-To: <20260910-netcons_ratelimit-v2-3-ebf0dd91e26e@debian.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider:
Critical: 0 · High: 0 · Medium: 0 · Low: 1
- [Low] New user-visible configfs attribute `ratelimit_burst` (registered
in netconsole_target_attrs[] at drivers/net/netconsole.c:1782,…
--
netconsole: allow configuring the rate limit burst through configfs
This adds a writable ratelimit_burst configfs attribute to each netconsole
target so the ratelimit burst (number of messages allowed per interval) can
be tuned instead of always using the ratelimit default of 10. The new
attribute is registered in netconsole_target_attrs[].
> diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
> index faf8f9bbc6c0c..10e02b7c3f9cb 100644
> --- a/drivers/net/netconsole.c
> +++ b/drivers/net/netconsole.c
[ ... ]
> @@ -1371,6 +1378,27 @@ static ssize_t ratelimit_interval_ms_store(struct config_item *item,
> return count;
> }
>
> +static ssize_t ratelimit_burst_store(struct config_item *item, const char *buf,
> + size_t count)
> +{
> + struct netconsole_target *nt = to_target(item);
> + unsigned int burst;
> + ssize_t ret;
> +
> + ret = kstrtouint(buf, 10, &burst);
> + if (ret)
> + return ret;
> +
> + if (burst > INT_MAX)
> + return -ERANGE;
> +
> + dynamic_netconsole_mutex_lock();
> + WRITE_ONCE(nt->ratelimit.burst, burst);
> + dynamic_netconsole_mutex_unlock();
> +
> + return count;
> +}
> +
[ ... ]
> @@ -1750,6 +1779,7 @@ static struct configfs_attribute *netconsole_target_attrs[] = {
> &attr_remote_mac,
> &attr_transmit_errors,
> &attr_ratelimit_interval_ms,
> + &attr_ratelimit_burst,
> NULL,
> };
[Severity: Low]
This isn't a bug, but should the new configfs file also be described in
Documentation/networking/netconsole.rst?
At this commit the document still enumerates the target attributes with:
The interface exposes these parameters of a netconsole target to userspace:
...
transmit_errors Number of packet send errors (read-only)
so neither ratelimit_interval_ms nor the ratelimit_burst added here appears
in that table.
Things a reader cannot find documented for ratelimit_burst_store() /
ratelimit_burst_show(): the default value (DEFAULT_RATELIMIT_BURST, 10, as
set by netconsole_ratelimit_init()), the accepted range, what a burst of 0
means, and whether the value may be written while the target is enabled.
Note that the later patch in this series, "docs: netconsole: document rate
limit feature", adds a dedicated "Rate limiting" section covering both
ratelimit files, the burst default of 10, the zero semantics and the fact
that both knobs can be written while the target is enabled, so the only
remaining difference is that the ratelimit rows are not listed in the older
parameter table above. Was leaving them out of that table intentional?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260910-netcons_ratelimit-v2-0-ebf0dd91e26e%40debian.org
next prev parent reply other threads:[~2026-09-12 0:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 13:46 [PATCH net-next v2 0/4] netconsole: Support messages ratelimit-ing Breno Leitao
2026-09-10 13:46 ` [PATCH net-next v2 1/4] netconsole: add a per-target message rate limit Breno Leitao
2026-09-12 0:06 ` netdev-bot+sashiko
2026-09-10 13:46 ` [PATCH net-next v2 2/4] netconsole: allow configuring the rate limit interval through configfs Breno Leitao
2026-09-12 0:06 ` netdev-bot+sashiko
2026-09-10 13:46 ` [PATCH net-next v2 3/4] netconsole: allow configuring the rate limit burst " Breno Leitao
2026-09-12 0:06 ` netdev-bot+sashiko [this message]
2026-09-10 13:46 ` [PATCH net-next v2 4/4] docs: netconsole: document rate limit feature Breno Leitao
2026-09-12 0:06 ` netdev-bot+sashiko
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=178917159585.219967.569342306075085345@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=asantostc@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gustavold@gmail.com \
--cc=horms@kernel.org \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paulmck@kernel.org \
--cc=rdunlap@infradead.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
/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
all inboxes | Powered by JetHome®