From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-fw-9101.amazon.com (smtp-fw-9101.amazon.com [207.171.184.25]) by dpdk.org (Postfix) with ESMTP id 8966E137D for ; Wed, 24 Sep 2014 01:11:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1411514275; x=1443050275; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=d9lZwKq0WXc3hj+F/fu5YhJHD6ckow9Un8cInQqLzlk=; b=W4t3XI40HRCCxRtjJc6WxMKtbRWB+76C3zGd90mzEkUz3hYZr+Km8wtF vRKkkXZzenp4HxgTQsvzOrR//3TxE92b9lZLaesj+dHJv2LuKyDnYqJmS /ZojgT81RUSU6k8XmUkYQM5fswoq9BcQXELrBDgqrcQHPYJOQJRSrn9r5 A=; X-IronPort-AV: E=Sophos;i="5.04,583,1406592000"; d="scan'208";a="110433809" Received: from email-inbound-relay-6002.iad6.amazon.com ([10.219.219.179]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 Sep 2014 23:17:52 +0000 Received: from ex10-hub-9004.ant.amazon.com (iad1-ws-svc-lb91-vlan2.amazon.com [10.0.103.146]) by email-inbound-relay-6002.iad6.amazon.com (8.14.7/8.14.7) with ESMTP id s8NNH4Ri023980 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK); Tue, 23 Sep 2014 23:17:51 GMT Received: from EX10-MBX-31007.ant.amazon.com ([fe80::dc2d:ebf:d4a1:fac]) by ex10-hub-9004.ant.amazon.com ([::1]) with mapi id 14.03.0181.006; Tue, 23 Sep 2014 16:17:47 -0700 From: "Wang, Shawn" To: "Sanford, Robert" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] Can not init NIC after merge to DPDK 1.7 problem Thread-Index: Ac/XeGLnB/qzlYm1RhequX4gunssXgADB1LP Date: Tue, 23 Sep 2014 23:17:46 +0000 Message-ID: <12C2AAD9525203489F7B523D670129D91CA75FF8@ex10-mbx-31007.ant.amazon.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.1.118] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Precedence: Bulk 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 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 23:11:45 -0000 This does resolve the problem.=0A= =0A= Thank you so much.=0A= =0A= ________________________________________=0A= From: Sanford, Robert [rsanford@akamai.com]=0A= Sent: Tuesday, September 23, 2014 2:50 PM=0A= To: Wang, Shawn; dev@dpdk.org=0A= Subject: Re: [dpdk-dev] Can not init NIC after merge to DPDK 1.7 problem=0A= =0A= We ran into a similar problem when migrating to 1.7.=0A= Here are the subtle flags, in dpdk/mk/rte.app.mk, that we needed:=0A= =0A= LDLIBS +=3D --whole-archive=0A= ...=0A= LDLIBS +=3D --no-whole-archive=0A= =0A= This apparently tells the linker to pull in whole archive(s), even if it=0A= thinks that we don't need all objects.=0A= =0A= =0A= =0A= =0A= --=0A= Regards,=0A= Robert=0A= =0A= =0A= >Hi:=0A= >=0A= >We are using our own Makefile in building dpdk program. Recently we are=0A= >working on upgrading from DPDK 1.3 to DPDK 1.7. I found the=0A= >rte_ixgbe_pmd_init has been replaced by PMD_REGISTER_DRIVER. So I delete= =0A= >rte_ixgbe_pmd_init calls. But after that, our dpdk program could not=0A= >correctly find the NIC anymore. After digging into it a little more, I=0A= >found the code dose not correctly register the driver type we are using,= =0A= >which is ixgbe.=0A= >To isolate the problem, I hacked a smal example l3fwd, and only have the= =0A= >main.c file like this for my testing purpose.=0A= >=0A= >#include =0A= >#include =0A= >=0A= >#include "main.h"=0A= >=0A= >int=0A= >MAIN(int argc, char **argv)=0A= >{=0A= > /* init EAL */=0A= > int ret =3D rte_eal_init(argc, argv);=0A= > printf("ret %d\n", ret);=0A= > return 0;=0A= >}=0A= >=0A= >I found if I use the Makefile provided in the example, the program will=0A= >find the ixgbe NIC. But if I just use these 2 commands to compile and=0A= >link it. It will not find the ixgbe NIC.=0A= >=0A= >gcc -I../../x86_64-native-linuxapp-gcc/include=0A= >-L../../x86_64-native-linuxapp-gcc/lib -lrte_eal -c main.c=0A= >gcc -o l3fwd main.o -L../../x86_64-native-linuxapp-gcc/lib -lrte_eal=0A= >-lrte_distributor -lrte_pipeline -lrte_port -lrte_timer -lrte_hash=0A= >-lrte_acl -lm -lrt -lrte_mbuf -lethdev -lrte_malloc -lrte_mempool=0A= >-lrte_ring -lc -lm -lrte_cmdline -lrte_cfgfile -lrte_pmd_bond=0A= >-lrte_pmd_ixgbe -lrte_pmd_e1000 -lrte_pmd_ring -lpthread -ldl -lrt=0A= >=0A= >Can someone share some light on what is magic of the dpdk Makefile to=0A= >correctly register the NIC type?=0A= >=0A= >Thank you so much.=0A= >Xingbo Wang=0A= =0A=