From: Antonio Quartulli <antonio@mandelbit.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>, jasowangio@gmail.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
mst@redhat.com, eperezma@redhat.com, shuah@kernel.org,
ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org,
john.fastabend@gmail.com, sdf@fomichev.me, maheshb@google.com,
peterpenkov96@gmail.com, netdev@vger.kernel.org,
virtualization@lists.linux.dev, linux-kselftest@vger.kernel.org,
bpf@vger.kernel.org
Subject: Re: [PATCH net v4 1/2] tun: bound the NAPI receive queue
Date: Mon, 9 Nov 2026 11:22:24 +0100 [thread overview]
Message-ID: <b1d44592-ddf8-4103-ae3c-dd1c67641f01@mandelbit.com> (raw)
In-Reply-To: <willemdebruijn.kernel.20268598d87e6@gmail.com>
Hi,
On 06/11/2026 22:04, Willem de Bruijn wrote:
> This is quite a complex solution.
Yeah, I agree. Trying to address all concerns (including Sashiko's) got
me a bit out of track.
>
> Can we perhaps simplify it a bit? For instance:
>
> On tx only keep the lockless check. Number of packets that can bypass
> that is bounded, by the number of competing threads.
>
> On rx avoid the new queue, by not temporary presenting an empty queue:
>
> spin_lock(&queue->lock);
> if (skb_queue_len(queue) <= budget) {
> skb_queue_splice_tail_init(queue, &process_queue);
> } else {
> while (skb_queue_len(&process_queue) < budget &&
> (skb = __skb_dequeue(queue)))
> __skb_queue_tail(&process_queue, skb);
> }
> spin_unlock(&queue->lock);
>
Ok, I get your point.
Let me spin another simplified version.
Cheers,
pw-bot: cr
--
Antonio Quartulli
CEO and Co-Founder
Mandelbit Srl
https://www.mandelbit.com
next prev parent reply other threads:[~2026-11-09 10:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 14:22 [PATCH net v4 0/2] tun: bound the NAPI receive queue Antonio Quartulli
2026-11-03 14:22 ` [PATCH net v4 1/2] " Antonio Quartulli
2026-11-06 21:04 ` Willem de Bruijn
2026-11-09 10:22 ` Antonio Quartulli [this message]
2026-11-07 18:20 ` netdev-bot+sashiko
2026-11-03 14:22 ` [PATCH net v4 2/2] selftests: net: add a vhost-net test for the tun NAPI queue bound Antonio Quartulli
2026-11-07 18:20 ` netdev-bot+sashiko
2026-11-03 14:27 ` [PATCH net v4 0/2] tun: bound the NAPI receive queue netdev-bot+sinfo
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=b1d44592-ddf8-4103-ae3c-dd1c67641f01@mandelbit.com \
--to=antonio@mandelbit.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=eperezma@redhat.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=jasowangio@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=maheshb@google.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peterpenkov96@gmail.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=virtualization@lists.linux.dev \
--cc=willemdebruijn.kernel@gmail.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