From: Stephen Hemminger <stephen@networkplumber.org>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: Thomas Monjalon <thomas@monjalon.net>,
dev@dpdk.org, Chao Zhu <chaozhu@linux.vnet.ibm.com>,
konstantin.ananyev@intel.com
Subject: Re: [PATCH v8 01/15] eal: introduce atomic exchange operation
Date: Fri, 26 Jan 2018 13:54:23 -0800 [thread overview]
Message-ID: <20180126135423.29394092@xeon-e3> (raw)
In-Reply-To: <20180126172440.GA17280@bricha3-MOBL3.ger.corp.intel.com>
On Fri, 26 Jan 2018 17:24:40 +0000
Bruce Richardson <bruce.richardson@intel.com> wrote:
> On Fri, Jan 26, 2018 at 06:14:01PM +0100, Thomas Monjalon wrote:
> > 26/01/2018 03:01, Stephen Hemminger:
> > > To handle atomic update of link status (64 bit), every driver was
> > > doing its own version using cmpset. Atomic exchange is a useful
> > > primitive in its own right; therefore make it a EAL routine.
> > >
> > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> ---
> > > .../common/include/arch/ppc_64/rte_atomic.h | 21 +++++-
> > > .../common/include/arch/x86/rte_atomic.h | 24 +++++++
> > > .../common/include/arch/x86/rte_atomic_32.h | 12 ++++
> > > .../common/include/arch/x86/rte_atomic_64.h | 12 ++++
> > > lib/librte_eal/common/include/generic/rte_atomic.h | 78
> > > ++++++++++++++++++++++ 5 files changed, 146 insertions(+), 1
> > > deletion(-)
> >
> > Looks good, thanks.
> >
> > It probably deserves a review by PPC experts. Adding Chao, maintainer
> > of this part. + Bruce and Konstantin for x86 part.
> >
> Would it not be simpler to use __sync_bool_compare_and_swap compiler
> built-in on all supported platforms? Do we really need the per-platform
> optimization of this?
>
> /Bruce
Exchange is different than compare and swap. The is nice atomic intrinsic
in GCC. The x86 part is in Linux and BSD already.
next prev parent reply other threads:[~2018-01-26 21:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 2:01 [PATCH v8 00/15] common linkstatus functions Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 01/15] eal: introduce atomic exchange operation Stephen Hemminger
2018-01-26 17:14 ` Thomas Monjalon
2018-01-26 17:24 ` Bruce Richardson
2018-01-26 21:54 ` Stephen Hemminger [this message]
2018-01-29 9:51 ` Bruce Richardson
2018-01-26 17:59 ` Ananyev, Konstantin
2018-01-26 2:01 ` [PATCH v8 02/15] ethdev: add linkstatus get/set helper functions Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 03/15] net/virtio: use eth_linkstatus_set Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 04/15] net/vmxnet3: use rte_eth_linkstatus_set Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 05/15] net/dpaa2: " Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 06/15] net/nfp: use rte_eth_linkstatus functions Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 07/15] net/e1000: use rte_eth_linkstatus helpers Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 08/15] net/ixgbe: use rte_eth_linkstatus functions Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 09/15] net/sfc: use new " Stephen Hemminger
2018-01-26 6:31 ` Andrew Rybchenko
2018-01-26 2:01 ` [PATCH v8 10/15] net/i40e: use " Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 11/15] net/liquidio: use rte_eth_linkstatus_set Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 12/15] net/thunderx: " Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 13/15] net/szedata: use _rte_eth_linkstatus_set Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 14/15] net/octeontx: use rte_eth_linkstatus_set Stephen Hemminger
2018-01-26 2:01 ` [PATCH v8 15/15] net/enic: " Stephen Hemminger
2018-03-15 17:38 ` [PATCH v8 00/15] common linkstatus functions Ferruh Yigit
2018-03-16 10:31 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180126135423.29394092@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=bruce.richardson@intel.com \
--cc=chaozhu@linux.vnet.ibm.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.