Skip to content
Commit dc9c9e72 authored by Yunjian Wang's avatar Yunjian Wang Committed by Jakub Kicinski
Browse files

vhost_net: avoid tx queue stuck when sendmsg fails



Currently the driver doesn't drop a packet which can't be sent by tun
(e.g bad packet). In this case, the driver will always process the
same packet lead to the tx queue stuck.

To fix this issue:
1. in the case of persistent failure (e.g bad packet), the driver
   can skip this descriptor by ignoring the error.
2. in the case of transient failure (e.g -ENOBUFS, -EAGAIN and -ENOMEM),
   the driver schedules the worker to try again.

Signed-off-by: default avatarYunjian Wang <wangyunjian@huawei.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/r/1610685980-38608-1-git-send-email-wangyunjian@huawei.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 99d51897
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment