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 75BE6A04F0 for ; Thu, 19 Dec 2019 15:41:44 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C7871BF75; Thu, 19 Dec 2019 15:41:44 +0100 (CET) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by dpdk.org (Postfix) with ESMTP id DD5331BF74 for ; Thu, 19 Dec 2019 15:41:42 +0100 (CET) Received: by mail-wr1-f46.google.com with SMTP id j42so6195764wrj.12 for ; Thu, 19 Dec 2019 06:41:42 -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=upwhfYQCfgjNjL4CXjG/1Hl1UL0pmGQINTo0uXfll2c=; b=JgGf8y2XcN26/iZHvCl3JoB/B2DBb0kDbDKHDS4mFn5r0Y/hBvQ8ZSGYxDvpsmKeA+ 9SyhKjXwjJPPsmGm7Os7DVAiG0mx7yoXa/748VVHpMLyhG2Dg2L0JsijtxhW/SXW7Ana 5X9tdSI6Bv0SRUKt1Y4fETmFfPKkMaojlhopOEqrxUHEmw7wptyLccoHhLdrmsCic/lF etgE6II1LIX7Zm8Scz9dkCwCcVVMSb/WUtnX1zuYEJeKT1k/mDkVU9hWQV1DmiBAQu+U C2QAtjO2l8KtVUJ9CBZfG/NApmgICNAqd/TJ7k+YxqI9xHRVTQU3AwrcCH7DRjebdzoQ cHJg== 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=upwhfYQCfgjNjL4CXjG/1Hl1UL0pmGQINTo0uXfll2c=; b=ZvxQuC9RGhOIrgOtMpaxnaeK3HctnGmGvBybh8XvImwuY86ksJfGJIOt4ghDEUz5o4 yjfijrXGhU6PYfP0ysLruQzupz0sNEcj07R1GfswADZCslb+2iLUeMWwturKV7XAVTCF GyMFUgSVAjPDag2grASHVGacR7FdPfZvEL1/QNRvlkTor7JGUBkAzYnwxpvo9NohnqNx W+l+CMjpNYqBJcSN5RvBT82T9Lg2dwSg9K8pA0YT7r31BXDtoCZ+lJ7dgh5PlCmd3MMz qisPLK9L6thg3RS+dCMdZQbcVTWP189DDvzp1uMohm16Y7CzJ3Y9MOjXoBR2FItfDYSA cZPw== X-Gm-Message-State: APjAAAVcGcR7fo5lwmlOg0OKE2f0+/vcPmlEhBSOwYcU/8VW7JdM7H6p /V8wZEQGoHg4mxl9EZe06GQ= X-Google-Smtp-Source: APXvYqx3BI71GHOafLct3yC3CJa/1Gv1Y7htivRY6PEQVLBB/mhe8yuBvvLsFnBDuqeWcndEHcrwUA== X-Received: by 2002:adf:ee82:: with SMTP id b2mr10309395wro.194.1576766502462; Thu, 19 Dec 2019 06:41:42 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id p26sm6197780wmc.24.2019.12.19.06.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:41:41 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: Bernard Iremonger , dpdk stable Date: Thu, 19 Dec 2019 14:34:24 +0000 Message-Id: <20191219143447.21506-117-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 'app/testpmd: block xstats for hidden ports' 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 e6ab914663fc2e134d44720424df2bbf4bfd60d8 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 1 Nov 2019 13:12:55 -0700 Subject: [PATCH] app/testpmd: block xstats for hidden ports [ upstream commit bd67b6772492cdd9f7249bdff7163e9698bdcc16 ] All the other testpmd commands block access to devices that are owned. Looks like xstat got overlooked. Fixes: bfd5051b43b5 ("app/testpmd: new command to get extended statistics") Signed-off-by: Stephen Hemminger Acked-by: Bernard Iremonger --- app/test-pmd/config.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 18126a0f4a..4e3531b8e5 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -242,6 +242,10 @@ nic_xstats_display(portid_t port_id) int cnt_xstats, idx_xstat; struct rte_eth_xstat_name *xstats_names; + if (port_id_is_invalid(port_id, ENABLED_WARN)) { + print_valid_ports(); + return; + } printf("###### NIC extended statistics for port %-2d\n", port_id); if (!rte_eth_dev_is_valid_port(port_id)) { printf("Error: Invalid port number %i\n", port_id); @@ -297,6 +301,10 @@ nic_xstats_display(portid_t port_id) void nic_xstats_clear(portid_t port_id) { + if (port_id_is_invalid(port_id, ENABLED_WARN)) { + print_valid_ports(); + return; + } rte_eth_xstats_reset(port_id); } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:30.981102466 +0000 +++ 0117-app-testpmd-block-xstats-for-hidden-ports.patch 2019-12-19 14:32:26.297301633 +0000 @@ -1,13 +1,14 @@ -From bd67b6772492cdd9f7249bdff7163e9698bdcc16 Mon Sep 17 00:00:00 2001 +From e6ab914663fc2e134d44720424df2bbf4bfd60d8 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 1 Nov 2019 13:12:55 -0700 Subject: [PATCH] app/testpmd: block xstats for hidden ports +[ upstream commit bd67b6772492cdd9f7249bdff7163e9698bdcc16 ] + All the other testpmd commands block access to devices that are owned. Looks like xstat got overlooked. Fixes: bfd5051b43b5 ("app/testpmd: new command to get extended statistics") -Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Bernard Iremonger @@ -16,10 +17,10 @@ 1 file changed, 8 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c -index b6039749cb..2a51d96644 100644 +index 18126a0f4a..4e3531b8e5 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c -@@ -238,6 +238,10 @@ nic_xstats_display(portid_t port_id) +@@ -242,6 +242,10 @@ nic_xstats_display(portid_t port_id) int cnt_xstats, idx_xstat; struct rte_eth_xstat_name *xstats_names; @@ -30,17 +31,17 @@ printf("###### NIC extended statistics for port %-2d\n", port_id); if (!rte_eth_dev_is_valid_port(port_id)) { printf("Error: Invalid port number %i\n", port_id); -@@ -295,6 +299,10 @@ nic_xstats_clear(portid_t port_id) +@@ -297,6 +301,10 @@ nic_xstats_display(portid_t port_id) + void + nic_xstats_clear(portid_t port_id) { - int ret; - + if (port_id_is_invalid(port_id, ENABLED_WARN)) { + print_valid_ports(); + return; + } - ret = rte_eth_xstats_reset(port_id); - if (ret != 0) { - printf("%s: Error: failed to reset xstats (port %u): %s", + rte_eth_xstats_reset(port_id); + } + -- 2.20.1