From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by dpdk.org (Postfix) with ESMTP id 2FEB112008 for ; Mon, 19 Mar 2018 16:34:10 +0100 (CET) Received: by mail-lf0-f50.google.com with SMTP id o102-v6so3534171lfg.8 for ; Mon, 19 Mar 2018 08:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=q/ihSdbO3kM40enO16OnXtueyqWHZZrwubdYKgAWPPE=; b=Bvr86Tm9J3wZxXbhxnLe/Km9vNIfGfVcrzHN340VBydNA80RcPFJMFojjOCFPmeWRn RPel17IUO/ngtYSeMwm4MNTmLPwM/TDHkbXtaeu1pJGga2jvQOgSI0EcrRqOo/wkbGyu ByWobm4FYNiYh3S7Lh4L6nNM3hXrhX3PWqGKnj2jFBtxQk0gTcaYBVtAk5vWh0XZfiAr uvrC6HfMt0bi/5ibkFJzTO+5b23FLWtAiFqlxe50hwSDhBSKjYTDAa8+0FwcAs1kHFd0 EQLxR6gpicFxiXpmkUOyQ72UgxC2SY1qQchYH5l6OVj/D1BPPCIDOL8DCu+DQMycxRMu 6Kvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=q/ihSdbO3kM40enO16OnXtueyqWHZZrwubdYKgAWPPE=; b=t/n+b69UNag6NF6vRsS2plgCYM4LkaMVUG1YyCDUdqNtQHePnChBJeEeERe80nhuNp DJ2++HLfkoIiPu0LvYrptVmMtR7zZXghWjfTiXCPn0tXL0zUEWba3o+YOwJLP7PTGVMk BLzDkOeUaMLARrj4plICyxSoZ7rBI3p3YSdPirPyYTKzJi6jZwkoX6SraHiaojoZQfKa ffPLb+MhDQdlSDaoAd0Pyk0wKxWxfs/2d693r7KZ+RZ1C6Rc9MbyooTiuuKcLpcv80jn LXIoujQvQU/ZRgmOqRR++bgnPCh5kVdcvxFH1Thjy5aOZ7Pa9qLzV3p2PFecyHwjgyzI dlDA== X-Gm-Message-State: AElRT7H8VSYZdZMfIL0hduZU2wUXq2JpcC16xDNflt4vBKP9JHS6jBr9 fQoPWbU0kVaxFHARpWu6KE2bH1Ksv7z3hSWUhhHJaQ== X-Google-Smtp-Source: AG47ELs7DbGI9RFtm+tP55tDrnQP+Mj7+uf0MnyNNnsZlo2ThIjxFUiQbyzMy2fgPNkF1b/+Qc3b+CDey6WOcdlcBAE= X-Received: by 2002:a19:1d12:: with SMTP id d18-v6mr8020557lfd.128.1521473649237; Mon, 19 Mar 2018 08:34:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:e494:0:0:0:0:0 with HTTP; Mon, 19 Mar 2018 08:34:08 -0700 (PDT) From: Venkatesh N Date: Mon, 19 Mar 2018 21:04:08 +0530 Message-ID: To: dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: [dpdk-dev] rte_eth_dev_count() returns 0 in shared library mode. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2018 15:34:10 -0000 Hi Everyone, Need urgent help over here. After cloning the latest git, when i compiled the dpdk in shared library mode by modifying the common_base config file and rebuild the examples the api rte_eth_dev_count() returns 0 However in the static library mode, rte_eth_dev_count() returns 2. Can someone please let me know what iam missing over here. Here are details -- Code -- /* Check that there is an even number of ports to send/receive on. */ nb_ports = rte_eth_dev_count(); if (nb_ports < 2 || (nb_ports & 1)) rte_exit(EXIT_FAILURE, "Error: number of ports must be even\n"); #make config T=x86_64-native-linuxapp-gcc install examples --------------------------------------- Libraries built by changing the SHARED_LIB. config/common_base +++ b/config/common_base @@ -38,7 +38,7 @@ CONFIG_RTE_ARCH_STRICT_ALIGN=n # # Compile to share library # -CONFIG_RTE_BUILD_SHARED_LIB=n +CONFIG_RTE_BUILD_SHARED_LIB=y ---------------------------------------- ------------------------------------------------------------------------------------------ [root@localhost dpdk_new]# ./examples/skeleton/x86_64-native-linuxapp-gcc/basicfwd EAL: Detected 72 lcore(s) EAL: Multi-process socket /var/run/.rte_unix EAL: Probing VFIO support... EAL: Error - exiting with code: 1 Cause: Error: number of ports must be even ------------------------------------------------------------------------------------------ [root@localhost dpdk_new]# ldd ./examples/skeleton/x86_64-native-linuxapp-gcc/basicfwd linux-vdso.so.1 => (0x00007fffa858a000) librte_flow_classify.so.1.1 => /root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_flow_classify.so.1.1 (0x00007f7272f5f000) librte_pipeline.so.3.1 => /root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_pipeline.so.3.1 (0x00007f7272d58000) librte_table.so.3.1 => /root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_table.so.3.1 (0x00007f7272b3e000) librte_port.so.3.1 => /root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_port.so.3.1 (0x00007f727291d000) librte_pdump.so.2.1 => /root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_pdump.so.2.1 (0x00007f7272513000) librte_distributor.so.1.1 => /root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_distributor.so.1.1 (0x00007f727230d000) librte_ip_frag.so.1.1 => /root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_ip_frag.so.1.1 (0x00007f7272103000) librte_gro.so.1.1 => /root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_gro.so.1.1 (0x00007f7271efc000) librte_gso.so.1.1 => /root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_gso.so.1.1 (0x00007f7271cf7000) --snip-- [root@localhost dpdk_new]# ./usertools/dpdk-devbind.py --status Network devices using DPDK-compatible driver ============================================ 0000:04:00.0 'I350 Gigabit Network Connection 1521' drv=igb_uio unused= 0000:04:00.1 'I350 Gigabit Network Connection 1521' drv=igb_uio unused= ------------ Static Library Mode --------------------- [root@localhost dpdk_new]# ./examples/skeleton/x86_64-native-linuxapp-gcc/basicfwd EAL: Detected 72 lcore(s) EAL: Multi-process socket /var/run/.rte_unix EAL: Probing VFIO support... EAL: PCI device 0000:04:00.0 on NUMA socket 0 EAL: probe driver: 8086:1521 net_e1000_igb EAL: PCI device 0000:04:00.1 on NUMA socket 0 EAL: probe driver: 8086:1521 net_e1000_igb EAL: PCI device 0000:04:00.2 on NUMA socket 0 EAL: probe driver: 8086:1521 net_e1000_igb EAL: PCI device 0000:04:00.3 on NUMA socket 0 EAL: probe driver: 8086:1521 net_e1000_igb EAL: PCI device 0000:05:00.0 on NUMA socket 0 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:05:00.1 on NUMA socket 0 EAL: probe driver: 8086:1572 net_i40e Port 0 MAC: 14 02 ec 6b 36 10 Port 1 MAC: 14 02 ec 6b 36 11 ----------------------------------- Git Log ------- commit 09e1e8d256b0832a64af6d13bf96fcb49e1e7ded Author: Hemant Agrawal Date: Fri Feb 23 15:28:03 2018 +0530 mk: fix dependencies of dpaaX drivers This patch fixes the build dependency of various dpaaX components, when the dpaa or fslmc bus is disabled, or VFIO is disabled. Regards, Venky