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

Kevin Traynor ktraynor at redhat.com
Wed Dec 11 22:26:13 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

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/17/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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/43349d39036bfca5c0217484c97629d75c730534

Thanks.

Kevin.

---
>From 43349d39036bfca5c0217484c97629d75c730534 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 1f61e4c2d..6798f7697 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -220,4 +220,8 @@ nic_xstats_display(portid_t port_id)
 	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)) {
@@ -275,4 +279,8 @@ 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.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-11 21:24:14.399049135 +0000
+++ 0021-app-testpmd-block-xstats-for-hidden-ports.patch	2019-12-11 21:24:12.620652189 +0000
@@ -1 +1 @@
-From bd67b6772492cdd9f7249bdff7163e9698bdcc16 Mon Sep 17 00:00:00 2001
+From 43349d39036bfca5c0217484c97629d75c730534 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bd67b6772492cdd9f7249bdff7163e9698bdcc16 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index b6039749c..2a51d9664 100644
+index 1f61e4c2d..6798f7697 100644
@@ -22 +23 @@
-@@ -239,4 +239,8 @@ nic_xstats_display(portid_t port_id)
+@@ -220,4 +220,8 @@ nic_xstats_display(portid_t port_id)
@@ -31,3 +32,3 @@
-@@ -296,4 +300,8 @@ nic_xstats_clear(portid_t port_id)
- 	int ret;
- 
+@@ -275,4 +279,8 @@ void
+ nic_xstats_clear(portid_t port_id)
+ {
@@ -38,2 +39,2 @@
- 	ret = rte_eth_xstats_reset(port_id);
- 	if (ret != 0) {
+ 	rte_eth_xstats_reset(port_id);
+ }



More information about the stable mailing list