From: Paolo Abeni <pabeni@redhat.com>
To: Eric Dumazet <edumazet@google.com>
Cc: "Jakub Kicinski" <kuba@kernel.org>,
"Jamal Hadi Salim" <jhs@mojatatu.com>,
"Simon Horman" <horms@kernel.org>,
"Jiri Pirko" <jiri@resnulli.us>,
"Toke Høiland-Jørgensen" <toke@toke.dk>,
netdev@vger.kernel.org, eric.dumazet@gmail.com,
"David S . Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next 2/2] net/sched: fq_codel: local packets no longer count against memory limit
Date: Thu, 14 May 2026 12:06:42 +0200 [thread overview]
Message-ID: <1b6d8eab-798b-4dce-be1b-adc93b0fd9fc@redhat.com> (raw)
In-Reply-To: <CANn89iJ=t=DPd5cw0YTdcj9dNv9BthW+=3jcHDXgtQYmp1nX1w@mail.gmail.com>
On 5/14/26 10:49 AM, Eric Dumazet wrote:
> On Thu, May 14, 2026 at 1:24 AM Paolo Abeni <pabeni@redhat.com> wrote:
>> On 5/12/26 11:48 AM, Eric Dumazet wrote:
>>> Commit 95b58430abe7 ("fq_codel: add memory limitation per queue")
>>> claimed that the 32Mb default was "reasonable even for heavy duty usages."
>>>
>>> In practice, this is not the case.
>>>
>>> Packets that are associated with local sockets sk_wmem_alloc
>>> do not really need additional memory control.
>>>
>>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>>> ---
>>> net/sched/sch_fq_codel.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
>>> index 1b1de693d4c64a1f5f4e9e788371829dea91740e..71107dc52be799a14f370f2ad74d2eadd93992c1 100644
>>> --- a/net/sched/sch_fq_codel.c
>>> +++ b/net/sched/sch_fq_codel.c
>>> @@ -212,7 +212,7 @@ static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch,
>>> q->new_flow_count++;
>>> WRITE_ONCE(flow->deficit, q->quantum);
>>> }
>>> - get_codel_cb(skb)->mem_usage = skb->truesize;
>>> + get_codel_cb(skb)->mem_usage = is_skb_wmem(skb) ? 0 : skb->truesize;
>>> q->memory_usage += get_codel_cb(skb)->mem_usage;
>>> memory_limited = q->memory_usage > q->memory_limit;
>>> qdisc_qlen_inc(sch);
>>
>> I *think* this patch is causing TDC self-tests failures:
>>
>> # not ok 704 a4bb - Test FQ_CODEL with HTB parent - force packet drop with empty queue
>> # Could not match regex pattern. Verify command output:
>> # qdisc fq_codel 10: parent 1:10 limit 10240p flows 1 quantum 1514 target 99us interval 999us memory_limit 1b ecn drop_batch 64
>> # Sent 490 bytes 5 pkt (dropped 0, overlimits 0 requeues 0)
>> # backlog 0b 0p requeues 0
>> # maxpacket 98 drop_overlimit 0 new_flow_count 1 ecn_mark 0
>> # new_flows_len 1 old_flows_len 0
>>
>> whole log at:
>>
>> https://github.com/p4tc-dev/tc-executor/tree/storage/artifacts/645644/1-tdc-sh
>>
>> Looking at the test code, I think the patch broke it, but the failures
>> started a little afterward the patch merge, so I'm possibly
>> misunderstanding something here.
>>
>> Thanks,
>>
>> Paolo
>>
>
> It seems this test uses a memory limit of 1 byte.
>
> $TC qdisc add dev $DUMMY parent 1:10 handle 10: fq_codel memory_limit
> 1 flows 1 target 0.1ms interval 1ms
>
> This might be a typo, I think they expected a limit of 0 packet.
FTR, I think/agree a change to the self-tests would be preferable.
/P
next prev parent reply other threads:[~2026-05-14 10:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 9:48 [PATCH net-next 0/2] net/sched: refine fq_codel memory limits Eric Dumazet
2026-05-12 9:48 ` [PATCH net-next 1/2] net: make is_skb_wmem() available to modules Eric Dumazet
2026-05-12 12:06 ` Toke Høiland-Jørgensen
2026-05-12 9:48 ` [PATCH net-next 2/2] net/sched: fq_codel: local packets no longer count against memory limit Eric Dumazet
2026-05-12 12:11 ` Toke Høiland-Jørgensen
2026-05-12 17:50 ` Eric Dumazet
2026-05-12 18:15 ` Toke Høiland-Jørgensen
2026-05-14 8:24 ` Paolo Abeni
2026-05-14 8:49 ` Eric Dumazet
2026-05-14 9:00 ` Eric Dumazet
2026-05-14 10:06 ` Paolo Abeni [this message]
2026-05-14 2:30 ` [PATCH net-next 0/2] net/sched: refine fq_codel memory limits patchwork-bot+netdevbpf
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=1b6d8eab-798b-4dce-be1b-adc93b0fd9fc@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=toke@toke.dk \
/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