From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 2CEE42B98 for ; Tue, 31 Jan 2017 10:55:38 +0100 (CET) Received: by mail-wm0-f43.google.com with SMTP id c85so253020012wmi.1 for ; Tue, 31 Jan 2017 01:55:38 -0800 (PST) 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=8audFTgmgzHyuUSJP0Q86D7CvUN+8bxSC+aR4RCeMI0=; b=GRKlGBzZPcuMbl4PHos/V9w8vK54GbWeLondWxFsHUegB7RS7OOPGWuJLqJ09331yE +xM5tDC7ftKjZLmVZJj6gvHEt+1K2NQaxjuf8s1bV8IfxRDVf5H4HD44FvSFkRAx/MoK yAlllZx85dPx0g1iFvW2OBri/7ET8eH/i5YCaJNUCJKWSgzzTEVfI4mD9YpNswpMo4cF MaNfzwFqzl+qmlNnT+860hFeuW+KtPM2/wgJLr9XjTDGtC9RIC/GsIc3k+RiiXVFYaDY gXARvc1SqLfZnIgI67MDrk4uaEBusO806N9Mg07CiikSqO2B6Eqdn6XLuJ35JIoufA8M nWLw== 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=8audFTgmgzHyuUSJP0Q86D7CvUN+8bxSC+aR4RCeMI0=; b=X9P1oqlXhdPOyiLsgPgytSmp/GHzNNcJ0FK+5D82nlRNwOr5cdAs4PsVhA7aD1hSYq KrvnTf88glzE/oFGQwUSkRVmh1Z0st7oSCUDQO2rgrcr4J4pISOEGTaSMxNmyUZ9sS09 zK+wx4ZcHwUEUil4MWHw8io1bzhwX4eLBdBcjsACr6zgWhatBbYFjl5X+jx0F4ir3Drb gt5FsxWrOjFNeMpvNJWPPLCrXUMDxWuIwztSKTbDy1SofBhW26NXdDQM006t1GMrEsHV 3k5bLcpMEu/Df7UAqqSdndGbtKZ1Z8DDYqRQUadsC4rR68fQaVYsLh5rcWhmiUvtVWIA 5W4A== X-Gm-Message-State: AIkVDXIGWmPR3gf7tEnTayzk0V3sathm0i+eV/RL0GIn+hrMXtT+q244XB4e+TUIgC/KlPjh X-Received: by 10.28.232.91 with SMTP id f88mr16969784wmh.27.1485856537862; Tue, 31 Jan 2017 01:55:37 -0800 (PST) Received: from platinum (2a01cb0c03c651000226b0fffeed02fc.ipv6.abo.wanadoo.fr. [2a01:cb0c:3c6:5100:226:b0ff:feed:2fc]) by smtp.gmail.com with ESMTPSA id e16sm27575235wra.36.2017.01.31.01.55.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Jan 2017 01:55:37 -0800 (PST) Date: Tue, 31 Jan 2017 10:55:35 +0100 From: Olivier Matz To: Hemant Agrawal Cc: , Message-ID: <20170131105535.2831ac3d@platinum> In-Reply-To: <1484896280-18814-1-git-send-email-hemant.agrawal@nxp.com> References: <1484678576-3925-1-git-send-email-hemant.agrawal@nxp.com> <1484896280-18814-1-git-send-email-hemant.agrawal@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 v2] mbuf: use pktmbuf helper to create the pool 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: Tue, 31 Jan 2017 09:55:38 -0000 Hi Hemant, Sorry for the delay. On Fri, 20 Jan 2017 12:41:20 +0530, Hemant Agrawal wrote: > When possible, replace the uses of rte_mempool_create() with > the helper provided in librte_mbuf: rte_pktmbuf_pool_create(). > > This is the preferred way to create a mbuf pool. > > This also updates the documentation. > > Signed-off-by: Olivier Matz > Signed-off-by: Hemant Agrawal > > [...] > > --- a/examples/ip_reassembly/main.c > @@ -909,11 +908,13 @@ struct rte_lpm6_config lpm6_config = { > > snprintf(buf, sizeof(buf), "mbuf_pool_%u_%u", lcore, queue); > > - if ((rxq->pool = rte_mempool_create(buf, nb_mbuf, MBUF_SIZE, > 0, > - sizeof(struct rte_pktmbuf_pool_private), > - rte_pktmbuf_pool_init, NULL, > rte_pktmbuf_init, NULL, > - socket, MEMPOOL_F_SP_PUT | > MEMPOOL_F_SC_GET)) == NULL) { > - RTE_LOG(ERR, IP_RSMBL, "mempool_create(%s) failed", > buf); > + rxq->pool = rte_pktmbuf_pool_create(buf, nb_mbuf, > + 0, /* cache size */ > + 0, /* priv size */ > + MBUF_DATA_SIZE, socket); > + if (rxq->pool == NULL) { > + RTE_LOG(ERR, IP_RSMBL, > + "rte_pktmbuf_pool_create(%s) failed", buf); > return -1; Here we loose the SP/SC flags. In the ip reassembly example, it looks there is one mbuf pool per rx core since the beginning (commit cc8f4d020). It's probably not critical, but I think we should remove the ip reass part of the patch, what do you think? Note that this issue was also in my RFC patch, so it's my mistake :) Apart from that, the patch looks good. Thanks Olivier