vhost, vhost_net: add helper to check if vq has work
authorMike Christie <michael.christie@oracle.com>
Mon, 26 Jun 2023 23:22:54 +0000 (18:22 -0500)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 3 Jul 2023 16:15:13 +0000 (12:15 -0400)
commit9784df151a601fa1d6d146f8a7f35a2d875e2976
treecb2190c940a5747c4b35732247324f142cae122f
parent737bdb643c4f488defd6c226eb40de2c8f6e3f75
vhost, vhost_net: add helper to check if vq has work

In the next patches each vq might have different workers so one could
have work but others do not. For net, we only want to check specific vqs,
so this adds a helper to check if a vq has work pending and converts
vhost-net to use it.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20230626232307.97930-5-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/net.c
drivers/vhost/vhost.c
drivers/vhost/vhost.h