[PATCH 2/4] netdev queue flow control for TUN

From
Simon Schippers <hidden>
Date
2025-09-03 18:49:55
Also in
kvm, lkml, virtualization
Reply to
Michael S. Tsirkin, 2025-09-03
Michael S. Tsirkin wrote:
On Tue, Sep 02, 2025 at 10:09:55AM +0200, Simon Schippers wrote:
quoted
The netdev queue is stopped in tun_net_xmit after inserting an SKB into
the ring buffer if the ring buffer became full because of that. If the
insertion into the ptr_ring fails, the netdev queue is also stopped and
the SKB is dropped. However, this never happened in my testing. To ensure
that the ptr_ring change is available to the consumer before the netdev
queue stop, an smp_wmb() is used.
I think the stop -> wake bounce involves enough barriers already,
no need for us to get cute.
Yes, you and Jason are correct, it seems to be unnecessary. I just removed
the barriers, and it tests fine!
Thread (25 messages) 25 messages, 4 authors, last reply 2025-09-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help