[dpdk-stable] patch 'power: fix socket indicator value' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 10 15:59:17 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/16/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/69d685054d2787da287b98f81c9855e6eeda230f

Thanks.

Kevin.

---
>From 69d685054d2787da287b98f81c9855e6eeda230f Mon Sep 17 00:00:00 2001
From: Marcin Hajkowski <marcinx.hajkowski at intel.com>
Date: Fri, 27 Sep 2019 09:42:13 +0100
Subject: [PATCH] power: fix socket indicator value

[ upstream commit b4b2f84a5970709e7fb060e3bcd4afb7c19b0121 ]

Currently 0 is being used for not connected slot indication.
This is not consistent with linux doc which identifies 0 as valid
(connected) slot, thus modification was done to change it.

Fixes: cd0d5547 ("power: vm communication channels in guest")

Signed-off-by: Marcin Hajkowski <marcinx.hajkowski at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Acked-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 lib/librte_power/guest_channel.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index c17ea46b4..9cf7d2cb2 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -20,5 +20,5 @@
 #define RTE_LOGTYPE_GUEST_CHANNEL RTE_LOGTYPE_USER1
 
-static int global_fds[RTE_MAX_LCORE];
+static int global_fds[RTE_MAX_LCORE] = { [0 ... RTE_MAX_LCORE-1] = -1 };
 
 int
@@ -36,5 +36,5 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
 	}
 	/* check if path is already open */
-	if (global_fds[lcore_id] != 0) {
+	if (global_fds[lcore_id] != -1) {
 		RTE_LOG(ERR, GUEST_CHANNEL, "Channel(%u) is already open with fd %d\n",
 				lcore_id, global_fds[lcore_id]);
@@ -85,5 +85,5 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
 error:
 	close(fd);
-	global_fds[lcore_id] = 0;
+	global_fds[lcore_id] = -1;
 	return -1;
 }
@@ -101,5 +101,5 @@ guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id)
 	}
 
-	if (global_fds[lcore_id] == 0) {
+	if (global_fds[lcore_id] < 0) {
 		RTE_LOG(ERR, GUEST_CHANNEL, "Channel is not connected\n");
 		return -1;
@@ -135,7 +135,7 @@ guest_channel_host_disconnect(unsigned int lcore_id)
 		return;
 	}
-	if (global_fds[lcore_id] == 0)
+	if (global_fds[lcore_id] < 0)
 		return;
 	close(global_fds[lcore_id]);
-	global_fds[lcore_id] = 0;
+	global_fds[lcore_id] = -1;
 }
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-10 14:49:41.966700696 +0000
+++ 0043-power-fix-socket-indicator-value.patch	2019-12-10 14:49:39.074457357 +0000
@@ -1 +1 @@
-From b4b2f84a5970709e7fb060e3bcd4afb7c19b0121 Mon Sep 17 00:00:00 2001
+From 69d685054d2787da287b98f81c9855e6eeda230f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit b4b2f84a5970709e7fb060e3bcd4afb7c19b0121 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list