From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 5A1F62716 for ; Thu, 9 Jun 2016 17:27:40 +0200 (CEST) Received: by mail-wm0-f42.google.com with SMTP id k204so65636454wmk.0 for ; Thu, 09 Jun 2016 08:27:40 -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=bU8Qtu1cEw+I1bEIDcynO8lq+rg8t/ljuLuVAcVR27Q=; b=wutsdPv0Ine/RHoIxj/jkWX9T2vyLYAU3xfW8LXQe3WIlO4mRaDpfSepaBqyJYQ9Y4 1367CAhf2MVi/jXdNEiljFSOh0LuAeBDRnkFkyz9k8Gw/tS/NbfMgabl74X3luceR4v8 QjKsc7ErOWZjCx6OoFk/BHD27CUYaTIIwPnxg5xiXpbOi4BeBw+A07A4tm8vwhy2s+Dq cEsglOPahjungD+dxt+zEMqzWGnLf1x4xDYmZkekeFeFDZK0t33RH5C76cWAPXlFE9uj HfzBZ6aboqYXqVI5Xt43vhu0fm+e69srWkZaJX4usAq9bmUpQ9zyBxyru6a3CphcFvWw 2I3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=bU8Qtu1cEw+I1bEIDcynO8lq+rg8t/ljuLuVAcVR27Q=; b=j1du+cG1u2+p7Zih6Eg6Gsixgq9QHbsIz3fzEaheB/4ULIr0IFgN35yvbhErtOQyF3 LDJlSGiiC2ZSbMLyJjUFFS4Xo+SOTgVG1KYvFEvSQ+XTC1jlR0UZfauD8GH+/8E815sV Ru+pCdAj36/m0Ndjjcqi/oKISkiY9CtcKZ4aGUUllyDjLxUuYVNA6yRm7B+mQe+ag7hC sWWTsce9nE3fcFKwOfgvipKQkxmYDqKmR93d3F9ZFdh8u/3tosEQ/Uf0pl8DLkgTYulP H5lQwvzL3DAlGVYk0UR/XK7x69x7rBQaRnCG3Dl/JQV9jRkTj/eLSzTGsy94x+NZ7h9V 8x5w== X-Gm-Message-State: ALyK8tLyQt3uwl/IW68aA/P0zT/TcokHstb1rU1VO926PwIBGmlwouNuBrdVnU9waS4GAWji X-Received: by 10.28.125.18 with SMTP id y18mr10611621wmc.68.1465486060062; Thu, 09 Jun 2016 08:27:40 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id r76sm8217810wme.14.2016.06.09.08.27.37 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 09 Jun 2016 08:27:39 -0700 (PDT) From: Thomas Monjalon To: "Ananyev, Konstantin" Cc: dev@dpdk.org, Olivier Matz , Adrien Mazarguil , "Zhang, Helin" Date: Thu, 09 Jun 2016 17:27:37 +0200 Message-ID: <11387408.tmVAJa3yAF@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <2601191342CEEE43887BDE71AB97725836B6D90C@irsmsx105.ger.corp.intel.com> References: <1465374688-11729-1-git-send-email-adrien.mazarguil@6wind.com> <57591EEA.9040807@6wind.com> <2601191342CEEE43887BDE71AB97725836B6D90C@irsmsx105.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] mbuf: remove inconsistent assert statements X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2016 15:27:40 -0000 2016-06-09 13:21, Ananyev, Konstantin: > From: Olivier Matz [mailto:olivier.matz@6wind.com] > > Today: > > > > /* allowed */ > > m = rte_pktmbuf_alloc(); > > rte_pktmbuf_free(m); > > > > /* not allowed */ > > m = rte_mbuf_raw_alloc(); > > __rte_mbuf_raw_free(m); > > > > /* we should do instead (strange): */ > > m = rte_mbuf_raw_alloc(); > > rte_pktmbuf_free(m); > > > > What I suggest to have: > > > > /* allowed, no change */ > > m = rte_pktmbuf_alloc(); > > rte_pktmbuf_free(m); > > > > /* allowed, these functions would be symetrical */ > > m = rte_mbuf_raw_alloc(); > > rte_mbuf_raw_free(m); > > > > /* not allowed, m->refcnt is uninitialized */ > > m = rte_mbuf_raw_alloc(); > > rte_pktmbuf_free(m); > > Hmm, and what it will buy us (except of symmetry)? API consistency is important. It is a matter of making our users confident in DPDK. I would not like to use a library where I need to check in the doc for each function because I don't remember and I'm not confident that the function fish() do some fishing or hunting.