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 C1616A0C47; Fri, 11 Jun 2021 11:19:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD00E410F9; Fri, 11 Jun 2021 11:19:20 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 9C5AA40FDF for ; Fri, 11 Jun 2021 11:19:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623403159; 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=aKaVRv4KKeCSR/qXe5DPe0K/7GmDz4ogf+nUnQI4KMe+orx16gP/dQSDg96ZLcKHv1MXOY GnF4/LM1OJBNDO9lBMZQwqGKoA9Kvm52ZBHruEktA6HG5o8ELAZ0ibt3HVGvgNXk6ne9gG fGySAowPd3zVR/5vWxC8DcHktaPInrI= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-566-qfgm7o2sPkmYJ2SCtXE_HA-1; Fri, 11 Jun 2021 05:19:18 -0400 X-MC-Unique: qfgm7o2sPkmYJ2SCtXE_HA-1 Received: by mail-ua1-f70.google.com with SMTP id 88-20020ab004e10000b02902684a557ba4so2238251uaw.21 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=ORQQ7CXvL5782Xbwg8kXK+tqWGQp2iBO0F3aiEO5wir0ds6AYwfPYB7HwO1WYTFpSh +iypsh+Zi7D8gB3dLelrqN+laRaDs7HVw8YECUITjE9KY2mY4PkTGsoQfeFj+NibuwNA MhBbafY65xx5DVYEZPVZl+kwxbHr+qQoFYv4J4S9F1N5Z6NIpZh7p3tb6S/egRbMBadV WMvPjh7wVZhbw0Zp14vdbOAPxmCuF7t4uSk/HXyS/6ZhhAqyF+hLIatySDPoXUx5fHOm qhR0WNZuRGzd/OLZssDoHLDkulhALHNDWh9ugOKyd412HC4Axy7rAWMJcKwBAAJS3m89 e/ug== X-Gm-Message-State: AOAM530izxSr/Ih1Oa1V2Qf2Yn9deXxFquyqe4Z4m2FgviNkKsFjPqIl F7EugFGE0v54W/f6M21S9j4HAn60WY+paTz9F8oFv5f5e7QcOj9rUc1dCihweuCOylTHSycyhla /SD5SXbLagQ4YgWVZ1bw= X-Received: by 2002:ab0:6cf2:: with SMTP id l18mr1859878uai.86.1623403157572; 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-dev] [PATCH] malloc: fix size annotation for NUMA-aware realloc 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 Sender: "dev" 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