From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id A6C0714EC for ; Wed, 10 May 2017 16:54:23 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 41BCD20B95; Wed, 10 May 2017 10:54:23 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 10 May 2017 10:54:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=wp1JUSw/H1qTm/x ejUXmWpxqAr3FmFVX9jLBxtItjdc=; b=U+xFT0r2X+FLPI16lAzFH/FYnoY0R5S LDB9jcTcOEnKYpbKUrND07P6F+jwPHPaCOzd/oTY6IKSMDtTG5c0HgKDJPSb/H96 1qzfU16R6+xOe+9i76nuRVtNMkP+2zbP3hWukZB5VfMmAQl2wGQzfpFrLCoQu0V/ T241YSNzX7ws= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=wp1JUSw/H1qTm/xejUXmWpxqAr3FmFVX9jLBxtItjdc=; b=RBgyWHB5 6DyfgtYTf/spxFcdJEoHXOj7xBrnmILb0Cl78tmQEovijKPFcEZ+sfI+KeGaBAAo lOVtqGJxAjfGDxGCZNXXihNwlnQ3z5edwftLFzzlZfR6y5cPyOOLGRtl5HmFnMy6 se9LkHGmOvTseT0u2sYbKQpIxJ/7oAzgRlc6VTes9KxlnVsSD2dpVnrLwpNcQUGg OuROuQ/2zvu1nIqVepJCae4gYekBckup+7hnvnH/+DyJg9k4DnZttBLmMK1Bo3M+ +hyBfDu1lOJrAq42qYf6kwqcwI49hOpx0NWigPbAhrkvINytqVg374N6AHjItT2W icCOwT/FNVkCBw== X-ME-Sender: X-Sasl-enc: koaWdD4ZaVLC3eZOLUezEXexCsfPZe2q6ky5LcSdBqnV 1494428062 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id DD09F7E2B0; Wed, 10 May 2017 10:54:22 -0400 (EDT) From: Thomas Monjalon To: Olivier Matz Cc: dev@dpdk.org, Gregory Etelson Date: Wed, 10 May 2017 16:54:22 +0200 Message-ID: <5059101.zxD7I1FFNd@xps> In-Reply-To: <20170510164235.62fcb469@platinum> References: <1802735.EECn92tGJO@polaris> <20170510164235.62fcb469@platinum> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] mbuf: fix bulk allocation when debug enabled 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, 10 May 2017 14:54:23 -0000 10/05/2017 16:42, Olivier Matz: > Hi, > > On Sat, 06 May 2017 10:26:49 +0300, Gregory Etelson wrote: > > The debug assertions when allocating a raw mbuf are not correct since > > commit 8f094a9ac5d7 ("mbuf: set mbuf fields while in pool"), > > which triggers a panic when using this function in debug mode > > > > Fixes: 8f094a9ac5d7 ("mbuf: set mbuf fields while in pool") > > > Signed-off-by: Gregory Etelson > > --- > > lib/librte_mbuf/rte_mbuf.h | 25 ++++++++++++------------- > > 1 file changed, 12 insertions(+), 13 deletions(-) > > > > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h > > index 9097f18..05b8300 100644 > > --- a/lib/librte_mbuf/rte_mbuf.h > > +++ b/lib/librte_mbuf/rte_mbuf.h > > @@ -788,6 +788,13 @@ rte_mbuf_refcnt_set(struct rte_mbuf *m, uint16_t new_value) > > void > > rte_mbuf_sanity_check(const struct rte_mbuf *m, int is_header); > > > > +#define MBUF_RAW_ALLOC_CHECK(m_) do { \ > > + RTE_ASSERT(rte_mbuf_refcnt_read(m_) == 1); \ > > + RTE_ASSERT(m_->next == NULL); \ > > + RTE_ASSERT(m_->nb_segs == 1); \ > > + __rte_mbuf_sanity_check(m_, 0); \ > > +} while (0) > > + > > Few nits: > - maybe 'm_' could be 'm' > - some parenthesis could be added for safety > > Thomas, I know you're in hurry for 17.05, I think this fix should > go in. If you want, I can send a v3 with this small changes if you > need it now. Yes, please a quick v3 would be appreciated. Thanks