Skip to content
Commit 22bc63c5 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin
Browse files

virtio_net: move txq wakeups under tx q lock



We currently check num_free outside tx q lock
which is unsafe: new packets can arrive meanwhile
and there won't be space in the queue.
Thus a spurious queue wakeup causing overhead
and even packet drops.

Move the check under the lock to fix that.

Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 5a2f966d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment