]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
virtio-net: transmit napi
authorWillem de Bruijn <willemb@google.com>
Mon, 24 Apr 2017 17:49:27 +0000 (13:49 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Apr 2017 03:55:19 +0000 (23:55 -0400)
commitb92f1e6751a6aaaf0b1e05128661ce0f23ed3695
tree6bf84edc9b5fc08886268675a2ec01f934070d2b
parente4e8452a4ab304913c4b4242ba06bc4624f14a84
virtio-net: transmit napi

Convert virtio-net to a standard napi tx completion path. This enables
better TCP pacing using TCP small queues and increases single stream
throughput.

The virtio-net driver currently cleans tx descriptors on transmission
of new packets in ndo_start_xmit. Latency depends on new traffic, so
is unbounded. To avoid deadlock when a socket reaches its snd limit,
packets are orphaned on tranmission. This breaks socket backpressure,
including TSQ.

Napi increases the number of interrupts generated compared to the
current model, which keeps interrupts disabled as long as the ring
has enough free descriptors. Keep tx napi optional and disabled for
now. Follow-on patches will reduce the interrupt cost.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c