]> www.infradead.org Git - qemu-nvme.git/commit
virtio-net: fix TX timer with tx_burst
authorLaurent Vivier <lvivier@redhat.com>
Thu, 20 Oct 2022 09:58:46 +0000 (11:58 +0200)
committerJason Wang <jasowang@redhat.com>
Fri, 28 Oct 2022 05:28:52 +0000 (13:28 +0800)
commit7550a82259fcf9ce5f1f6443ced779d0eb8afdca
tree42abd6f57db3904c9b2e77d84a69eff6a9a7794b
parentdf8d07081718c29d04d106583d9c300128686cda
virtio-net: fix TX timer with tx_burst

When virtio_net_flush_tx() reaches the tx_burst value all
the queue is not flushed and nothing restart the timer.

Fix that by doing for TX timer as we do for bottom half TX:
rearming the timer if we find any packet to send during the
virtio_net_flush_tx() call.

Fixes: e3f30488e5f8 ("virtio-net: Limit number of packets sent per TX flush")
Cc: alex.williamson@redhat.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/virtio-net.c