From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 2423C325F for ; Fri, 7 Sep 2018 16:22:43 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Sep 2018 07:22:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,342,1531810800"; d="scan'208";a="81690679" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga003.jf.intel.com with ESMTP; 07 Sep 2018 07:22:31 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.234]) by IRSMSX102.ger.corp.intel.com ([169.254.2.180]) with mapi id 14.03.0319.002; Fri, 7 Sep 2018 15:22:30 +0100 From: "Richardson, Bruce" To: "Shubhachint, Chaitanya" , "dev@dpdk.org" Thread-Topic: DPDK Shared lib: No Ethernet ports Thread-Index: AdRGtPctS05DVeE9T7qT7l0sq5s1oQAAPXcw Date: Fri, 7 Sep 2018 14:22:29 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B07268C8AF@IRSMSX103.ger.corp.intel.com> References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDAwMThlNTctNjM2Mi00ZTE0LWFmNDEtNjZhYmVkZDRiYjA0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMEZkRHZRQkdcL3RzWGlhRVBsczBBUFFrbHFcL0hNZFwvSlZrMXlIeTZuY1p6MWFzZmVGYWJoZmhMK1JqdG55UW41VyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] DPDK Shared lib: No Ethernet ports 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: Fri, 07 Sep 2018 14:22:44 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shubhachint, > Chaitanya > Sent: Friday, September 7, 2018 3:18 PM > To: dev@dpdk.org > Subject: [dpdk-dev] DPDK Shared lib: No Ethernet ports >=20 > Hello, >=20 > I recently started working with DPDK and gone through the initial steps o= f > getting source code installed and trying out few examples. To integrate > DPDK with our product, I need to build the share-lib version of DPDK. > I run into an issue when I build DPDK as shared, I don't see this issue > when DPDK is built as static. DPDK built with default configuration, I ca= n > run the examples and get expected results. When built as shared, EAL > detects no Ethernet ports. >=20 > I am building shared-lib version using steps below: > . switch the CONFIG_RTE_BUILD_SHARED_LIB to y in the config/common_base . > make config T=3Dx86_64-native-linuxapp-gcc . make install T=3Dx86_64-nati= ve- > linuxapp-gcc . export RTE_SDK=3D$HOME/dpdk-18.08 . export RTE_TARGET=3Dx8= 6_64- > native-linuxapp-gcc > . build examples. > . Set LD_LIBRARY_PATH to point to $HOME/dpdk-18.08/ x86_64-native- > linuxapp-gcc/lib >=20 > I am using Intel I350 Quad port NIC, and have switched to uio_pci_generic > driver =3D> Network devices using DPDK-compatible driver > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 0000:06:00.0 'I350 Gigabit Network Connection 1521' drv=3Duio_pci_generic > unused=3Digb > 0000:06:00.1 'I350 Gigabit Network Connection 1521' drv=3Duio_pci_generic > unused=3Digb > 0000:06:00.2 'I350 Gigabit Network Connection 1521' drv=3Duio_pci_generic > unused=3Digb > 0000:06:00.3 'I350 Gigabit Network Connection 1521' drv=3Duio_pci_generic > unused=3Digb >=20 > When I run any examples, I get error 'No Ethernet ports'. >=20 > root:l2fwd$./build/l2fwd > EAL: Detected 6 lcore(s) > EAL: Detected 1 NUMA nodes > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket > EAL: No free hugepages reported in hugepages-1048576kB > EAL: Probing VFIO support... > MAC updating enabled > EAL: Error - exiting with code: 1 > Cause: No Ethernet ports - bye >=20 > Interestingly, same code base built with 'CONFIG_RTE_BUILD_SHARED_LIB=3Dn= ' > works just fine. The ports get detected correctly and I can run all the > examples and applications. >=20 > Your help is appreciated. With shared library builds, the drivers are not linked in automatically. Yo= u need to explicitly load them via "-d" EAL flag - either individually or by passing in the path to a directory of drivers which can be loaded. See also in the build config the setting "CONFIG_RTE_EAL_PMD_PATH" which can be used to set a default search path for loading drivers. Regards, /Bruce