From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BC26BA04C2; Tue, 26 Nov 2019 00:24:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 475EC2952; Tue, 26 Nov 2019 00:24:58 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 68885CF3; Tue, 26 Nov 2019 00:24:57 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 0950A22756; Mon, 25 Nov 2019 18:24:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 25 Nov 2019 18:24:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=DUAl2cIKcW/YxmMZNTWcJu2bgwgwjw8MxRTnRnZWigc=; b=S5eqn9VBS0pS NkD/jQIXdwUQVu8JhEBEAJfUuK3LWAXWlCQ1OWt0wT9i/wksEoxPJq0uhFz2MwR/ EGh0vWqyTJ2rEDvFf5qOfQjLYg7JP8uf8Ep2bNwMm9DIeE8+mnO860UWl845wkI/ DFxsxgRmn4i2R9rcy7bNFsNDgQCviZs= 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=DUAl2cIKcW/YxmMZNTWcJu2bgwgwjw8MxRTnRnZWi gc=; b=BNtqGdLyobSxt7uuX+9fpiK1TaRMpkeJKZ4LTqDRffBnNDdGFrKw4zBNX ONSHVRGW4PGwuj6fBCNTopwyVtcFLFCL3+PjjPiKjFVp7c6junPIBV+drdQMUvBN 494jwiLS/IxTx8tuYiWl/wA4o0ghqKS8QocqCTxbJwO+sK9TIThYG14lTtZg03Tg EMUGLT/+xKtg4nEZUnSOoVowI4LN3G7yf9kzQTEPJ9ef375C5JrmMPNc7UoZMUvr vKFsuqiI0UuM8okuoFcVEgbDfp+LyxjgyOiZVYnp87QKqW1UlgFPrSggK8n4bsXo l3IMjjmF2sEXe2aVV8BoEMsywMJOw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudeivddgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 7C80880063; Mon, 25 Nov 2019 18:24:55 -0500 (EST) From: Thomas Monjalon To: "Burakov, Anatoly" , Xueming Li Cc: dev@dpdk.org, Asaf Penso , stable@dpdk.org, david.marchand@redhat.com Date: Tue, 26 Nov 2019 00:24:54 +0100 Message-ID: <1911864.xaV5BFYatv@xps> In-Reply-To: References: <1574346302-1263-1-git-send-email-xuemingl@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] malloc: fix memory element size in case of padding 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 21/11/2019 16:14, Burakov, Anatoly: > On 21-Nov-19 2:25 PM, Xueming Li wrote: > > This patch fixes wrong inner memory element size when joining two > > elements. > > > > Fixes: af75078fece3 ("first public release") > > Cc: stable@dpdk.org > > > > Signed-off-by: Xueming Li > > --- > > --- a/lib/librte_eal/common/malloc_elem.c > > +++ b/lib/librte_eal/common/malloc_elem.c > > @@ -487,6 +487,10 @@ join_elem(struct malloc_elem *elem1, struct malloc_elem *elem2) > > else > > elem1->heap->last = elem1; > > elem1->next = next; > > + if (elem1->pad) { > > + struct malloc_elem *inner = RTE_PTR_ADD(elem1, elem1->pad); > > + inner->size = elem1->size - elem1->pad; > > + } > > } > > Reviewed-by: Anatoly Burakov I don't understand this patch. The variable inner is never used. What am I missing?