mbox series

[v2,0/2] virtio-net: re-arm/re-schedule when tx_burst stops virtio_net_flush_tx()

Message ID 20221014132004.114602-1-lvivier@redhat.com
Headers show
Series virtio-net: re-arm/re-schedule when tx_burst stops virtio_net_flush_tx() | expand

Message

Laurent Vivier Oct. 14, 2022, 1:20 p.m. UTC
When virtio_net_flush_tx() reaches the tx_burst value all the queue is
not flushed and nothing restart the timer or the bottom half function.

For BH, this is only missing in the virtio_net_tx_complete() function.
For the timer, the same fix is needed in virtio_net_tx_complete() but
it must be also managed in the TX timer function.

v2:
- fix also tx timer

Laurent Vivier (2):
  virtio-net: fix bottom-half packet TX on asynchronous completion
  virtio-net: fix TX timer with tx_burst

 hw/net/virtio-net.c | 68 +++++++++++++++++++++++++++++++++++++--------
 1 file changed, 56 insertions(+), 12 deletions(-)

Comments

Michael S. Tsirkin Oct. 26, 2022, 8:23 p.m. UTC | #1
On Fri, Oct 14, 2022 at 03:20:02PM +0200, Laurent Vivier wrote:
> When virtio_net_flush_tx() reaches the tx_burst value all the queue is
> not flushed and nothing restart the timer or the bottom half function.
> 
> For BH, this is only missing in the virtio_net_tx_complete() function.
> For the timer, the same fix is needed in virtio_net_tx_complete() but
> it must be also managed in the TX timer function.
> 
> v2:
> - fix also tx timer


Jason's area, and he wants a small nit fixed.
Looks good to me overall:

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

> Laurent Vivier (2):
>   virtio-net: fix bottom-half packet TX on asynchronous completion
>   virtio-net: fix TX timer with tx_burst
> 
>  hw/net/virtio-net.c | 68 +++++++++++++++++++++++++++++++++++++--------
>  1 file changed, 56 insertions(+), 12 deletions(-)
> 
> -- 
> 2.37.3
>