From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 60C54A04F0 for ; Thu, 19 Dec 2019 15:40:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 573951BF7B; Thu, 19 Dec 2019 15:40:20 +0100 (CET) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id B71E21BF7B for ; Thu, 19 Dec 2019 15:40:19 +0100 (CET) Received: by mail-wr1-f68.google.com with SMTP id z3so6244416wru.3 for ; Thu, 19 Dec 2019 06:40:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d6d2kq2LD3LryjjxorKBS8y0rDNaexyjqAJMMHfFkz0=; b=p2rWKY6FYYUFg4Y/4nKmPJSPO+PyyzcCc35XzQsJrHYJtO7VzD2ziv2T7sx6TmF8Bf EVCFr+bbHDiGB1dU2eUnsDXlVKfpXmPUaoLpxsjt+KVIZsMIMOPbj74vUFMQniEAP5GG EUOT0vR84hSacVD1TAhJtb3PQKuzL00hxou9d1LmzBlokA1g2K2pARgwH0KuzvlWD+2g bOL2JSN1IcjfmB8Riwv5SWqMimxNPRfHnuuDpEt6Q5TsyFtv3RkkIm9D4TfuJrsmIsmh C60qWOHkZy6g/oKVYOpkf5lZcreBNcF3TrNbHsHYYw3OnTcLHeENjhEqhJ84j1UYZbJo /Pbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d6d2kq2LD3LryjjxorKBS8y0rDNaexyjqAJMMHfFkz0=; b=TqjcS+LFGdpmyZZ1ahDvNoRXrgmNP18F3ksvn4L6Vs0en7OeyTKKeCD3B0JpjzKuud 3+bt2oGMEKzWAn3WKjTFJSUbUAOmu+u2EchDXpgJzqRW0zCU499e9+gw4mVn8+XwKiiU oKqlYEMurscrW4WsEnsG2aGO7S41HWtNAGjjohRFVbZBYBEAL5fal4idrT1JTUvrI8k9 4O0I6WbGqVgqFmha0OqxDs+pHOL1zVcaRJgObRuqvOu+wCNUayYm3iEnaLcO4kiZ3MAx jmpDiUImF9n3bSf1ZtEKcFoJnqUPCI1z08WQu5kOjQhXI7FhXEqgcxcRIMcm2zUqjcAc rJDw== X-Gm-Message-State: APjAAAUwva2g9zVS5uL/hVdzfy/hRFhaaxIY2rn0kdxy3fb63c86gb+h zjz9zTggHMmjFdyuw09RiNQ= X-Google-Smtp-Source: APXvYqy5eHAGd3Kgf5mmzqPG79kD1kFqS6G/WIM6xO9lHxAqR1Uh38KHCm0zcLkfRSQapwtbpo0LBQ== X-Received: by 2002:a5d:6211:: with SMTP id y17mr9798995wru.344.1576766419321; Thu, 19 Dec 2019 06:40:19 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id q3sm6786734wrn.33.2019.12.19.06.40.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:40:18 -0800 (PST) From: luca.boccassi@gmail.com To: Marcin Hajkowski Cc: Maxime Coquelin , Anatoly Burakov , dpdk stable Date: Thu, 19 Dec 2019 14:34:02 +0000 Message-Id: <20191219143447.21506-95-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'power: fix socket indicator value' has been queued to LTS release 17.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Reviewed-by: Maxime Coquelin Acked-by: Anatoly Burakov --- 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 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@dpdk.org Signed-off-by: Marcin Hajkowski Reviewed-by: Maxime Coquelin @@ -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; }