From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wj0-f172.google.com (mail-wj0-f172.google.com [209.85.210.172]) by dpdk.org (Postfix) with ESMTP id 4E6312BAC for ; Wed, 23 Nov 2016 11:55:32 +0100 (CET) Received: by mail-wj0-f172.google.com with SMTP id v7so7078392wjy.2 for ; Wed, 23 Nov 2016 02:55:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=UTZfXxhhudz/Jexxl5pKUVEbKQhbhpIRVRPi4eY4QW0=; b=Ej0lxEHAgICU1zfvn+BnjPGbufXkHZXx+Mk54K+kC9FMviLF/6gEZxlcOBYWihbXWN cs3nVaaFuTF10w52krRoMvbVKvghDyhQM1oSsQgNWXP9GdAXH37OFXw6mbtm1qdtH80O +WrOsBHoYlNIux0o4M3UJ+JU+TccXUw6/0cZ+jpBqXKNtXjWPZlEakTSp3ObezLVqAtS OSyL2tuk4D0GSxAcxw3v5fr9+pDB/ZXfkHvkN2kgCA+dxQjx4YHCF/jYHmMfIV5LmsEs q9i+auqDRLZS0sl+Fz/MvWhjh+Cf6InjC2s3cRu/v1/H6C16ux36q9mmu80RwNWMe9r2 qKuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UTZfXxhhudz/Jexxl5pKUVEbKQhbhpIRVRPi4eY4QW0=; b=TSvqncLxHEVqjkHXDFUsnP8/gegnrTq/CQwbV7qvxaDYtU3DgMi3c6OjRQCAzxlLsw Mul4D1bTexM1Q84kh+xdN5MSEYfxOet7ZlgdmiL+6nOllNYPAhEc2WBdQgW0SWi8h0OM PYlqKl+TMWj6KrLe25YOPmMRG8tHtb7thT20rAWGEzRWLgRxiWYz1P76qKPIaxuTKDCq 8QMArvznmWA+08/TJWegyAyIY3Bd8XBJfbQlvG6j740bnUb4rLfPxozLcjyi/iJaWMMP U52ah3poyWDrVu5RqCNBF3NEvmEyKkDU3GhlQ4beFOELtnUBGHnNDQswOrVNyufkgX94 G+NQ== X-Gm-Message-State: AKaTC000L51cUY/B9IEPC9yQXxNeXzx9hB1w7THs0E1EDW5fspXun080/j17ujZW2BHwXO78 X-Received: by 10.194.124.233 with SMTP id ml9mr2744366wjb.139.1479898531553; Wed, 23 Nov 2016 02:55:31 -0800 (PST) Received: from gloops.dev.6wind.com (89.156.119.78.rev.sfr.net. [78.119.156.89]) by smtp.gmail.com with ESMTPSA id 81sm2125264wmw.7.2016.11.23.02.55.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Nov 2016 02:55:30 -0800 (PST) From: David Marchand To: pablo.de.lara.guarch@intel.com Cc: dev@dpdk.org Date: Wed, 23 Nov 2016 11:55:26 +0100 Message-Id: <1479898526-23489-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] app/testpmd: display port driver name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 10:55:32 -0000 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 --- 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