From: Marvin Liu Date: Fri, 15 May 2020 02:35:07 +0000 (+0800) Subject: net/virtio: fix unexpected event after reconnect X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f50560a54b8bd6b52d763213aee40f0164fb4099;p=dpdk.git 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 --- 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; }