From: David Marchand Date: Wed, 23 Nov 2016 10:55:26 +0000 (+0100) Subject: app/testpmd: display port driver name X-Git-Tag: spdx-start~5302 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ac7cd715d462090df0032667d7a87400d9814688;p=dpdk.git app/testpmd: display port driver name This makes it easier to check which driver name is reported through ethdev rte_eth_dev_info_get(). Example: ./build/app/testpmd -c 0x6 --vdev net_af_packet0,iface=mgmt0 -- -i --total-num-mbufs 2049 [snip] testpmd> show port info all ********************* Infos for port 0 ********************* MAC address: DE:AD:DE:01:02:03 Driver name: net_af_packet Connect to socket: 0 memory allocation on the socket: 0 Signed-off-by: David Marchand Acked-by: John McNamara --- diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 36c47ab519..8cf537d594 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -454,10 +454,13 @@ port_infos_display(portid_t port_id) } port = &ports[port_id]; rte_eth_link_get_nowait(port_id, &link); + memset(&dev_info, 0, sizeof(dev_info)); + rte_eth_dev_info_get(port_id, &dev_info); printf("\n%s Infos for port %-2d %s\n", info_border, port_id, info_border); rte_eth_macaddr_get(port_id, &mac_addr); print_ethaddr("MAC address: ", &mac_addr); + printf("\nDriver name: %s", dev_info.driver_name); printf("\nConnect to socket: %u", port->socket_id); if (port_numa[port_id] != NUMA_NO_CONFIG) { @@ -500,8 +503,6 @@ port_infos_display(portid_t port_id) printf(" qinq(extend) off \n"); } - memset(&dev_info, 0, sizeof(dev_info)); - rte_eth_dev_info_get(port_id, &dev_info); if (dev_info.hash_key_size > 0) printf("Hash key size in bytes: %u\n", dev_info.hash_key_size); if (dev_info.reta_size > 0)