DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Determining port type using API's
@ 2016-01-19 23:40 Rakesh Venkatesh
  2016-01-20  9:03 ` Van Haaren, Harry
  0 siblings, 1 reply; 2+ messages in thread
From: Rakesh Venkatesh @ 2016-01-19 23:40 UTC (permalink / raw)
  To: users

Hello


I have a VM running in our company lab which has two ports in it named
"int" and "ext" which is binded using dpdk. The port is initialized either
as virtio or sriov mode. My question is how do I determine the port type
using a C program? Are there any dpdk api's which tells me whether its
sriov or virtio based?

Using the shell script I can run "lspci" command and grep for keywords to
identify the port type but I am not finding a simpler way to do this from a
C program. Any help would be appreciated.

If I run "lspci", I get the following output

00:03.0 Ethernet controller: Red Hat, Inc Virtio network device  <<<<<<<<<
virtio based
00:06.0 Ethernet controller: Intel Corporation 82599 Ethernet Controller
Virtual Function (rev 01) <<<<<<<<<sriov based

By running grep command on this output and matching the keywords, I can
identify the port type.

-- 
Thanks and regards

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

end of thread, other threads:[~2016-01-20  9:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-19 23:40 [dpdk-users] Determining port type using API's Rakesh Venkatesh
2016-01-20  9:03 ` Van Haaren, Harry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).