From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from prod-mail-xrelay02.akamai.com (prod-mail-xrelay02.akamai.com [72.246.2.14]) by dpdk.org (Postfix) with ESMTP id 787EA137D for ; Tue, 23 Sep 2014 23:44:18 +0200 (CEST) Received: from prod-mail-xrelay02.akamai.com (localhost [127.0.0.1]) by postfix.imss70 (Postfix) with ESMTP id 259062834A; Tue, 23 Sep 2014 21:50:28 +0000 (GMT) Received: from prod-mail-relay06.akamai.com (prod-mail-relay06.akamai.com [172.17.120.126]) by prod-mail-xrelay02.akamai.com (Postfix) with ESMTP id 13A66281E6; Tue, 23 Sep 2014 21:50:28 +0000 (GMT) Received: from ustx2ex-cashub.dfw01.corp.akamai.com (ustx2ex-cashub5.dfw01.corp.akamai.com [172.27.25.71]) by prod-mail-relay06.akamai.com (Postfix) with ESMTP id D76922027; Tue, 23 Sep 2014 21:50:27 +0000 (GMT) Received: from USMBX2.msg.corp.akamai.com ([169.254.1.124]) by ustx2ex-cashub5.dfw01.corp.akamai.com ([172.27.25.71]) with mapi; Tue, 23 Sep 2014 16:50:27 -0500 From: "Sanford, Robert" To: "Wang, Shawn" , "dev@dpdk.org" Date: Tue, 23 Sep 2014 16:50:35 -0500 Thread-Topic: [dpdk-dev] Can not init NIC after merge to DPDK 1.7 problem Thread-Index: Ac/XeGLnNMS8zAQyRAOBKv4ZJ1C5Fw== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.4.3.140616 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] Can not init NIC after merge to DPDK 1.7 problem 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: Tue, 23 Sep 2014 21:44:18 -0000 We ran into a similar problem when migrating to 1.7. Here are the subtle flags, in dpdk/mk/rte.app.mk, that we needed: LDLIBS +=3D --whole-archive ... LDLIBS +=3D --no-whole-archive This apparently tells the linker to pull in whole archive(s), even if it thinks that we don't need all objects. -- Regards, Robert >Hi: > >We are using our own Makefile in building dpdk program. Recently we are >working on upgrading from DPDK 1.3 to DPDK 1.7. I found the >rte_ixgbe_pmd_init has been replaced by PMD_REGISTER_DRIVER. So I delete >rte_ixgbe_pmd_init calls. But after that, our dpdk program could not >correctly find the NIC anymore. After digging into it a little more, I >found the code dose not correctly register the driver type we are using, >which is ixgbe. >To isolate the problem, I hacked a smal example l3fwd, and only have the >main.c file like this for my testing purpose. > >#include >#include > >#include "main.h" > >int >MAIN(int argc, char **argv) >{ > /* init EAL */ > int ret =3D rte_eal_init(argc, argv); > printf("ret %d\n", ret); > return 0; >} > >I found if I use the Makefile provided in the example, the program will >find the ixgbe NIC. But if I just use these 2 commands to compile and >link it. It will not find the ixgbe NIC. > >gcc -I../../x86_64-native-linuxapp-gcc/include >-L../../x86_64-native-linuxapp-gcc/lib -lrte_eal -c main.c >gcc -o l3fwd main.o -L../../x86_64-native-linuxapp-gcc/lib -lrte_eal >-lrte_distributor -lrte_pipeline -lrte_port -lrte_timer -lrte_hash >-lrte_acl -lm -lrt -lrte_mbuf -lethdev -lrte_malloc -lrte_mempool >-lrte_ring -lc -lm -lrte_cmdline -lrte_cfgfile -lrte_pmd_bond >-lrte_pmd_ixgbe -lrte_pmd_e1000 -lrte_pmd_ring -lpthread -ldl -lrt > >Can someone share some light on what is magic of the dpdk Makefile to >correctly register the NIC type? > >Thank you so much. >Xingbo Wang