From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 8CDE97E7B for ; Wed, 22 Oct 2014 17:14:43 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 22 Oct 2014 08:21:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,769,1406617200"; d="scan'208";a="593825597" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga001.jf.intel.com with ESMTP; 22 Oct 2014 08:22:20 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.21]) by IRSMSX102.ger.corp.intel.com ([169.254.2.200]) with mapi id 14.03.0195.001; Wed, 22 Oct 2014 16:20:41 +0100 From: "Gonzalez Monroy, Sergio" To: Matthew Hall Thread-Topic: [dpdk-dev] virtio UIO / PMD issues in default Ubuntu Cloud Images Thread-Index: AQHP6ehxuLBN4M/t6UygCrZQnHQl2Jw5BMRggAKnPoCAAIDy4A== Date: Wed, 22 Oct 2014 15:20:40 +0000 Message-ID: <91383E96CE459D47BCE92EFBF5CE73B0C7FD90@IRSMSX108.ger.corp.intel.com> References: <20141014054523.GA16919@mhcomputing.net> <20141014060353.GA17053@mhcomputing.net> <20141014063406.GA17242@mhcomputing.net> <91383E96CE459D47BCE92EFBF5CE73B0C7E467@IRSMSX108.ger.corp.intel.com> <3CCF4B14-58A7-4499-98A1-8D617A6F86B7@mhcomputing.net> <91383E96CE459D47BCE92EFBF5CE73B0C7E4E4@IRSMSX108.ger.corp.intel.com> <20141017085649.GA4210@mhcomputing.net> <91383E96CE459D47BCE92EFBF5CE73B0C7F8B4@IRSMSX108.ger.corp.intel.com> <20141022071753.GB6051@mhcomputing.net> In-Reply-To: <20141022071753.GB6051@mhcomputing.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] virtio UIO / PMD issues in default Ubuntu Cloud Images 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, 22 Oct 2014 15:14:44 -0000 > -----Original Message----- > From: Matthew Hall [mailto:mhall@mhcomputing.net] > Subject: Re: [dpdk-dev] virtio UIO / PMD issues in default Ubuntu Cloud > Images >=20 > > - we do not want to build against static DPDK libraries as this would > > result in duplicated code in librte_pmd_virtio and other apps (ie. > > testpmd) > > > > - we want to link against shared DPDK libs to add dependencies and > > provide reliable information (ie. ldd) >=20 > OK... but now it's impossible to use librte_pmd_virtio w/o mandatory shar= e > library performance loss. I strongly dislike being force to do this. >=20 You are not forced to use shared libraries. This module loads successfully = with an app (testpmd) built against static DPDK libs. > OK... let me try to clarify this point again. In this official DPDK suppo= rt device > document, http://www.dpdk.org/doc/nics , it says: >=20 > Paravirtualization > virtio-net or virtio-net + uio (QEMU, VirtualBox) >=20 > As I've stated, when testing this on VirtualBox it does not work for me a= nd > gets into an infinite initialization loop which I documented in my last m= ail. > But the same code works fine if it's using the VBox Intel 82545EM VNIC an= d > appropriate driver. Also the VBox virtio-net device works completely fine > using the kernel virtio-net driver. This making the virtio PMD's the most= likely > suspect, especially since the UIO based one can't init itself, and the no= n UIO > one gets stuck in the loop. >=20 I have reproduced this issue in VirtualBox: - For UIO Virtio PMD, there is an issue with igb_uio module and virtio vbox= backend device, I fail to bind igb_uio driver to the virtio device. - For non-UIO Virtio PMD, the module fails to initialize properly as you ha= ve indicated in your previous post (stuck in a loop). I get this behavior with testpmd regardless of DPDK being built as static o= r shared. > > > EAL: open shared lib > > > /vagrant/external/virtio-net-pmd/librte_pmd_virtio.so > > > EAL: /vagrant/external/virtio-net-pmd/librte_pmd_virtio.so: > > > undefined > > > symbol: per_lcore__lcore_id > > > > > Are we talking about a DPDK or custom app? > > Do you only see the issue when CONFIG_RTE_BUILD_COMBINE_LIBS=3Dy? >=20 > Issue happens in my DPDK based app. >=20 > Can happen anytime you use static linked DPDK app w/ the > librte_pmd_virtio. > Because the link process of librte_pmd_virtio is broken. >=20 The linking is not broken if we are assuming apps built against static DPDK= libs. I can't think of other way of linking this module to be used in apps with s= tatic DPDK libs. > > > Running nm and nm -D shows this: > > > > > > $ nm librte_pmd_virtio.so | fgrep -i per_lcore__lcore_id U > > > per_lcore__lcore_id > > > > > This is expected behavior as the symbol is defined in librte_eal. > > The dynamic linker will resolve the undefined reference when loading th= e > module in run-time. >=20 > I am aware it's "expected behavior". But have the undefined symbol, and n= o > dependency upon the DPDK .so and no link against the DPDK .a is NOT > "expected behavior". It will break anytime you try to make a static app w= ith > this PMD available. >=20 Have you built static DPDK libs and run testpmd? Your undefined symbol error is most likely because the symbol is not in the= dynamic symbol table of you app. You need to pass -rdynamic to GCC or -export-dynamic to LD when building yo= ur app. Thanks, Sergio > Matthew.