diff mbox series

[1/5] test: l2fwd: add pktio driver print out

Message ID 1486556381-22233-2-git-send-email-petri.savolainen@linaro.org
State Accepted
Commit 969d1c74ef21b77df01b120297d4156b87183894
Headers show
Series Packet test fixes | expand

Commit Message

Petri Savolainen Feb. 8, 2017, 12:19 p.m. UTC
Print out pktio driver name in start up. Driver name (e.g. dpdk or
netmap) helps in checking that correct pktio device started.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
 test/common_plat/performance/odp_l2fwd.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

-- 
2.8.1
diff mbox series

Patch

diff --git a/test/common_plat/performance/odp_l2fwd.c b/test/common_plat/performance/odp_l2fwd.c
index 54dc4cf..9864c64 100644
--- a/test/common_plat/performance/odp_l2fwd.c
+++ b/test/common_plat/performance/odp_l2fwd.c
@@ -603,6 +603,7 @@  static int create_pktio(const char *dev, int idx, int num_rx, int num_tx,
 	odp_pktio_op_mode_t mode_rx;
 	odp_pktio_op_mode_t mode_tx;
 	pktin_mode_t in_mode = gbl_args->appl.in_mode;
+	odp_pktio_info_t info;
 
 	odp_pktio_param_init(&pktio_param);
 
@@ -620,8 +621,13 @@  static int create_pktio(const char *dev, int idx, int num_rx, int num_tx,
 		return -1;
 	}
 
-	printf("created pktio %" PRIu64 " (%s)\n",
-	       odp_pktio_to_u64(pktio), dev);
+	if (odp_pktio_info(pktio, &info)) {
+		LOG_ERR("Error: pktio info failed %s\n", dev);
+		return -1;
+	}
+
+	printf("created pktio %" PRIu64 ", dev: %s, drv: %s\n",
+	       odp_pktio_to_u64(pktio), dev, info.drv_name);
 
 	if (odp_pktio_capability(pktio, &capa)) {
 		LOG_ERR("Error: capability query failed %s\n", dev);