diff options
author | Jason Wang <jasowang@redhat.com> | 2023-01-17 11:47:07 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-01-18 14:28:56 +0000 |
commit | d71ebe8114b4bf622804b810f5e274069060a174 (patch) | |
tree | 66de68b440fb43e1fbdfe9002e9f83035eaf5ffb /net/ipv6/ioam6.c | |
parent | 7b90f5a665acd46efbbfa677a3a3a18d01ad6487 (diff) | |
download | linux-d71ebe8114b4bf622804b810f5e274069060a174.tar.bz2 |
virtio-net: correctly enable callback during start_xmit
Commit a7766ef18b33("virtio_net: disable cb aggressively") enables
virtqueue callback via the following statement:
do {
if (use_napi)
virtqueue_disable_cb(sq->vq);
free_old_xmit_skbs(sq, false);
} while (use_napi && kick &&
unlikely(!virtqueue_enable_cb_delayed(sq->vq)));
When NAPI is used and kick is false, the callback won't be enabled
here. And when the virtqueue is about to be full, the tx will be
disabled, but we still don't enable tx interrupt which will cause a TX
hang. This could be observed when using pktgen with burst enabled.
TO be consistent with the logic that tries to disable cb only for
NAPI, fixing this by trying to enable delayed callback only when NAPI
is enabled when the queue is about to be full.
Fixes: a7766ef18b33 ("virtio_net: disable cb aggressively")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ioam6.c')
0 files changed, 0 insertions, 0 deletions