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!