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 D28EEA0C47 for ; Fri, 11 Jun 2021 11:19:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA6D541102; Fri, 11 Jun 2021 11:19:23 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 0B1B341102 for ; Fri, 11 Jun 2021 11:19:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623403161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2kaJ7oRUUbPJKxpLp3DejzWE4rpam+11drTaIR82xAk=; b=fg/3WJ5BsdeYcDTRA1obxC0hmZVB9GvGt+qbC6xcc5x7mLAMWA3O1bHnS+EnmNkZBxWTuZ cpOnnQRgTMDaaWpBXlGYdhKFcquHJgu7inPpOzl1O+M93PopgMB3siHOIK3AXj7ZY70pVw Kn5tWpx1wVB7rn9S7K45KEafk3lr8ms= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-539-MzI_E5JgPZCnQJ_FOCvSkw-1; Fri, 11 Jun 2021 05:19:18 -0400 X-MC-Unique: MzI_E5JgPZCnQJ_FOCvSkw-1 Received: by mail-ua1-f69.google.com with SMTP id a15-20020ab0684f0000b0290275ca73402eso969604uas.12 for ; Fri, 11 Jun 2021 02:19:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2kaJ7oRUUbPJKxpLp3DejzWE4rpam+11drTaIR82xAk=; b=DhacvkVnzhC2rU1LtE51KJZ4MyQKyxiCo6c581qOmIYapK0nRct1oeGN3v1nqx3/4X +kezvSd1s28FiamERy8JZPiYqOZs62OSh5KooqjGkYeSRpvBrUqRTbm+S7Xj9J0tKs4+ p6kskhAjwU66TNK/Gj10NvAf/8xGJ/gu8v7IsXvKkPhcg/vWITSyAUsaRYHUt75xx9oK JrThj/pLB9nGI3qa1Mjcc5qrH8H1yf00HmZxqtLZq4y4l9Inl0sCzzspqBN7uUgXkDIT euMK5e9PHX+LBTz1YDwzLniBJlnhjbHn+PEzn+HyfgzR20KdNH+ATK35mUTSbGam+qtK Sfew== X-Gm-Message-State: AOAM530OhdkKw/ISdX7kg/qLSGVieVSyEuRCd+2rDUyOrh4AxhYX2dGZ /nPrgQvriflF0ibH3nwb6XzQj3MxgMgu6xSNXfXGVawYtSt1vEkRcFgUar0s/vgYui9q/xOFnET 2R08iQ2UMDBJBhdFV/5KyN3k= X-Received: by 2002:ab0:6cf2:: with SMTP id l18mr1859876uai.86.1623403157571; Fri, 11 Jun 2021 02:19:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz88rylm0o9sFcs3P1JfDnh0jMnecQRBSY2dQWTZ1ckH1xPTL3fyQLBS+wyu0ln9fz3m4GlyRFIQSc/451xVxY= X-Received: by 2002:ab0:6cf2:: with SMTP id l18mr1859869uai.86.1623403157420; Fri, 11 Jun 2021 02:19:17 -0700 (PDT) MIME-Version: 1.0 References: <20210610120922.24128-1-david.marchand@redhat.com> <91147e98-1492-a0b6-8a26-863545e62ca1@redhat.com> In-Reply-To: <91147e98-1492-a0b6-8a26-863545e62ca1@redhat.com> From: David Marchand Date: Fri, 11 Jun 2021 11:19:06 +0200 Message-ID: To: David Marchand Cc: dev , Maxime Coquelin , dpdk stable , Anatoly Burakov , Stephen Hemminger , Maxime Coquelin Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH] malloc: fix size annotation for NUMA-aware realloc 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" On Thu, Jun 10, 2021 at 2:19 PM Maxime Coquelin wrote: > > __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") > > Cc: stable@dpdk.org > > > > Signed-off-by: David Marchand > Tested-by: Maxime Coquelin Applied. -- David Marchand