From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id C6C1C3005 for ; Wed, 12 Apr 2017 13:02:21 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2017 04:02:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,190,1488873600"; d="scan'208";a="844906419" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by FMSMGA003.fm.intel.com with ESMTP; 12 Apr 2017 04:02:18 -0700 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.153]) by irsmsx105.ger.corp.intel.com ([169.254.7.163]) with mapi id 14.03.0319.002; Wed, 12 Apr 2017 12:02:17 +0100 From: "Van Haaren, Harry" To: "Richardson, Bruce" , Shreyansh Jain CC: Thomas Monjalon , john miller , "dev@dpdk.org" , "olivier.matz@6wind.com" Thread-Topic: [dpdk-dev] error in testpmd when CONFIG_RTE_BUILD_SHARED_LIB=y Thread-Index: AQHSsu3s+wZAIO7e0EalESNOerztg6HAfO2AgACdtYCAAFdWAIAABcyAgAAB+QCAAAGbgIAAAOCAgAAVyYA= Date: Wed, 12 Apr 2017 11:02:17 +0000 Message-ID: References: <357262EF-AA7B-4064-963E-FF130E4607E6@atomicrules.com> <1675520.qVeAGBHxLM@xps13> <20170412100521.GB20092@bricha3-MOBL3.ger.corp.intel.com> <20170412103855.GA36092@bricha3-MOBL3.ger.corp.intel.com> <20170412104203.GA38724@bricha3-MOBL3.ger.corp.intel.com> In-Reply-To: <20170412104203.GA38724@bricha3-MOBL3.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzY4ODA4YTctZTIwYi00MDA2LWIxNWMtNWE4OGVjMjQ2YTU2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlNCcFZUS3A4cDB5NnhZMDFMS0lQNFpBeEpKRkZiRDJ3b2lZVWVjeVA5RlE9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] error in testpmd when CONFIG_RTE_BUILD_SHARED_LIB=y 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: Wed, 12 Apr 2017 11:02:23 -0000 > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > Sent: Wednesday, April 12, 2017 11:42 AM > To: Shreyansh Jain > Cc: Thomas Monjalon ; john miller ; > dev@dpdk.org; olivier.matz@6wind.com > Subject: Re: [dpdk-dev] error in testpmd when CONFIG_RTE_BUILD_SHARED_LIB= =3Dy >=20 > On Wed, Apr 12, 2017 at 11:38:55AM +0100, Bruce Richardson wrote: > > On Wed, Apr 12, 2017 at 10:33:10AM +0000, Shreyansh Jain wrote: > > > My bad - I was too quick in replying - some clarification beneath. > > > > > > > -----Original Message----- > > > > From: Shreyansh Jain > > > > Sent: Wednesday, April 12, 2017 3:55 PM > > > > To: 'Bruce Richardson' > > > > Cc: Thomas Monjalon ; john miller > > > > ; dev@dpdk.org; olivier.matz@6wind.com > > > > Subject: RE: [dpdk-dev] error in testpmd when CONFIG_RTE_BUILD_SHAR= ED_LIB=3Dy > > > > > > > > > -----Original Message----- > > > > > From: Bruce Richardson [mailto:bruce.richardson@intel.com] > > > > > Sent: Wednesday, April 12, 2017 3:35 PM > > > > > To: Shreyansh Jain > > > > > Cc: Thomas Monjalon ; john miller > > > > > ; dev@dpdk.org; olivier.matz@6wind.c= om > > > > > Subject: Re: [dpdk-dev] error in testpmd when CONFIG_RTE_BUILD_SH= ARED_LIB=3Dy > > > > > > > > > > On Wed, Apr 12, 2017 at 04:52:47AM +0000, Shreyansh Jain wrote: > > > > > > > -----Original Message----- > > > > > > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > > > > > Sent: Wednesday, April 12, 2017 12:58 AM > > > > > > > To: john miller > > > > > > > Cc: dev@dpdk.org; olivier.matz@6wind.com; Shreyansh Jain > > > > > > > > > > > > > > Subject: Re: [dpdk-dev] error in testpmd when > > > > > CONFIG_RTE_BUILD_SHARED_LIB=3Dy > > > > > > > > > > > > > > 2017-04-11 14:02, john miller: > > > > > > > > > > > > > > > > We are seeing an issue when running from the head of the ma= ster > > > > branch > > > > > in > > > > > > > dpdk-next-net and building with CONFIG_RTE_BUILD_SHARED_LIB= =3Dy. When > > > > we > > > > > run > > > > > > > testpmd using -d to point to our PMD we get this error > > > > > > > > > > > > > > > > EAL: Error - exiting with code: 1 > > > > > > > > Cause: Creation of mbuf pool for socket 0 failed: Invalid= argument > > > > > > > > > > > > > > > > This error occurs as a result of the rte mempool ops table = having 0 > > > > > > > entries. This table is populated from a call to > > > > > rte_mempool_register_ops(). > > > > > > > This function gets called in rte_mempool_ring.c via the stati= c > > > > > initialization > > > > > > > MACRO MEMPOOL_REGISTER_OPS and exists in librte_mempool_ring.= so. > > > > However > > > > > > > this library is not loaded when the rte_eal_init() gets calle= d so the > > > > > static > > > > > > > initializers are not yet loaded. > > > > > > > > > > > > > > > > I am requesting advice on the proper way to repair this. > > > > > > > > > > > > "-d" the ring library (rte_mempool_ring) - just like any other = shared > > > > lib. > > > > > > > > > > > > > > > > I think this is a bug that should be fixed. The user should not n= eed to > > > > > have to specify a mempool driver just to get testpmd working, so = I think > > > > > the ring handler as default should be compiled in automatically s= o as to > > > > > allow regular mempools to just work as before. > > > > > > > > For Ring Mempool as default enabled, +1 > > > > > > Actually, Ring mempool is enabled by default. But, obviously for shar= ed library case, this > still means "-d". > > > > > > > Not necessarily. That only applies if we don't explicitly link it like > > the other shared libraries. We "special-case" our drivers in that we > > don't add them with a -l flag, but expect the user to dynamically load > > them at runtime. This is one case where I think all apps should > > explicitly link against the ring mempool driver. There is no reason we > > can't make some drivers mandatory. > > > > > > > > > > > > > > > > > This change was done recently to move ring handler into its sep= arate > > > > > drivers/mempool/ring directory. That also means it no longer is c= ompiled > > > > into > > > > > the librte_mempool. > > > > > > > > > > > > > > > > > > > > We should just add a better error message if no mempool drive= r is > > > > > available. > > > > > > > > > > > > Yes, that is something to be improved. > > > > > > > > > > This should be fixed by always having a mempool driver installed. > > > > > > > > Agree. > > > > > > Probably, as ring mempool is a driver and compiled in shared mode, en= abled by default will > not fix this. > > > > But linked in by default will fix it. > > > And as follow-up to my own mail, I think we can actually go further > here. Mempool is a core library, and very little can be done in DPDK > without it. It's also not what most people would think as needing a > driver loaded, so from a usability point of view, I don't see why we > shouldn't link in all mempool drivers by default, like we do other libs. > It will make users life easier, and I can't see any downside to doing > so - they are just .so's after all! Another point to keep in mind is backwards compatibility; think about vario= us testing frameworks that currently do not use -d for mempool. They will a= ll break if we require a -d /path/to/mempool.so argument. +1 for linking it automatically