[2/2] examples/l3fwd-power: fix check_ptype query
diff mbox series

Message ID 20201028095935.27855-2-getelson@nvidia.com
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
  • [1/2] drivers/net/mlx5: fix representor interrupts handler
Related show


Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Gregory Etelson Oct. 28, 2020, 9:59 a.m. UTC
l3fwd-power uses `--parse-ptype' parameter to query egress packets
type.  Before that feature is eanbled l3fwd-power verifies PMD ability
to advertise supporrtred packet types with

The patch updates code for PMDs that register supported types after

Fixes: 82bea4661626 ("examples/l3fwd-power: add --parse-ptype option")

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
 examples/l3fwd-power/main.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff mbox series

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index a48d75f68f..a18a25f316 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -2702,9 +2702,7 @@  main(int argc, char **argv)
 				if (add_cb_parse_ptype(portid, queueid) < 0)
 						 "Fail to add ptype cb\n");
-			} else if (!check_ptype(portid))
-				rte_exit(EXIT_FAILURE,
-					 "PMD can not provide needed ptypes\n");
+			}
@@ -2735,6 +2733,11 @@  main(int argc, char **argv)
 		/* initialize spinlock for each port */
+		if (!parse_ptype)
+			if (!check_ptype(portid))
+				rte_exit(EXIT_FAILURE,
+					"PMD can not provide needed ptypes\n");