From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E9101A0540 for ; Thu, 7 Jul 2022 09:57:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E45FE406B4; Thu, 7 Jul 2022 09:57:18 +0200 (CEST) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 4DF52406B4 for ; Thu, 7 Jul 2022 09:57:18 +0200 (CEST) Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id F3E3D402B9 for ; Thu, 7 Jul 2022 07:57:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180638; bh=AP7yDJjSnOKWxzzhXZPv/1pTzujQ2fDyQ279WFYwIX8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=oHtud+i2HRwgEbphIsgvotC7tYZokdFzrXYnM1cd/Wa4ynPi8m+iz6zMj5EmMzJvS paqpkv5RktVum8XfBaHt2U9mz0C3uLcEcatBWjVUpgRgLNa/RGpdoLlDltEm4bN6Eh jv9nPrQNuXI9qkOktG0jJTiFc2HLHgWA7yzhBZuUjwWIiKBf6+1lJ80gjiLgc1C3B2 bDb9yh9czmHTCP9TAUTOJ2Grjy0k7ImqKUY9b4lzxWkVXvoRzGtLuXvh0E6VsnenB+ ufxmpwL+/ewWUfDochrT9DdL9nPKNbNtoXZPugnMu02HgRxQB8ca3QwZ2xKcPRplbe XsRTdGVPjbhZA== Received: by mail-ej1-f69.google.com with SMTP id gr1-20020a170906e2c100b006fefea3ec0aso4432856ejb.14 for ; Thu, 07 Jul 2022 00:57:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AP7yDJjSnOKWxzzhXZPv/1pTzujQ2fDyQ279WFYwIX8=; b=BKhNlL0BGkN8YwpffFUC4wIMTVSb1BPSv6GIg7Cy34xEB59lr5INoUqQM6Nj689vNK A8xL3qab/HMytx0Qur+1a1K5SZn6bgsFtHkRnmGBGZAZ01x8Dafn7Cx3sEfyGpp3j23n YPNH05CtK+BS2np66IRGZuQX8NL1psCr5ue7skvLZU/M5djEFiPLxZ2aUlo5TIr5mkog LffB4019zlOCcIfeIXx7rj2gB5JDZrbFDzJPa4aTNnkd91DU0uA4OUtNii4mJeXfSjOV Zp07gdiCku/pBLYhQ6MAw9FrjCtpUggYYIq3XpauOyGXJdqNPnEf1z/cq0xFyQfl2vZ7 6AJg== X-Gm-Message-State: AJIora/s3KHzkHvbP4IGu92oBu6Ff/uv5t/H95uZRzxbaQdQfSN8JDfs jM6C4Axg0c3uHYxf9NFbbIuxbz9M9/JW7Ul/KKgPyakiyHov6ARMcW4XCFeKy4WdXlq8CoWXx4J wikRnAIejFoKRhyfgphvJe2+w X-Received: by 2002:a17:907:2703:b0:72a:c654:771a with SMTP id w3-20020a170907270300b0072ac654771amr21711430ejk.268.1657180637471; Thu, 07 Jul 2022 00:57:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tb0Obc7ZqiioAtYHPL/7DDr+7pL5hmWW80FEqKrlcOBosl7pyDDVSwrScQRholFFiO3XrNdA== X-Received: by 2002:a17:907:2703:b0:72a:c654:771a with SMTP id w3-20020a170907270300b0072ac654771amr21711418ejk.268.1657180637263; Thu, 07 Jul 2022 00:57:17 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id 18-20020a170906329200b0072abb95eaa4sm6194548ejw.215.2022.07.07.00.57.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:57:16 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Chengwen Feng Cc: =?UTF-8?q?Morten=20Br=C3=B8rup?= , Andrew Rybchenko , dpdk stable Subject: patch 'net/ipn3ke: fix xstats get return if xstats is null' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:31 +0200 Message-Id: <20220707075522.194223-36-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 19.11.13 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/09/22. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/d00e51a7d1aae8cc9b6740de7bc26331c69a435d Thanks. Christian Ehrhardt --- >From d00e51a7d1aae8cc9b6740de7bc26331c69a435d Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Fri, 13 May 2022 10:53:52 +0800 Subject: [PATCH] net/ipn3ke: fix xstats get return if xstats is null MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit e17cb41db7656121f5809e353f8db126b026fbb4 ] Many user (e.g. telemetry) invokes rte_eth_xstats_get(port_id, NULL, 0) to retrieve the required number of elements, but currently ipn3ke PMD returns zero when xstats is null. Dedicated check for xstats vs null is not required, since ethdev layer guarantees that it may be null only if number of entries n is 0 (which is definitely smaller than total xstats count). Fixes: 5a6d883878db ("net/ipn3ke: implement statistics") Signed-off-by: Chengwen Feng Acked-by: Morten Brørup Reviewed-by: Andrew Rybchenko --- drivers/net/ipn3ke/ipn3ke_representor.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c b/drivers/net/ipn3ke/ipn3ke_representor.c index 25726a48a6..31a6957868 100644 --- a/drivers/net/ipn3ke/ipn3ke_representor.c +++ b/drivers/net/ipn3ke/ipn3ke_representor.c @@ -2224,9 +2224,6 @@ ipn3ke_rpst_xstats_get struct ipn3ke_rpst_hw_port_stats hw_stats; struct rte_eth_stats stats; - if (!xstats) - return 0; - if (!ethdev) { IPN3KE_AFU_PMD_ERR("ethernet device to get statistics is NULL"); return -EINVAL; -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:12.732062184 +0200 +++ 0036-net-ipn3ke-fix-xstats-get-return-if-xstats-is-null.patch 2022-07-07 09:54:10.877824074 +0200 @@ -1 +1 @@ -From e17cb41db7656121f5809e353f8db126b026fbb4 Mon Sep 17 00:00:00 2001 +From d00e51a7d1aae8cc9b6740de7bc26331c69a435d Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit e17cb41db7656121f5809e353f8db126b026fbb4 ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index c9dde1d82e..abbecfdf2e 100644 +index 25726a48a6..31a6957868 100644 @@ -31 +32 @@ -@@ -2218,9 +2218,6 @@ ipn3ke_rpst_xstats_get +@@ -2224,9 +2224,6 @@ ipn3ke_rpst_xstats_get