Thread (7 messages) flat view 7 messages, 2 authors, 13d ago

Re: [PATCH net 1/2] net/sched: pfifo_fast: cap ring size and account to memcg

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-08-22 23:02:35
Also in: stable

On Sat, 22 Aug 2026 18:14:49 -0400 Jamal Hadi Salim wrote:
quoted
On Thu, 20 Aug 2026 05:57:41 -0400 Jamal Hadi Salim wrote:  
quoted
+     if (qlen > 65535) {
+             pr_warn_ratelimited("pfifo_fast: capping ring size %u to 65535 for dev %s\n",
+                                 qlen, qdisc_dev(qdisc)->name);
+             qlen = 65535;
+     }  
Why not a hard cap?  
sorry, where to put the hard cap and what would it be?
Or maybe you misspoke and intended to say "why put a hardcap"?

Or maybe in this case probably safer to just reject the change if > hard cap?
The latter, I'm asking why not:

if (qlen > 64k)
	return -EINVAL;

To be clear I didn't dig into the code, just read the commit msg, so
maybe you have a reason. But the "normal behavior" for out of range
params should be to return an error rather than silently clamp() into
the allowed range?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help