From f50560a54b8bd6b52d763213aee40f0164fb4099 Mon Sep 17 00:00:00 2001 From: Marvin Liu Date: Fri, 15 May 2020 10:35:07 +0800 Subject: [PATCH] net/virtio: fix unexpected event after reconnect Event notification should be disabled after virtqueue initialization and enabled by calling rte_eth_dev_rx_intr_enable later. When virtio user device reconnecting to vhost, virtqueue_disable_intr should be called to disable event notification. Fixes: 6ebbf4109f35 ("net/virtio-user: fix packed ring server mode") Cc: stable@dpdk.org Signed-off-by: Marvin Liu Acked-by: Xiao Wang Reviewed-by: Maxime Coquelin --- drivers/net/virtio/virtqueue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c index 408bba236a..2702e120ee 100644 --- a/drivers/net/virtio/virtqueue.c +++ b/drivers/net/virtio/virtqueue.c @@ -175,6 +175,7 @@ virtqueue_rxvq_reset_packed(struct virtqueue *vq) vring_desc_init_packed(vq, size); + virtqueue_disable_intr(vq); return 0; } @@ -211,5 +212,6 @@ virtqueue_txvq_reset_packed(struct virtqueue *vq) vring_desc_init_packed(vq, size); + virtqueue_disable_intr(vq); return 0; }