From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 7A4C81B7C2 for ; Tue, 15 May 2018 15:48:33 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id a8-v6so1142954wmg.5 for ; Tue, 15 May 2018 06:48:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QgRUFH8/hqw0R2slGlKWLwbVkfD4BjHDDj2Vox4rzWY=; b=kIRLl61srhXZwrNmbfd7Rp6cM9NlCw7koRebXESAwEb7Rq71NP/8qaGBWNkGKDwOpN zLbAZhUtGYZFJKh1p+8EIHNK07nk5p0z+0l9o/ufbuAwHI2n1cXfxUZz+RquX/a+/P8Z tqWwrSr2lLO2X38whMRSkrvZBy2ZDSwLt/5P7JO9e/9u/xljD/e4+aXp7/JD72hpqu1j 4Swuznr3/8qh2ey0DG2tVkEY78yspFVPTFGiJnmalqDnr3jMLX6cQjN5vfCO1icDg5aM ov9OvT+oOhi/FUeS6C7DxReV8XzDY0/Q0+2j0iSUXOKrJprVUhpWJttXybh3FUIOsHHv b0bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QgRUFH8/hqw0R2slGlKWLwbVkfD4BjHDDj2Vox4rzWY=; b=ZpOm1vd8HW6xXK0sFF1lEzB0zlKKM6D10KTvDEVLEL4HwPVNWRmDBrUSA/cf+T3Ltb q0PTvhjOmj/Gx6pCOiq6ka1kFWVMjUyH57us+xraqPw3x2AgiLv1ynLlsjqbT9J+XOWd iMVeQtQZolryuXq+ySWPrI5R9ZnXFOUTQGE9G1GleWSitNcMrxeSE0Qv5KFW4YJjXtYJ C0qCRyQiD6ShRm7gXh0TNBCuGv7SDj3DXNa4Li3GupwSHaGwcFOGwhJjvlu3KoSjoY9Q x8s1UQ4P3wtP+MRaPG0fM+raqBg3282Ixk9D022+oftuAx6Rrmfm96myzdpBTknBhdvI Xb8A== X-Gm-Message-State: ALKqPwcH6hSYbCx3rclS87om4Ezt8lGj9ZLoviqUSr0uB0iaEakSKToO LOIxxKsl0QDt4OeEDesHBvDxG1lvVDQ= X-Google-Smtp-Source: AB8JxZp6OZQwwlMfmsylpv9rpWRvX9qywX99sslSMV5lWk8QVmkQrk7gQG7Zhf9JeQcPqOtRZdyWOw== X-Received: by 2002:a1c:59c4:: with SMTP id n187-v6mr8143231wmb.51.1526392113186; Tue, 15 May 2018 06:48:33 -0700 (PDT) Received: from localhost (slip139-92-244-193.lon.uk.prserv.net. [139.92.244.193]) by smtp.gmail.com with ESMTPSA id x130-v6sm707462wme.24.2018.05.15.06.48.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 06:48:32 -0700 (PDT) From: luca.boccassi@gmail.com To: Anatoly Burakov Cc: Konstantin Ananyev , dpdk stable Date: Tue, 15 May 2018 14:46:41 +0100 Message-Id: <20180515134731.9337-30-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180515134731.9337-1-luca.boccassi@gmail.com> References: <20180503110612.12146-2-luca.boccassi@gmail.com> <20180515134731.9337-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'memzone: fix size on reserving biggest memzone' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2018 13:48:33 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/16/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From f540e11675052571c6b885e185e3b9ad90b7d444 Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Thu, 3 May 2018 17:00:47 +0100 Subject: [PATCH] memzone: fix size on reserving biggest memzone [ upstream commit a82377cab87cea35bdd135fa8b8c4c485e2389f7 ] Size of malloc heap elements include overhead, which should not be counted as part of memzone. Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc") Signed-off-by: Anatoly Burakov Acked-by: Konstantin Ananyev --- lib/librte_eal/common/eal_common_memzone.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c index 1ab3ade2d..56edc492d 100644 --- a/lib/librte_eal/common/eal_common_memzone.c +++ b/lib/librte_eal/common/eal_common_memzone.c @@ -225,7 +225,8 @@ memzone_reserve_aligned_thread_unsafe(const char *name, size_t len, snprintf(mz->name, sizeof(mz->name), "%s", name); mz->iova = rte_malloc_virt2iova(mz_addr); mz->addr = mz_addr; - mz->len = (requested_len == 0 ? elem->size : requested_len); + mz->len = (requested_len == 0 ? + (elem->size - MALLOC_ELEM_OVERHEAD) : requested_len); mz->hugepage_sz = elem->ms->hugepage_sz; mz->socket_id = elem->ms->socket_id; mz->flags = 0; -- 2.14.2