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 3D21142C6F; Fri, 9 Jun 2023 17:02:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0755043010; Fri, 9 Jun 2023 17:02:12 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 2EB1F43010 for ; Fri, 9 Jun 2023 17:02:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686322930; 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=3WZL+EnxHsPXCnkzPUy2GvywmA/FRpmID3nhd3ccmOM=; b=O5YBxkTuOxd3d361MI7psnkFgSS/jVT8Fpasevgqwme2ZQZcDYD9+eP5u9fufSwUd00kLA I1DZEWjdPmXa/+WwNeTU+4jFK1S3hN8PsuDBI1JrwOSUMbkeIApzWjU4sa9P+yDof//o3A t9FNbgltu/znZXakLz/W6Ve7oQfDwgo= 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-219-x9Rc4crHPUaqd5XwpoN7MQ-1; Fri, 09 Jun 2023 11:02:09 -0400 X-MC-Unique: x9Rc4crHPUaqd5XwpoN7MQ-1 Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-1b0314f0aadso6210915ad.0 for ; Fri, 09 Jun 2023 08:02:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686322925; x=1688914925; 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=3WZL+EnxHsPXCnkzPUy2GvywmA/FRpmID3nhd3ccmOM=; b=UCzs8A+0H4UQ/MaX0y+ifpSXZDCoMHBRBMs5ReoS4oAaio+zh1i3iMlWkTLt3yE1SC wZ0YY3Z2am/wunNLcsytSi/h8//j3wXQ9TXSnN3/7kTpRjhDaBb0qCeQ7q1hrdfhjHK1 SkhBGInqC0TnDNy7jUzlVmz8/pqmKpqrPABWlioXibmuiRfak4u4bMMR+MZbzrDA1cO6 g0dXdOwKWrKbFvAG8uZ+Y/MEK55IaheelgOwOYCAGTJ/Wizr1rd++69j7TmYF9z3GUyT bn9/Vq+Un3JNPYF4BWqb3M4wkHZe+S/l4DrhGYMd8YWphxxw1HYP4L3mRcPbigudWwcX JLuA== X-Gm-Message-State: AC+VfDyiEPiQe3ueuLCw3e7RqT+P8+mrTGoyaHgL0vaLZ85YtClLLpq4 T9xBt8FKBIglsc2agI9xaDJfp5waKARu8e8j4SrRO4QC69aQjsZyKtBptg/NLScJAKGL72hxUyH MoldBh7pjUsUmEmZylPg= X-Received: by 2002:a17:902:ec8f:b0:1b0:3ab6:5133 with SMTP id x15-20020a170902ec8f00b001b03ab65133mr6746874plg.24.1686322924794; Fri, 09 Jun 2023 08:02:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ66QK4c9S4jA6SDekoKQ24FrpxZCVsz7CGfYJDUsN6muXMj4bq7FGYP8BBrQ6DZcgItmUuq+AeRr+SzmqBz49Y= X-Received: by 2002:a17:902:ec8f:b0:1b0:3ab6:5133 with SMTP id x15-20020a170902ec8f00b001b03ab65133mr6746841plg.24.1686322924365; Fri, 09 Jun 2023 08:02:04 -0700 (PDT) MIME-Version: 1.0 References: <1679084388-19267-1-git-send-email-roretzla@linux.microsoft.com> <1686087947-15471-1-git-send-email-roretzla@linux.microsoft.com> In-Reply-To: <1686087947-15471-1-git-send-email-roretzla@linux.microsoft.com> From: David Marchand Date: Fri, 9 Jun 2023 17:01:53 +0200 Message-ID: Subject: Re: [PATCH v5 0/6] replace rte atomics with GCC builtin atomics To: Tyler Retzlaff Cc: dev@dpdk.org, Olivier Matz , Bruce Richardson , Kevin Laatz , Qiming Yang , Qi Zhang , Wenjun Wu , Tetsuya Mukawa , Honnappa.Nagarahalli@arm.com, thomas@monjalon.net 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 Tue, Jun 6, 2023 at 11:45=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. > > v5: > * use relaxed ordering for counter increments in net/ring patch > * remove note comments from net/ring patch > > v4: > > * drop patch for lib/ring it will be provided by ARM / Honnappa > * rebase for changes in dma/idxd merge > * adapt __atomic_fetch_sub(...) - 1 =3D=3D 0 to be (__atomic_fetch_sub(= ...) =3D=3D 1) > as per feedback. > * drop one /* NOTE: review for potential ordering optimization */ since > the note reference non-critical to perf control path. > > note: > > Remainder of the NOTE comments have been retained since there > seems to be no consensus but stronger opinion/argument to keep > expressed. while I generally agree that changes should not > include ``TODO'' style comments I also agree that without these > comments in your face people are very unlikely to feel compelled > to make the review they are trying to solicit without them. if > it is absolute that the series won't be merged with them then I > will remove them, but please be explicit soon. > > 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 (6): > 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 | 11 ++++++----- > 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 | 20 ++++++++++---------- > lib/stack/rte_stack_lf_generic.h | 16 +++++++++------- > 13 files changed, 66 insertions(+), 50 deletions(-) I am not really enthousiastic about those NOTE:. I would prefer we get an explicit go/nogo from each maintainers, but this did not happen. I think that this indicates that those NOTE: will rot in the code now. Thomas proposed to track those NOTE: in the release announce mail and that we ping maintainers regularly. Let's see how it goes. I am merging this series so we can progress on the $SUBJECT. Series applied, thanks. Tyler, about the patch on the ring library that was dropped by got no viable alternative, I'll wait for a decision from ARM and you. --=20 David Marchand