From 7421a813778b7eb446588969569aa80fd148eea2 Mon Sep 17 00:00:00 2001 From: Jakub Kicinski Date: Tue, 9 Jun 2026 11:32:24 -0700 Subject: [PATCH] net: shaper: add a note that we expect cap dumps to be tiny 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 Link: https://patch.msgid.link/20260609183224.1108521-5-kuba@kernel.org Signed-off-by: Paolo Abeni --- 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; }