Blame SOURCES/0002-vhost-propagate-set-features-handling-error.patch

c7ffa4
From d7f0078e3a3d838b4ec6a87dca62771246e53db6 Mon Sep 17 00:00:00 2001
c7ffa4
From: Maxime Coquelin <maxime.coquelin@redhat.com>
c7ffa4
Date: Wed, 13 Dec 2017 09:51:07 +0100
c7ffa4
Subject: [PATCH 2/6] vhost: propagate set features handling error
c7ffa4
c7ffa4
Not propagating VHOST_USER_SET_FEATURES request handling
c7ffa4
error may result in unpredictable behavior, as host and
c7ffa4
guests features may no more be synchronized.
c7ffa4
c7ffa4
This patch fixes this by reporting the error to the upper
c7ffa4
layer, which would result in the device being destroyed
c7ffa4
and the connection with the master to be closed.
c7ffa4
c7ffa4
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
c7ffa4
Acked-by: Laszlo Ersek <lersek@redhat.com>
c7ffa4
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
c7ffa4
(cherry picked from commit 59fe5e17d9308b008ffa22ea250ddd363c84c3b5)
c7ffa4
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
c7ffa4
---
c7ffa4
 dpdk-17.11/lib/librte_vhost/vhost_user.c | 4 +++-
c7ffa4
 1 file changed, 3 insertions(+), 1 deletion(-)
c7ffa4
c7ffa4
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
c7ffa4
index 545dbcb2b..471b1612c 100644
c7ffa4
--- a/lib/librte_vhost/vhost_user.c
c7ffa4
+++ b/lib/librte_vhost/vhost_user.c
c7ffa4
@@ -1263,7 +1263,9 @@ vhost_user_msg_handler(int vid, int fd)
c7ffa4
 		send_vhost_reply(fd, &msg;;
c7ffa4
 		break;
c7ffa4
 	case VHOST_USER_SET_FEATURES:
c7ffa4
-		vhost_user_set_features(dev, msg.payload.u64);
c7ffa4
+		ret = vhost_user_set_features(dev, msg.payload.u64);
c7ffa4
+		if (ret)
c7ffa4
+			return -1;
c7ffa4
 		break;
c7ffa4
 
c7ffa4
 	case VHOST_USER_GET_PROTOCOL_FEATURES:
c7ffa4
-- 
c7ffa4
2.14.3
c7ffa4