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