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