From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com [209.85.214.181]) by dpdk.org (Postfix) with ESMTP id B04D4591A for ; Wed, 20 Jan 2016 00:40:58 +0100 (CET) Received: by mail-ob0-f181.google.com with SMTP id is5so201064018obc.0 for ; Tue, 19 Jan 2016 15:40:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=GbW4H7kRX03y/kxnMzV8dvl/DpRZih3vi5f7ZVs9VeI=; b=nkCJYTxH8ydGJcWPjgi2jrCoVIRrvv2ZQ6ZIBbaRl54H7m4mvlz9EukXQHKACZG2ho /TUflCHQK5yxEUNhrXovBB9c9/w8EyzviUM9+zZDLguHfucm8PH75s3o075i0fRWonQU SAlaCl1D/HDNtujGL60piEYe9cAbAz+uGKkVoIRtSv9oGepgwZzkcv0IpdlVWiA9gJWT KVXMOmJ87syZLbTifD+i8NV9huItIyT4jEjsnWvaZyTUqpeucISt6xG4zDIUBD6LA7BB EwZv72QE6lDrmNveho8y3TFYx2stN1tvsjdF6arJDeo3MNkP0y01Ygu1TsQLPHuQd5A3 TrJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=GbW4H7kRX03y/kxnMzV8dvl/DpRZih3vi5f7ZVs9VeI=; b=J8CqLY6akGitl8bZEnLG0kRwisP7BFE6S2no0nVR9OzGoNPNxsQvWg7kqYz6DvC6h+ WBguVVqI7mrmsEauXz3VOX5SohxpyEgbog6H6J1ikbm/9QDuzMgyKf/wAzkMtkLXtZ5P +yjxjTjOcI+Dl0Sze8UarUPQr7IdOcNGlvZ6xWP0NGLrvwRrGEEUEEVj8lMA/afwif6o ziYBFIhQ9Fa5e1pxBPWGw9oD6KfPRN3CATc432x9nehbpyLrHCOx9vi0Ym9kKgWi5w5G 4ivDlHeeq/cO9d0BJdJfd2uhRNIdvlp3fTyGeV4xz29EFKgRffdYbUR4KCQP2EK6g/dK VIfQ== X-Gm-Message-State: AG10YOSWjztAtqlL8309nQiO+8f5pstOtGE+JS9Y8DtGB1huU8Cvku6kcMx2jAiuSYV4n/XRH4OLg09YJOvsiQ== MIME-Version: 1.0 X-Received: by 10.182.125.129 with SMTP id mq1mr10015982obb.7.1453246857881; Tue, 19 Jan 2016 15:40:57 -0800 (PST) Received: by 10.202.211.204 with HTTP; Tue, 19 Jan 2016 15:40:57 -0800 (PST) Date: Tue, 19 Jan 2016 15:40:57 -0800 Message-ID: From: Rakesh Venkatesh To: users@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] Determining port type using API's X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2016 23:40:59 -0000 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) <<<<<<<<