[dpdk-stable] patch 'power: fix socket indicator value' has been queued to LTS release 17.11.10
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Dec 19 15:34:02 CET 2019
Hi,
FYI, your patch has been queued to LTS release 17.11.10
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/21/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.
Thanks.
Luca Boccassi
---
>From aaae8df858cc6e7615bad466d2e97f35eafda14e 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 fa5de0f53a..2c3ee7daf6 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -48,7 +48,7 @@
#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
guest_channel_host_connect(const char *path, unsigned lcore_id)
@@ -64,7 +64,7 @@ guest_channel_host_connect(const char *path, unsigned lcore_id)
return -1;
}
/* 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]);
return -1;
@@ -113,7 +113,7 @@ guest_channel_host_connect(const char *path, unsigned lcore_id)
return 0;
error:
close(fd);
- global_fds[lcore_id] = 0;
+ global_fds[lcore_id] = -1;
return -1;
}
@@ -129,7 +129,7 @@ guest_channel_send_msg(struct channel_packet *pkt, unsigned lcore_id)
return -1;
}
- if (global_fds[lcore_id] == 0) {
+ if (global_fds[lcore_id] < 0) {
RTE_LOG(ERR, GUEST_CHANNEL, "Channel is not connected\n");
return -1;
}
@@ -163,8 +163,8 @@ guest_channel_host_disconnect(unsigned lcore_id)
lcore_id, RTE_MAX_LCORE-1);
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.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-12-19 14:32:30.120938562 +0000
+++ 0095-power-fix-socket-indicator-value.patch 2019-12-19 14:32:26.221300126 +0000
@@ -1,14 +1,15 @@
-From b4b2f84a5970709e7fb060e3bcd4afb7c19b0121 Mon Sep 17 00:00:00 2001
+From aaae8df858cc6e7615bad466d2e97f35eafda14e 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")
-Cc: stable at dpdk.org
Signed-off-by: Marcin Hajkowski <marcinx.hajkowski at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
@@ -18,10 +19,10 @@
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
-index c17ea46b49..9cf7d2cb24 100644
+index fa5de0f53a..2c3ee7daf6 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
-@@ -19,7 +19,7 @@
+@@ -48,7 +48,7 @@
#define RTE_LOGTYPE_GUEST_CHANNEL RTE_LOGTYPE_USER1
@@ -29,8 +30,8 @@
+static int global_fds[RTE_MAX_LCORE] = { [0 ... RTE_MAX_LCORE-1] = -1 };
int
- guest_channel_host_connect(const char *path, unsigned int lcore_id)
-@@ -35,7 +35,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
+ guest_channel_host_connect(const char *path, unsigned lcore_id)
+@@ -64,7 +64,7 @@ guest_channel_host_connect(const char *path, unsigned lcore_id)
return -1;
}
/* check if path is already open */
@@ -39,7 +40,7 @@
RTE_LOG(ERR, GUEST_CHANNEL, "Channel(%u) is already open with fd %d\n",
lcore_id, global_fds[lcore_id]);
return -1;
-@@ -84,7 +84,7 @@ guest_channel_host_connect(const char *path, unsigned int lcore_id)
+@@ -113,7 +113,7 @@ guest_channel_host_connect(const char *path, unsigned lcore_id)
return 0;
error:
close(fd);
@@ -48,7 +49,7 @@
return -1;
}
-@@ -100,7 +100,7 @@ guest_channel_send_msg(struct channel_packet *pkt, unsigned int lcore_id)
+@@ -129,7 +129,7 @@ guest_channel_send_msg(struct channel_packet *pkt, unsigned lcore_id)
return -1;
}
@@ -57,7 +58,7 @@
RTE_LOG(ERR, GUEST_CHANNEL, "Channel is not connected\n");
return -1;
}
-@@ -134,8 +134,8 @@ guest_channel_host_disconnect(unsigned int lcore_id)
+@@ -163,8 +163,8 @@ guest_channel_host_disconnect(unsigned lcore_id)
lcore_id, RTE_MAX_LCORE-1);
return;
}
More information about the stable
mailing list