Blame SOURCES/0019-net-virtio-fix-interrupt-helper-for-packed-ring.patch

b91920
From daa23dec25e8e418cd4e921531c82b5aae39b362 Mon Sep 17 00:00:00 2001
b91920
From: Tiwei Bie <tiwei.bie@intel.com>
b91920
Date: Tue, 19 Mar 2019 14:43:04 +0800
b91920
Subject: [PATCH] net/virtio: fix interrupt helper for packed ring
b91920
b91920
When disabling interrupt, the shadow event flags should also be
b91920
updated accordingly. The unnecessary wmb is also dropped.
b91920
b91920
Fixes: e9f4feb7e622 ("net/virtio: add packed virtqueue helpers")
b91920
Cc: stable@dpdk.org
b91920
b91920
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
b91920
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
b91920
---
b91920
 drivers/net/virtio/virtqueue.h | 9 +++++----
b91920
 1 file changed, 5 insertions(+), 4 deletions(-)
b91920
b91920
diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
b91920
index 9e74b7bd0..c9f1c0afa 100644
b91920
--- a/drivers/net/virtio/virtqueue.h
b91920
+++ b/drivers/net/virtio/virtqueue.h
b91920
@@ -296,12 +296,13 @@ vring_desc_init_split(struct vring_desc *dp, uint16_t n)
b91920
 static inline void
b91920
 virtqueue_disable_intr_packed(struct virtqueue *vq)
b91920
 {
b91920
-	uint16_t *event_flags = &vq->ring_packed.driver_event->desc_event_flags;
b91920
-
b91920
-	*event_flags = RING_EVENT_FLAGS_DISABLE;
b91920
+	if (vq->event_flags_shadow != RING_EVENT_FLAGS_DISABLE) {
b91920
+		vq->event_flags_shadow = RING_EVENT_FLAGS_DISABLE;
b91920
+		vq->ring_packed.driver_event->desc_event_flags =
b91920
+			vq->event_flags_shadow;
b91920
+	}
b91920
 }
b91920
 
b91920
-
b91920
 /**
b91920
  * Tell the backend not to interrupt us.
b91920
  */
b91920
-- 
b91920
2.21.0
b91920