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 B141D45AAF; Fri, 4 Oct 2024 16:29:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E67E410FC; Fri, 4 Oct 2024 16:29:08 +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 23DBE40E34 for ; Fri, 4 Oct 2024 16:29:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728052145; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w6Q5GdZpDtMxxsWhnipqJKlGJK7Ix1NChAaM/3VyhiY=; b=MnZi4cPrnkWAeRk8cBCzIk5sbPz4YKxCdWMqSrSRnMxopDgMjvh+vamfAfalRT5F9IeL4E wvKQQejImfNvq9FkBLc0wcC7pulQFqnlEV3ROPi6xY2MkJ7yoYh+J1lTXIDVXSnXjvIxmY R3Ky3bD3AkOvyHvXarqkcyfV7ImocxE= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-670-1XIcfzRkNL-DWDHoW2bWTg-1; Fri, 04 Oct 2024 10:29:04 -0400 X-MC-Unique: 1XIcfzRkNL-DWDHoW2bWTg-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-53997e2fe14so2130595e87.2 for ; Fri, 04 Oct 2024 07:29:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728052143; x=1728656943; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w6Q5GdZpDtMxxsWhnipqJKlGJK7Ix1NChAaM/3VyhiY=; b=BBrmBuAo21lRoI0jeUOdeu47uGkYMWMHPGqe4fqkiSyVKMd0m8e/HJbygK1RMQ6r// yMln9FTzoYgLPsuIoDOE6m8vIW0OWlAU21QMUr8tcQGE16pU9kwJ+fB0nOnz/7fpFjKk xzWbMFPYEaMnMkbY6HUCv4Wf2WG+xHaf4+mG+v82ry1iB06silXE3q8Wspj0HbaGtuMR fKRXbCRtBobdGaFZGEuUEW8CUW/S73nbJ2QtkyLuXmBpm+7gFWdjOp5vhOjFxXbhUFFZ 4aV8bJlCMWj1bUiFGZXxwV763FEGsXBgqcrIqdZWlfq+cEhLNi2ojtSc/VOMgTasoNKY GseA== X-Gm-Message-State: AOJu0Yxq3CUWrq6SAVMQr+lQ3L28OgD6ouv8+ed8duEn6Mhpw9KPxB9s 4X67tdDpnKrRxPYBoB9e9+kqIkt3QMPmAB7g/Vz5jO7S9mgGGvI45Ehiv/8dlvsAmq0NkdwxouP eS0iJ5NYDD6+YJ9AOBC2y/y1LjnKRGgGGIqnu4KhXVw7kU45qvVH6NrwPT9LlVhy6iVGx6aASaW nskszvDIdTkEwYDHjo2lAUS7nvew== X-Received: by 2002:a05:6512:1326:b0:538:9e24:a3c9 with SMTP id 2adb3069b0e04-539ab876ed9mr1677337e87.20.1728052142842; Fri, 04 Oct 2024 07:29:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkWXJSeWyFhCqfbL011qAX88Vbg92iDs96fGxRRfnnWTogiivytHnuqATIFZ0I/Ht7XFKfwGk0ylDb8YxAJmc= X-Received: by 2002:a05:6512:1326:b0:538:9e24:a3c9 with SMTP id 2adb3069b0e04-539ab876ed9mr1677324e87.20.1728052142384; Fri, 04 Oct 2024 07:29:02 -0700 (PDT) MIME-Version: 1.0 References: <20240927204742.546164-1-stephen@networkplumber.org> <20241002183918.161656-1-stephen@networkplumber.org> In-Reply-To: <20241002183918.161656-1-stephen@networkplumber.org> From: David Marchand Date: Fri, 4 Oct 2024 16:28:51 +0200 Message-ID: Subject: Re: [PATCH v7 00/16] Fix allocation bugs and prevent future ones To: Stephen Hemminger Cc: dev@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 On Wed, Oct 2, 2024 at 8:39=E2=80=AFPM Stephen Hemminger wrote: > > Recent versions of GCC have some additional function attributes that can > help with DPDK performance and stability. > > The alloc_align attribute tells the compiler what the alignment > of the allocation will be, and the optimizer can use this to produce > better code (especially memcpy and structure copies). > > The malloc attribute tells compiler that object is not overlapping > and potentially aliasing. It also as an additional variant in GCC 11 > or later that allows for detecting all sorts of common errors like > calling free() on memory allocated with rte_malloc(). > > In order to use the malloc attribute the free function prototype > needs to be moved before the allocator/create function prototype > so that the malloc attribute can refer to it. > > This uncovered at least 16 pre-existing bugs in DPDK, these > should go to stable. This patch set is structured with: > - fix any new warnings that were discovered > - add macros for enable the macros > - enable the attributes It seems v7 lost the last patch that was introducing and using the annotations in rte_malloc. Was there an issue with this patch, or is it just a series submission issue= ? --=20 David Marchand