[dpdk-stable] patch 'net/vhost: fix redundant queue state event' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 3 19:26:18 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/7cc59d5a0c085e4e4d2556525615f0b3084441d2

Thanks.

Kevin.

---
>From 7cc59d5a0c085e4e4d2556525615f0b3084441d2 Mon Sep 17 00:00:00 2001
From: Noa Ezra <noae at mellanox.com>
Date: Thu, 20 Jun 2019 06:33:03 +0000
Subject: [PATCH] net/vhost: fix redundant queue state event

[ upstream commit f2f0577eff3d13e761996c7390a244963b433bdc ]

In some situations, when a virtual machine is starting,
vring_state_changed can be called while there was no change in the
queue state. This fix makes sure that there was really a change in the
queue state before calling the callback for EVENT_QUEUE_STATE.

Fixes: ee584e9710b9 ("vhost: add driver on top of the library")

Signed-off-by: Noa Ezra <noae at mellanox.com>
Reviewed-by: Matan Azrad <matan at mellanox.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index ad18b1bd5..b70b9152f 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -852,4 +852,8 @@ vring_state_changed(int vid, uint16_t vring, int enable)
 	state = vring_states[eth_dev->data->port_id];
 	rte_spinlock_lock(&state->lock);
+	if (state->cur[vring] == enable) {
+		rte_spinlock_unlock(&state->lock);
+		return 0;
+	}
 	state->cur[vring] = enable;
 	state->max_vring = RTE_MAX(vring, state->max_vring);
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:52.343802104 +0000
+++ 0009-net-vhost-fix-redundant-queue-state-event.patch	2019-12-03 17:29:51.703750932 +0000
@@ -1 +1 @@
-From f2f0577eff3d13e761996c7390a244963b433bdc Mon Sep 17 00:00:00 2001
+From 7cc59d5a0c085e4e4d2556525615f0b3084441d2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit f2f0577eff3d13e761996c7390a244963b433bdc ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index c3ba60276..5de21f143 100644
+index ad18b1bd5..b70b9152f 100644
@@ -25 +26 @@
-@@ -854,4 +854,8 @@ vring_state_changed(int vid, uint16_t vring, int enable)
+@@ -852,4 +852,8 @@ vring_state_changed(int vid, uint16_t vring, int enable)



More information about the stable mailing list