All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] app/testpmd: display port driver name
@ 2016-11-23 10:55 David Marchand
  2016-11-23 12:11 ` Mcnamara, John
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2016-11-23 10:55 UTC (permalink / raw)
  To: pablo.de.lara.guarch; +Cc: dev

This makes it easier to check which driver name is reported through ethdev
rte_eth_dev_info_get().

Example:

root@ubuntu1604:~/dpdk# ./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 <david.marchand@6wind.com>
---

This small patch is what I used to check 
http://dpdk.org/dev/patchwork/patch/17170/ and
http://dpdk.org/dev/patchwork/patch/17171/.

---
 app/test-pmd/config.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 36c47ab..8cf537d 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)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] app/testpmd: display port driver name
  2016-11-23 10:55 [PATCH] app/testpmd: display port driver name David Marchand
@ 2016-11-23 12:11 ` Mcnamara, John
  2016-12-06 13:35   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Mcnamara, John @ 2016-11-23 12:11 UTC (permalink / raw)
  To: David Marchand, De Lara Guarch, Pablo; +Cc: dev

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Marchand
> Sent: Wednesday, November 23, 2016 10:55 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] 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:
> 
> root@ubuntu1604:~/dpdk# ./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 <david.marchand@6wind.com>

Good idea.

Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] app/testpmd: display port driver name
  2016-11-23 12:11 ` Mcnamara, John
@ 2016-12-06 13:35   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2016-12-06 13:35 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, Mcnamara, John, De Lara Guarch, Pablo

> > This makes it easier to check which driver name is reported through ethdev
> > rte_eth_dev_info_get().
> > 
> > Example:
> > 
> > root@ubuntu1604:~/dpdk# ./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 <david.marchand@6wind.com>
> 
> Good idea.
> 
> Acked-by: John McNamara <john.mcnamara@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-06 13:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-23 10:55 [PATCH] app/testpmd: display port driver name David Marchand
2016-11-23 12:11 ` Mcnamara, John
2016-12-06 13:35   ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.