From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02293C432C0 for ; Mon, 25 Nov 2019 23:25:00 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 819AF20409 for ; Mon, 25 Nov 2019 23:24:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=monjalon.net header.i=@monjalon.net header.b="S5eqn9VB"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="BNtqGdLy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 819AF20409 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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?