From: Tiwei Bie Date: Thu, 11 Oct 2018 14:22:34 +0000 (+0800) Subject: vhost: fix notification for packed ring X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=cd9012c3f8d3905a8212da7945233a17633e796f;p=dpdk.git vhost: fix notification for packed ring The notification can't be disabled in packed ring when application tries to disable notification, because the device event flags field is overwritten by an unexpected value. This patch fixes this issue. Fixes: b1cce26af1dc ("vhost: add notification for packed ring") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie Reviewed-by: Michael S. Tsirkin Reviewed-by: Maxime Coquelin Acked-by: Jason Wang --- diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index e62f4c594a..047ee535c4 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -667,8 +667,10 @@ vhost_enable_notify_packed(struct virtio_net *dev, { uint16_t flags; - if (!enable) + if (!enable) { vq->device_event->flags = VRING_EVENT_F_DISABLE; + return; + } flags = VRING_EVENT_F_ENABLE; if (dev->features & (1ULL << VIRTIO_RING_F_EVENT_IDX)) {