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 78387A0093 for ; Tue, 19 May 2020 14:58:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7097F1C1E4; Tue, 19 May 2020 14:58:53 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 9E24B1D61A for ; Tue, 19 May 2020 14:58:51 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id w7so15742645wre.13 for ; Tue, 19 May 2020 05:58:51 -0700 (PDT) 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=QxIhvc7/lrnVtHp8fcvU5n+1Vv9dt+qBNxps1BL9ll8=; b=U2vBV0G1i5MtL+tFDZmxA43x5FyFPFpHvOkaQFRT7DmozAY9pVyCZbQG1oy3Mt0HxS gp0PLN5JALithArE6sQ20HeVxaFmXqOMdxZUHHwwiqWwdXWeq6mB8JyAN82Bo8fFLyx7 aAcBbI4ImmaiXNreNkbCH/OPGuDWT1Q7+dT/T9boNtuTWuBqMUPVPneBwFzTcizRcIfi FAxqdwzq2B7OLLcjfu88GGIKSOavGZ+bkwPEJ/u3gYJaKS72cXQJ+Jmz6yfVHlbpcnSW e/o9R224fYEivwB++1KbnBfUHDrThyzYJsU8AuSxjR2Yu6m7ME0BnU0zStr2+laaJgc3 D91Q== 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=QxIhvc7/lrnVtHp8fcvU5n+1Vv9dt+qBNxps1BL9ll8=; b=XDOF84A22OOjTiW0/zzUIbzUuQHlhRhyBXrGzpKWDZd+LVzDMdrw2AbcC04PXqlrR0 7bAImGIwowwwwxVT/SMWdlIf8QvMOGnK5hB4B0hLN+I+Qes7+lHfXcTx5jQcnIGOjpQ2 f+RkIPKT+WvB2OpF1GurHbiqETea1evB3G+5K9+H4kiz33bBJwhHpctnDtsl1lPaNwtv VLL+bENAg2BtTv0SR0F5Urc3hKB97QrW1QydebjvZd5Jn1oREu25hvy/oGf01goHjehF 7hc0yVTfM1M/MrR0Bguiofecm/FGXG5VLthlT/6fPRDF+EIzW3UVZV69y+NODeuKINZa ufZA== X-Gm-Message-State: AOAM530/oCZAZ++NqtabfKy/mjdpDSg8otV8fuN9PI2aQpTRcWPsYqzs G9rRXKpN0jFjEyX4G7U0x6MgoX05WAxS/w== X-Google-Smtp-Source: ABdhPJw5JE2+IDvd9Eqw/NQVdGD6n2GiPXO7ZmhwuwLBF6TUqog4WBEjm53HaWfUIh5oqvbRWyv1wQ== X-Received: by 2002:a5d:6907:: with SMTP id t7mr25501286wru.321.1589893131336; Tue, 19 May 2020 05:58:51 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id p7sm3814183wmc.24.2020.05.19.05.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 05:58:50 -0700 (PDT) From: luca.boccassi@gmail.com To: Ciara Power Cc: Kevin Laatz , dpdk stable Date: Tue, 19 May 2020 13:53:23 +0100 Message-Id: <20200519125804.104349-13-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519125804.104349-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'telemetry: fix port stats retrieval' has been queued to stable release 19.11.3 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 stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/20. 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 9ca664d8be044c085a3aacd34aa177818ba5a400 Mon Sep 17 00:00:00 2001 From: Ciara Power Date: Thu, 27 Feb 2020 17:04:56 +0000 Subject: [PATCH] telemetry: fix port stats retrieval [ upstream commit 341a793eb193a104c571172e724a98b2552c55cf ] The ep struct is used to track what type of stats are required by the client. For PORT_STATS type, it contains the lists of port and metric ids to query, and the number of ids in each list. The ep struct has values set (num of port and metric ids) when a request for port stats values by name is received. However, after this value assignment, the struct is reset to all 0 values, meaning the number of port and metric ids required now both show as 0, and the client will not receive the requested data in response. To fix this issue, the memset call is now moved above the ep struct value assignment. Fixes: 4080e46c8078 ("telemetry: support global metrics") Signed-off-by: Ciara Power Reviewed-by: Kevin Laatz --- lib/librte_telemetry/rte_telemetry_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_telemetry/rte_telemetry_parser.c b/lib/librte_telemetry/rte_telemetry_parser.c index 9601323970..e8c269e85e 100644 --- a/lib/librte_telemetry/rte_telemetry_parser.c +++ b/lib/librte_telemetry/rte_telemetry_parser.c @@ -456,9 +456,9 @@ rte_telemetry_command_ports_stats_values_by_name(struct telemetry_impl size_t index; json_t *value; + memset(&ep, 0, sizeof(ep)); ep.pp.num_port_ids = json_array_size(port_ids_json); ep.pp.num_metric_ids = num_stat_names; - memset(&ep, 0, sizeof(ep)); if (telemetry == NULL) { TELEMETRY_LOG_ERR("Invalid telemetry argument"); return -1; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 13:56:19.347688482 +0100 +++ 0013-telemetry-fix-port-stats-retrieval.patch 2020-05-19 13:56:18.175501026 +0100 @@ -1,8 +1,10 @@ -From 341a793eb193a104c571172e724a98b2552c55cf Mon Sep 17 00:00:00 2001 +From 9ca664d8be044c085a3aacd34aa177818ba5a400 Mon Sep 17 00:00:00 2001 From: Ciara Power Date: Thu, 27 Feb 2020 17:04:56 +0000 Subject: [PATCH] telemetry: fix port stats retrieval +[ upstream commit 341a793eb193a104c571172e724a98b2552c55cf ] + The ep struct is used to track what type of stats are required by the client. For PORT_STATS type, it contains the lists of port and metric ids to query, and the number of ids in each list. @@ -15,7 +17,6 @@ call is now moved above the ep struct value assignment. Fixes: 4080e46c8078 ("telemetry: support global metrics") -Cc: stable@dpdk.org Signed-off-by: Ciara Power Reviewed-by: Kevin Laatz