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 47E1442B8C; Wed, 24 May 2023 14:40:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F5CF406BC; Wed, 24 May 2023 14:40:58 +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 281B04067E for ; Wed, 24 May 2023 14:40:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684932056; 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=ygn0dRWg3dbcXDaR6ouzkX5b6yqD0/S1V7uav6CQZrc=; b=K5pUikXBfjaLsDl3G4eohJL6dbdjOc5H3Ki77Ib5tOcdYvMbgpfprB+wlgrHGmMHwL/qAj jFcgQjiKTqD3uRZU1L1CeoVVZ2HVu26DUX6I2LWxu3x+y8jkgUGj17FhMITH/9JI24MVqd p+73Z9RDmJRFAcNlOzyWtktDw/hG6S8= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-622-taVe3NTgNxGPQK6D_ovz4w-1; Wed, 24 May 2023 08:40:55 -0400 X-MC-Unique: taVe3NTgNxGPQK6D_ovz4w-1 Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-1ae3b512991so2014405ad.0 for ; Wed, 24 May 2023 05:40:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684932054; x=1687524054; 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=ygn0dRWg3dbcXDaR6ouzkX5b6yqD0/S1V7uav6CQZrc=; b=OPoD449vyIMFe/gIUUx0vCR9/PTa1T2lgfCeFehq+aDeiFSIJ+cGL4pLBdTgKUC3oh +8W9FPysaUiXgx0ARhNRdF4ukceIOBMMsvnoFMviSGNHI5soCkdlFigmq66inNbc+yXr FBpSQudMzDolzKW/kzkLgMMXxttLopcinN9IxODIjmIoaS3FAIoS09qMDya56asPdbuq qy+mB4x0pZUPyNpQP9ZPopHApOadeJC03HrJ8kAJMYr0en56AXiM3kUixgIvC531N8FY 5PK9wpFEcD+jKi/7RFpNpTo4ZC2X6dt97lZ2NwAm8+l9O4gMF4yP/5vvmxyhopIu36Lq RNug== X-Gm-Message-State: AC+VfDxIwGrqYIhxH3tls+ydDr4/NBc5LveS9BhEgefM6qV7eRmHJPz7 B2R4g/BB1BsbTRv2iip4hjqWJdHkxc73S/JkTkbvSjzHSMeZzE9pEGZ6WELbEefJqcGk/qE+yQa +f5HEIq/hqQeTc8vEqS4= X-Received: by 2002:a17:902:ed11:b0:1ac:4163:317 with SMTP id b17-20020a170902ed1100b001ac41630317mr16414875pld.39.1684932054441; Wed, 24 May 2023 05:40:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4mMBcGbMSM5nsTiZ7vWw+fmvKP8DOUKkxz0POWiomHaj0pwddLQFkNtKoM5h0fb7szpWx1jFNnzobnaLeO7hM= X-Received: by 2002:a17:902:ed11:b0:1ac:4163:317 with SMTP id b17-20020a170902ed1100b001ac41630317mr16414862pld.39.1684932054192; Wed, 24 May 2023 05:40:54 -0700 (PDT) MIME-Version: 1.0 References: <1679084388-19267-1-git-send-email-roretzla@linux.microsoft.com> <1679612036-30773-1-git-send-email-roretzla@linux.microsoft.com> In-Reply-To: <1679612036-30773-1-git-send-email-roretzla@linux.microsoft.com> From: David Marchand Date: Wed, 24 May 2023 14:40:43 +0200 Message-ID: Subject: Re: [PATCH v3 0/7] replace rte atomics with GCC builtin atomics To: Tyler Retzlaff Cc: dev@dpdk.org, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, thomas@monjalon.net, stephen@networkplumber.org, mb@smartsharesystems.com, Ferruh Yigit 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 Hello Tyler, On Thu, Mar 23, 2023 at 11:54=E2=80=AFPM Tyler Retzlaff wrote: > > Replace the use of rte_atomic.h types and functions, instead use GCC > supplied C++11 memory model builtins. > > This series covers the libraries and drivers that are built on Windows. > > The code has be converted to use the __atomic builtins but there are > additional during conversion i notice that there may be some issues > that need to be addressed. > > I'll comment in the patches where my concerns are so the maintainers > may comment. > > v3: > * style, don't use c99 comments > > v2: > * comment code where optimizations may be possible now that memory > order can be specified. > * comment code where operations should potentially be atomic so that > maintainers can review. > * change a couple of variables labeled as counters to be unsigned. > > Tyler Retzlaff (7): > ring: replace rte atomics with GCC builtin atomics > stack: replace rte atomics with GCC builtin atomics > dma/idxd: replace rte atomics with GCC builtin atomics > net/ice: replace rte atomics with GCC builtin atomics > net/ixgbe: replace rte atomics with GCC builtin atomics > net/null: replace rte atomics with GCC builtin atomics > net/ring: replace rte atomics with GCC builtin atomics > > drivers/dma/idxd/idxd_internal.h | 3 +-- > drivers/dma/idxd/idxd_pci.c | 8 +++++--- > drivers/net/ice/ice_dcf.c | 1 - > drivers/net/ice/ice_dcf_ethdev.c | 1 - > drivers/net/ice/ice_ethdev.c | 12 ++++++++---- > drivers/net/ixgbe/ixgbe_bypass.c | 1 - > drivers/net/ixgbe/ixgbe_ethdev.c | 18 ++++++++++++------ > drivers/net/ixgbe/ixgbe_ethdev.h | 3 ++- > drivers/net/ixgbe/ixgbe_flow.c | 1 - > drivers/net/ixgbe/ixgbe_rxtx.c | 1 - > drivers/net/null/rte_eth_null.c | 28 ++++++++++++++++++---------- > drivers/net/ring/rte_eth_ring.c | 26 ++++++++++++++++---------- > lib/ring/rte_ring_core.h | 1 - > lib/ring/rte_ring_generic_pvt.h | 12 ++++++++---- > lib/stack/rte_stack_lf_generic.h | 16 +++++++++------- > 15 files changed, 79 insertions(+), 53 deletions(-) > There is still some code using the DPDK "legacy" atomic API, but I guess this will be converted later. As you proposed, I dropped patch 1 on the ring library (waiting for ARM to provide an alternative) and applied this series, thanks. Note: Thomas, Ferruh, we will have to be careful when merging subtrees to make sure we are not reintroducing those again (like for example net/ice). --=20 David Marchand