From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 40486A034C; Wed, 22 Jun 2022 23:18:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD6734069C; Wed, 22 Jun 2022 23:18:33 +0200 (CEST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by mails.dpdk.org (Postfix) with ESMTP id BCE0E400D6 for ; Wed, 22 Jun 2022 23:18:31 +0200 (CEST) Received: by mail-lj1-f180.google.com with SMTP id b23so12354368ljh.7 for ; Wed, 22 Jun 2022 14:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=70k0aFcVxwkbWuHj6EQdpcxW6MqEkdrTP6upvOJ1D3c=; b=n+EDcQic7F2Png77Qi3bmcXG6esEfIK61TkTT/l6YGPxzA+AWbOTsSRTYzWVocwFQK 6xE1ouyQXNDihiVYV+Ci/aLx1kOeZGD9DMWuZnQB1rkROFkfJGnUsRhLPe9Y86tWHU97 unBlbU+5F3jAyjW5qj3zsx9plsif9XWHnzV7e3Pdt7d4DNlpNkcTMKZkdKQTKylsz+a9 Zq6XNmhZR9ulYmHwh8RtsizlBzivNGP7W+5PBPCSCDipeXRfZDl7nxnX3VSV01o6+Xgc tfoE6RxM70L2/qB43uH3UydMbBwFN3CElY26o/2Jv+otPc6N6mCX5k/tSiRWXZIfjohE P4tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=70k0aFcVxwkbWuHj6EQdpcxW6MqEkdrTP6upvOJ1D3c=; b=06GxC3N7YUGK3Pa2Kf95pboP3k9B1gSteA37ZFdBMG2114c73MmeyiaJ0PUgFoAVdw nYP2UB0IBaOK8iggAfeUjTU6SJKD4jpzwRs7VVyA80Ayln6DaAnplXeokYUGqPwKq0+b 55iQuIA8fh5+L4c4N7CeM5aTvHwBezP4ZB6jyJc29ojuHJGbf/pe5VDDDbS5T4YIhAQq 2qVWZs0UUzweAwMmuAl/NfKPrYMq1Ph+2DGggHcIEswyu07XhJi9SZGGe9n5MisebBJo 7+uFU9s2/dN2hT375rZn5/8nlREWNz6uvZ8izhDImaPYeXW9AnBmRScgktyc+998Kjsd yr1w== X-Gm-Message-State: AJIora/wvrvf0HHAKwAnT0I/UYjdYGIuUZaDoP0yLbEG2Ft9FryGr1KQ 9rjNKk4f27Y8CJ9s7l40mYY= X-Google-Smtp-Source: AGRyM1t2TmhN8RlAP+Wd2BZYQdcbKM0H1JBQbk0RtAOULD2dA2Y9D3dBeE+7WEytYQ2WiQ1mcFHZ/w== X-Received: by 2002:a2e:9987:0:b0:25a:704f:c0de with SMTP id w7-20020a2e9987000000b0025a704fc0demr3017259lji.320.1655932711144; Wed, 22 Jun 2022 14:18:31 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id z16-20020a196510000000b0047f6fe39bb9sm1338307lfb.27.2022.06.22.14.18.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 14:18:30 -0700 (PDT) Date: Thu, 23 Jun 2022 00:18:29 +0300 From: Dmitry Kozlyuk To: David Marchand Cc: Anatoly Burakov , Fidaullah Noonari , dpdk-dev Subject: Re: [PATCH] eal: fixes the bug where rte_malloc() fails to allocates memory Message-ID: <20220623001829.754bd504@sovereign> In-Reply-To: References: <20220525051837.247255-1-fidaullah.noonari@emumba.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 2022-06-22 19:03 (UTC+0200), David Marchand: > On Sat, Jun 18, 2022 at 1:29 PM Dmitry Kozlyuk wrote: > > > > Hi Fidaullah, > > > > Thanks for the fix, > > Acked-by: Dmitry Kozlyuk > > This seems backport material. > Dmitry, Anatoly, do you agree? If so I'll mark it when applying. > > As for a Fixes: line, the closer commit touching this part is > 07dcbfe0101f ("malloc: support multiprocess memory hotplug") but I > wonder if this bug predates this commit. I agree and the offending commit seems the right one. Before that commit the calculation accounted for the header, with 07dcbfe0101f it was lost: align = RTE_MAX(align, MALLOC_ELEM_HEADER_LEN); map_len = RTE_ALIGN_CEIL(align + elt_size + MALLOC_ELEM_TRAILER_LEN, pg_sz);