On Sun, May 15, 2022 at 03:29:17PM -0500, Mike Christie wrote:
From: Andrey Ryabinin <arbn@xxxxxxxxxxxxxxx> vhost_net_flush_vq() calls vhost_work_dev_flush() twice passing vhost_dev pointer obtained via 'n->poll[index].dev' and 'n->vqs[index].vq.poll.dev'. This is actually the same pointer, initialized in vhost_net_open()/vhost_dev_init()/vhost_poll_init() Remove vhost_net_flush_vq() and call vhost_work_dev_flush() directly. Do the flushes only once instead of several flush calls in a row which seems rather useless. Signed-off-by: Andrey Ryabinin <arbn@xxxxxxxxxxxxxxx> [drop vhost_dev forward declaration in vhost.h] Signed-off-by: Mike Christie <michael.christie@xxxxxxxxxx> --- drivers/vhost/net.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
Reviewed-by: Stefano Garzarella <sgarzare@xxxxxxxxxx> _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization