[dpdk-stable] patch 'app/testpmd: block xstats for hidden ports' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:34:24 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 e6ab914663fc2e134d44720424df2bbf4bfd60d8 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
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 <stephen at networkplumber.org>
Acked-by: Bernard Iremonger <bernard.iremonger at intel.com>
---
 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 <stephen at networkplumber.org>
 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 at dpdk.org
 
 Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
 Acked-by: Bernard Iremonger <bernard.iremonger at intel.com>
@@ -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
 


More information about the stable mailing list