From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <hejianet@gmail.com>
Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65])
 by dpdk.org (Postfix) with ESMTP id 723A7237
 for <dev@dpdk.org>; Mon, 27 Nov 2017 03:00:50 +0100 (CET)
Received: by mail-pg0-f65.google.com with SMTP id 207so17992084pgc.12
 for <dev@dpdk.org>; Sun, 26 Nov 2017 18:00:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:date:message-id:in-reply-to:references;
 bh=FVh9tZskiXnaalF+Laq7Dq1EctuTocgrX2umpDSTKgg=;
 b=JYQAbYPvz69qrjZiRcCvv1YG5JLXk/Bi5deJ7ShNLhPsTM0R1hH6mtq0NrKeKarCBe
 IBQnARrUF40M6fnrYI4LlZepnYedA66BdxVDIHotyn5QHZG2qt+2JkM3b+//1Z+KakzM
 7buzAyF5raf550c/iVG7xVEtIvMasHQk85vqpDeClkzWz6nhCNh3mMDKSP1TOHd4+ro3
 18nlPuk4Kqa4qRAA6L0eq8iEwdvbB7E5sRcT+yy8KOALSYm4ZJbP6J0VWwUPMLh8/oTI
 fJ9Ivmv1VMT2/NVoCW+1mTXXJgebqFPK3nt+VJ4u7/fCGCoHDeM7dqmymbGGllFemXsn
 JwCw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references;
 bh=FVh9tZskiXnaalF+Laq7Dq1EctuTocgrX2umpDSTKgg=;
 b=LAKOG9Uahe68yzzKsB96FZyg09UDnHyoFUuph4xJw+g3cJ1NWG0JdF5qbmrOYgibpy
 lbsSoRZAVUJK0LPbqVqSZnAoxLJazyEc+hKAkZsYyiqKFjuNKnGwoQFYu0fk7elElVvP
 KDrazi+7My/rbznNOa6V4QWxinlAM3jLVCkYxRe8qOpEe43qFZ2f1+m+tky2ZlVUDP+j
 XTw5kIo4EuEs6NwWfKGZL8KUl+FB7CFBSysWBDjHf1YWx2iWE0cMPsPWy6jUPIalNvu/
 gRuiBqTLbet62sCuRsqwM/uhaCAM+BswqSW0Qzq7kU/1VHelTCZkDCMM+vtzBGfLETTP
 ilXQ==
X-Gm-Message-State: AJaThX450esYCRWS5JD3ay8Yp6hoIH7/9N8OMB4MDgkWrN9Hk8uFGXW8
 la8Ax8b8RgtPhBxSLG/SxiY=
X-Google-Smtp-Source: AGs4zMY2t/PahdnNd97oqdBpPSGlOfd3P4h1FedOrFlt4g+Z/tMG+o2x6gomx4PTlyPDfc55+kMvmw==
X-Received: by 10.101.67.75 with SMTP id k11mr28303155pgq.20.1511748049612;
 Sun, 26 Nov 2017 18:00:49 -0800 (PST)
Received: from localhost.localdomain ([38.106.11.25])
 by smtp.gmail.com with ESMTPSA id a87sm48926743pfg.159.2017.11.26.18.00.43
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Sun, 26 Nov 2017 18:00:48 -0800 (PST)
From: Jia He <hejianet@gmail.com>
To: jerin.jacob@caviumnetworks.com, dev@dpdk.org, bruce.richardson@intel.com,
 konstantin.ananyev@intel.com
Cc: olivier.matz@6wind.com, jianbo.liu@arm.com, hemant.agrawal@nxp.com,
 Jia He <hejianet@gmail.com>
Date: Sun, 26 Nov 2017 18:00:21 -0800
Message-Id: <1511748024-7245-1-git-send-email-hejianet@gmail.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1510291392-33251-1-git-send-email-hejianet@gmail.com>
References: <1510291392-33251-1-git-send-email-hejianet@gmail.com>
Subject: [dpdk-dev] [PATCH V6 0/3] support c11 memory model barrier in
	librte_ring
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 27 Nov 2017 02:00:50 -0000

To support C11 memory model barrier, 2 options are suggested by Jerin:
1. use rte_smp_rmb
2. use load_acquire/store_release
CONFIG_RTE_RING_USE_C11_MEM_MODEL is provided, and by default it is "y"
only on arm64 so far.

The reason why providing 2 options is due to the performance benchmark
difference in different arm machines.

Already fuctionally tested on the machines as follows:
- on X86
- on arm64 with CONFIG_RTE_RING_USE_C11_MEM_MODEL=y
- on arm64 with CONFIG_RTE_RING_USE_C11_MEM_MODEL=n

---
Changelog:
V6: minor change in subject and log
V5: split it into 2 patchset due to the milestone concerns, this is the 2st 
    one. Also fix checkpatch.pl warnings
V4: split into small patches
V3: arch specific implementation for enqueue/dequeue barrier
V2: let users choose whether using load_acquire/store_release
V1: rte_smp_rmb() between 2 loads

Jia He (3):
  eal/arm64: remove the braces {} for dmb(),dsb()
  ring: introduce new header file to include common functions
  ring: introduce new header file to support C11 memory model

 config/common_armv8a_linuxapp                      |   2 +
 .../common/include/arch/arm/rte_atomic_64.h        |   4 +-
 lib/librte_eventdev/rte_event_ring.h               |   6 +-
 lib/librte_ring/Makefile                           |   4 +-
 lib/librte_ring/rte_ring.h                         | 173 ++----------------
 lib/librte_ring/rte_ring_generic.h                 | 195 +++++++++++++++++++++
 6 files changed, 220 insertions(+), 164 deletions(-)
 create mode 100644 lib/librte_ring/rte_ring_generic.h

-- 
2.7.4