From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id 60CE62E8A for ; Wed, 12 Apr 2017 12:25:36 +0200 (CEST) Received: by mail-wm0-f53.google.com with SMTP id o81so83691543wmb.1 for ; Wed, 12 Apr 2017 03:25:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=c+pNYYAwPbiTsobMlllryktpxoJpNVWfPsXmnX6Fdo4=; b=FQKnF86sS1A6hjPE2DWvttiLm9fVjv9qbw4/lkVa7g00yigzauJ9GuRRb6Mhykxl1Z 0Aerg4/0ke7g+9+X9ffmnneDBwJLy44nKtjjrfTEU9hADwfjUy/T2N0lbNRDSnKwp4sY b0lMnTSMgfZZFG8s5mOlxWToIkjhqaCZ2aZ5fKtSc6DwGNHSIlyhGxerkl1QPCF6kJ16 AUa3dJFnp2jxjsIfJuW4Fe1hBzlwAEog7Qe8Z5ce6Qa3w1oGmF1xPjMekPX3iU6GrcWE AeW9DAas0ovX4Us/8zMKEmPdyNwqUI+v/wwWkgl8qYHTh0sjWg/fwRGKumCJo8FKPmWS UuAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=c+pNYYAwPbiTsobMlllryktpxoJpNVWfPsXmnX6Fdo4=; b=mCJP/486oPyen2T0kXFDTGdyF802sQ/Bf2PO7J2bCVp2saBPS4HL/YH4ZefeZDvy8Q ZD/k1a8wm/ekzlj59t1RTYQCixIPUel6ho5a3bVyF0YLy9naosT8o9XETcY39rGLiWhT msuDag8CbYsDgDxfWxdGgbBt0xxJAhdjMSevupDPggRyhsHY1ALVtqGt5Ec2tPf2PT3G lOVHEwSdqh4cvxI+8riiX5kqfSeaYYosIq4fbuusffhzC41rXuEn/FfIatOTlg1HkDa+ DBiohlaCGPaYNhIxhtu+3xaf1J3/dU/0CaB6v7NH6qPNIr4l26LeDgTPTDqdiK6kqOli zRWA== X-Gm-Message-State: AN3rC/5dtB0cU+lV/wYzGsH2NbZwj5xdJsLnSJ98gYkjGGUVfVhaMVjd BiZ4RcavNZSB0BNQ X-Received: by 10.28.191.75 with SMTP id p72mr18252164wmf.136.1491992736706; Wed, 12 Apr 2017 03:25:36 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id j185sm6023785wmg.23.2017.04.12.03.25.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Apr 2017 03:25:35 -0700 (PDT) From: Thomas Monjalon To: Bruce Richardson Cc: Shreyansh Jain , john miller , dev@dpdk.org, "olivier.matz@6wind.com" Date: Wed, 12 Apr 2017 12:25:34 +0200 Message-ID: <1852173.LYJU7u7p34@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20170412100521.GB20092@bricha3-MOBL3.ger.corp.intel.com> References: <357262EF-AA7B-4064-963E-FF130E4607E6@atomicrules.com> <20170412100521.GB20092@bricha3-MOBL3.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 10:25:37 -0000 2017-04-12 11:05, Bruce Richardson: > On Wed, Apr 12, 2017 at 04:52:47AM +0000, Shreyansh Jain wrote: > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > 2017-04-11 14:02, john miller: > > > > > > > > We are seeing an issue when running from the head of the master branch in > > > dpdk-next-net and building with CONFIG_RTE_BUILD_SHARED_LIB=y. 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 static initialization > > > MACRO MEMPOOL_REGISTER_OPS and exists in librte_mempool_ring.so. However > > > this library is not loaded when the rte_eal_init() gets called 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 need 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 so as to > allow regular mempools to just work as before. We thought about it when moving the mempool handler as a driver. The common case when using shared libs, is to specify the lib directory with -d or with CONFIG_RTE_EAL_PMD_PATH. I am not sure we should make an exception for the mempool driver. If it is built as a shared library, the only one able to link it is the user (who knows where the file is). > > This change was done recently to move ring handler into its separate drivers/mempool/ring directory. That also means it no longer is compiled into the librte_mempool. > > > > > > > > We should just add a better error message if no mempool driver is available. > > > > Yes, that is something to be improved. > > This should be fixed by always having a mempool driver installed. It is not a matter of having it installed but finding it in the right path. A good error message suggesting -d would be OK I think.