• Willem de Bruijn's avatar
    virtio-net: transmit napi · b92f1e67
    Willem de Bruijn authored
    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: default avatarWillem de Bruijn <willemb@google.com>
    Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b92f1e67
virtio_net.c 68.9 KB