From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id E27B269D8 for ; Fri, 24 Mar 2017 17:22:31 +0100 (CET) Received: by mail-wm0-f48.google.com with SMTP id u132so17120214wmg.0 for ; Fri, 24 Mar 2017 09:22:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z7v9R/8dOytsfx6ueufNxHwtj6SZdKtDtlP0bcTDkOk=; b=dbIcjZGkXcItRgOurt6MVUN85f+TCMM6XjHfxRYEoZB9VUzxQzWppNt5HpDVqomOxK bMEuz89gPRX/hm43GmrL8kofbUCwk9Vt5JFXYKbbI/RE69HP2k0cjSMovuZtibTqDDry hLbWs0uTmkw/wigtjlOYsVr0wMbn7NSNUWvUFyRgVYiCYaleEnWNQwfGVuUW4vnOs2k4 k32SB3fzTndiT9R3QSBWu+DErEpUx3m5/BA5m8b68Nm6wdM6EG6chaxnJpMGTE/oQuax g/qNrr4j4hu6lLp4qlrSY/SPvr3H672xa5Vzi48blZWghSbR3kVlYRcCQb6HrWSIpFKB /p0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z7v9R/8dOytsfx6ueufNxHwtj6SZdKtDtlP0bcTDkOk=; b=bd05SVwkgm7ldu5xBsB35Fk9qcn+GF3GlDhVDeqG5i3vVJj0ByqYALlHgw8fl1YdZF tAX0zN2mPwI/Nd79S7duAOnrVh+o1xJpqQgBj3wSRU6SImbr14Ca+qZd7oGRuWVXCea3 DrrqnNe1fqnPcJ211BrSAk8+Rt5XpH6qS/jA7AecZZ184KSLZV2ZTmlW/A6YQki3yjvn dwUdAV1emkGn82PsCmak4M6SZM+ToqR6fi78yaU5y9u8zTYER/wQ0jHdL0MSAlPd0gyD gUVZp+uxBYSnvRbaSCzHzcb+9pRvGrHmBkF+87sC7BN6PuXbrcfldjiwosTjApr8HsNe Rjtw== X-Gm-Message-State: AFeK/H34c2Tj7I8TGCK/R63T3CvnJipvLV1VAc4a3PouAsi4APECxEynxTV1KT4CqqRvTtFD X-Received: by 10.28.227.213 with SMTP id a204mr3668398wmh.120.1490372551437; Fri, 24 Mar 2017 09:22:31 -0700 (PDT) Received: from platinum (2a01cb0c03c651000226b0fffeed02fc.ipv6.abo.wanadoo.fr. [2a01:cb0c:3c6:5100:226:b0ff:feed:2fc]) by smtp.gmail.com with ESMTPSA id e16sm3447306wra.62.2017.03.24.09.22.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Mar 2017 09:22:31 -0700 (PDT) Date: Fri, 24 Mar 2017 17:22:27 +0100 From: Olivier Matz To: Shreyansh Jain Cc: , , Message-ID: <20170324172227.5bdfac8c@platinum> In-Reply-To: <1490004190-16892-1-git-send-email-shreyansh.jain@nxp.com> References: <1490004190-16892-1-git-send-email-shreyansh.jain@nxp.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 1/2] drivers/mempool: add stack mempool handler as driver 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, 24 Mar 2017 16:22:32 -0000 Hi Shreyansh, On Mon, 20 Mar 2017 15:33:09 +0530, Shreyansh Jain wrote: > CONFIG_RTE_DRIVER_MEMPOOL_STACK option added to common_base. > Stack mempool handler moved from lib/librte_mempool into drivers/mempool. > > With this patch, the Stack mempool handler registration is optional and > toggled via the configuration file. In case disabled (N), it would imply > request for creating of mempool would fail. > > Signed-off-by: Shreyansh Jain > --- > config/common_base | 5 + > drivers/Makefile | 1 + > drivers/mempool/Makefile | 36 +++++ > drivers/mempool/stack/Makefile | 55 ++++++++ > drivers/mempool/stack/rte_mempool_stack.c | 147 +++++++++++++++++++++ > .../mempool/stack/rte_mempool_stack_version.map | 4 + > lib/librte_mempool/Makefile | 1 - > lib/librte_mempool/rte_mempool_stack.c | 147 --------------------- > 8 files changed, 248 insertions(+), 148 deletions(-) > create mode 100644 drivers/mempool/Makefile > create mode 100644 drivers/mempool/stack/Makefile > create mode 100644 drivers/mempool/stack/rte_mempool_stack.c > create mode 100644 drivers/mempool/stack/rte_mempool_stack_version.map > delete mode 100644 lib/librte_mempool/rte_mempool_stack.c I tried to pass the mempool autotest, and it issues a segfault. I think the libraries are missing in rte.app.mk, so no handler is registered. Adding the following code in lib/librte_mempool/rte_mempool_ops.c fixes the crash. ops = rte_mempool_get_ops(mp->ops_index); + if (ops == NULL || ops->alloc == NULL) + return -ENOTSUP; return ops->alloc(mp); Now that drivers are not linked to the mempool library, it can happen that there is no handler. Could you please add this patch in your patchset? I also checked that compilation works in shared lib mode. It looks good, but I think there will be a behavior change if CONFIG_RTE_EAL_PMD_PATH is empty (default). This option is probably used by distros to indicate where dpdk plugins are installed, and when it is set, all drivers of this directory are loaded, so in that case it won't change. But when unset, the drivers have to be loaded manually, and with this change, the mempool driver will have to be loaded with the -d eal option. Could you please check what occurs in that case? At least see if it displays a nice error or if it crashes. I suspect it will crash Also, the MAINTAINERS file should be updated. Thanks, Olivier