From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 4/4] net: shaper: add a note that we expect cap dumps to be tiny
Date: Tue, 9 Jun 2026 11:32:24 -0700 [thread overview]
Message-ID: <20260609183224.1108521-5-kuba@kernel.org> (raw)
In-Reply-To: <20260609183224.1108521-1-kuba@kernel.org>
Various AI scan tools may complain that we don't support resuming
the cap dump. This is true, but the cap dumps are tiny.
net_shaper_nl_cap_pre_dumpit() sets up the dump for just
one device, so the size of the dump scales with NET_SHAPER_SCOPE_MAX (3).
We don't expect them to ever need more than a 4kB page.
Document this.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
net/shaper/shaper.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/shaper/shaper.c b/net/shaper/shaper.c
index 5a3b44c5d10f..b65b356da16b 100644
--- a/net/shaper/shaper.c
+++ b/net/shaper/shaper.c
@@ -1452,6 +1452,8 @@ int net_shaper_nl_cap_get_dumpit(struct sk_buff *skb,
ret = net_shaper_cap_fill_one(skb, binding, scope, flags,
info);
+ /* cap dumps are tiny, we expect them to fit in a single skb */
+ WARN_ON_ONCE(ret == -EMSGSIZE);
if (ret)
return ret;
}
--
2.54.0
prev parent reply other threads:[~2026-06-09 18:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 18:32 [PATCH net-next 0/4] net: shaper: follow ups to recent fixes Jakub Kicinski
2026-06-09 18:32 ` [PATCH net-next 1/4] net: shaper: drop redundant xa_lock() bracketing Jakub Kicinski
2026-06-09 18:32 ` [PATCH net-next 2/4] net: shaper: drop unnecessary kfree_rcu in pre_insert Jakub Kicinski
2026-06-09 18:32 ` [PATCH net-next 3/4] net: shaper: add a comment why we don't need kfree_rcu() in flush Jakub Kicinski
2026-06-09 18:32 ` Jakub Kicinski [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=20260609183224.1108521-5-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@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