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 63F58A0C4C for ; Mon, 12 Jul 2021 15:07:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 588FE4119D; Mon, 12 Jul 2021 15:07:23 +0200 (CEST) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mails.dpdk.org (Postfix) with ESMTP id B7EA5406B4 for ; Mon, 12 Jul 2021 15:07:22 +0200 (CEST) Received: by mail-wm1-f47.google.com with SMTP id l4-20020a05600c4f04b0290220f8455631so3864282wmq.1 for ; Mon, 12 Jul 2021 06:07:22 -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 :mime-version:content-transfer-encoding; bh=++w259vwSl8+4wzF4+yvz18pEl6n+hrCkWDZY5dtH9A=; b=PRh86zRkyacRm+B7aBeEBH2YOMOnOqZh5AcmT7UQFIrBf2Jw4qvDlKRIrfliH8IpS6 5ONZut7soVcUGtUItgBUmAOn6rdyCgM/OIENi1CX27pEW4/+H6/Ez3hMdEdYJAI4FamI wKX339Jb5fSYvJpuuvYhOggCGo0S7vTabnBdrRlp5MLqJCHfcy8nd8yrOgwJim/UsZuP 4IElEn+51RJIRhl89BHxJjtnifwKjfS06rc0zgMW7uRNiGrVcDeRvrd0zBDZWMErAM5c TUnOn+ii1vCqQBEjvufbTuV+uT9XQtUa8m/NF8EoihW7Rq93lFb34XmDYCv05hp/EvWd iojw== 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:mime-version:content-transfer-encoding; bh=++w259vwSl8+4wzF4+yvz18pEl6n+hrCkWDZY5dtH9A=; b=OQLtxXDzOaYOMRRfh3E9gqawpFn+rMzpFKreobi2k2MFB2QOmMnAYbwP/GFsz653fF ZL3qc2KlXccMB5/8mqulCuI1VZIF2OjI1z7E7xEFxUJ+jcLlyTJwhEpnEVpDCMk+8YfV /ucVZNOJspZj/uO9HrLsrUPATJgAD1mX8anYigpKF/JRV4xAhLUHcTtcxU3pG4VD12hg oL7u+leM6EILcbYR6HQ7sOwMpBCaG/pLDFa8Lo821LlxG0KYWLtIfaCgeMWNkuM8cdlW JzW0jkvywbv7Lmc4txQ6zQ9CJS32+o8fr7/Z3lTpmlqkJeekb1Ee0dTqJg07QzLy6Yl4 KPiw== X-Gm-Message-State: AOAM5337l0GOktId/a5gGmicQJsi+cxCSjh0wG2cw6UMYSjcgKcZ9YJJ D4D+xp/MyN53LtkaXWryFuM= X-Google-Smtp-Source: ABdhPJxckiJ/O2MMON9AyyCDlOpzOyQvDlo3VHUqKRr3gnkSvwRO9Z52ZnL0b7fLEJX2nkGIdtRXKA== X-Received: by 2002:a05:600c:4fc1:: with SMTP id o1mr41038969wmq.158.1626095242497; Mon, 12 Jul 2021 06:07:22 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id r19sm1437171wrr.32.2021.07.12.06.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:07:21 -0700 (PDT) From: luca.boccassi@gmail.com To: David Marchand Cc: Maxime Coquelin , dpdk stable Date: Mon, 12 Jul 2021 14:03:59 +0100 Message-Id: <20210712130551.2462159-4-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712130551.2462159-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'malloc: fix size annotation for NUMA-aware realloc' has been queued to stable release 20.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/14/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/73b4b37a14f5150906477b115a94e7de2e26a346 Thanks. Luca Boccassi --- >From 73b4b37a14f5150906477b115a94e7de2e26a346 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Thu, 10 Jun 2021 14:09:22 +0200 Subject: [PATCH] malloc: fix size annotation for NUMA-aware realloc [ upstream commit 2ca92f54410400af76a1f0bc3bfecc8077e282aa ] __rte_alloc_size is mapped to compiler alloc_size attribute. Quoting gcc documentation: """ alloc_size The alloc_size attribute is used to tell the compiler that the function return value points to memory, where the size is given by one or two of the functions parameters. GCC uses this information to improve the correctness of __builtin_object_size. The function parameter(s) denoting the allocated size are specified by one or two integer arguments supplied to the attribute. The allocated size is either the value of the single function argument specified or the product of the two function arguments specified. Argument numbering starts at one. """ In rte_realloc_socket case, only 'size' matters. Note: this has been spotted by Maxime trying to use rte_realloc_socket and compiling with gcc 11. Fixes: 17b347dab769 ("malloc: add alloc_size attribute to functions") Signed-off-by: David Marchand Tested-by: Maxime Coquelin --- lib/librte_eal/include/rte_malloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/include/rte_malloc.h b/lib/librte_eal/include/rte_malloc.h index 3af64f8761..895bb6e849 100644 --- a/lib/librte_eal/include/rte_malloc.h +++ b/lib/librte_eal/include/rte_malloc.h @@ -160,7 +160,7 @@ rte_realloc(void *ptr, size_t size, unsigned int align) __rte_experimental void * rte_realloc_socket(void *ptr, size_t size, unsigned int align, int socket) - __rte_alloc_size(2, 3); + __rte_alloc_size(2); /** * This function allocates memory from the huge-page area of memory. The memory -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-12 13:41:37.109252062 +0100 +++ 0004-malloc-fix-size-annotation-for-NUMA-aware-realloc.patch 2021-07-12 13:41:36.154115611 +0100 @@ -1 +1 @@ -From 2ca92f54410400af76a1f0bc3bfecc8077e282aa Mon Sep 17 00:00:00 2001 +From 73b4b37a14f5150906477b115a94e7de2e26a346 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2ca92f54410400af76a1f0bc3bfecc8077e282aa ] + @@ -29 +30,0 @@ -Cc: stable@dpdk.org @@ -34 +35 @@ - lib/eal/include/rte_malloc.h | 2 +- + lib/librte_eal/include/rte_malloc.h | 2 +- @@ -37 +38 @@ -diff --git a/lib/eal/include/rte_malloc.h b/lib/eal/include/rte_malloc.h +diff --git a/lib/librte_eal/include/rte_malloc.h b/lib/librte_eal/include/rte_malloc.h @@ -39,2 +40,2 @@ ---- a/lib/eal/include/rte_malloc.h -+++ b/lib/eal/include/rte_malloc.h +--- a/lib/librte_eal/include/rte_malloc.h ++++ b/lib/librte_eal/include/rte_malloc.h