From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by dpdk.org (Postfix) with ESMTP id 5DA331B65E for ; Fri, 10 Nov 2017 06:23:30 +0100 (CET) Received: by mail-pf0-f195.google.com with SMTP id e64so5989125pfk.9 for ; Thu, 09 Nov 2017 21:23:30 -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=STU5/pCB0Li8VKIfDI6JIrB9Y82PvCXffXtUHqDDS6k=; b=uotxWSIhLLFLOKgActjZeDoT9Wgm3GKR5Sp+dpXNfHulH6M/CBdiwB61JcjWZzKUwR DljmUq06r2pNcztKv5WMSdjNjPH9/oZC6KNbNPFVGEwu2aix1ouRNnLyu/jbhdtq2to9 XFju44Kfbbopn3wj//9vQuhlBEXd+PG2IxfHr5CW/CHNmlq1+e7lP2g2um8GNlMCKud9 WzGaW++SWbQHpQt87r7hCDn8U8Qm+Tdy67Wy5/k2+dGfFFu7fE34JgBkRgxkvl8srPpf We0gsRn/PqQxTBK7uZOLXSgrg3w/igHmGYFysPmdI9PO3gcJbM5T5ebGHyRV7V33KVua HUAg== 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=STU5/pCB0Li8VKIfDI6JIrB9Y82PvCXffXtUHqDDS6k=; b=Ln6E2uMfTfJFZU5NZIZgNgUd/1loGyqEECsEuQMu7AJ28YJH83C4ZHATmrU2N+6UfY QXkecfMas5OWYXhVslmr+52uOhcPUjzXkc3luBJ7JrVL4mgdaagPO5Gy/HVKN4plia5F BYoTAbQgsfIveDwpR4jyzxkIju3dijpICBBWWx/PD7MPFqLl0Zfh9hm4NfFPlDn/MqJx WOLY5e5IpO1R2f7XtwJzZjPVIDp1T3B1DgzWFZ/a9OnvxV4a1NoIplGRR7aczixFcxC4 nEMJirfINiiA1+JQ95DV786jnqLE+M2YVLOcUsKa1AFM7+KOtn1kQEB5ELNJ+MFbYL9l Oprg== X-Gm-Message-State: AJaThX7Pe+xSzpNgnICCiGb2olRUBlSd2EdWtEEQJb0pN7+sgwhZccAs gRHxhRf4Em5eRuruVhWhZIxrTA== X-Google-Smtp-Source: ABhQp+RJHoiDltLs29x3kRRwsFKHV9+W9XUC0EkMSBN1TzN7TrQ7FoQtlaRhiqPNhDEGb6hBHDd9HQ== X-Received: by 10.99.38.129 with SMTP id m123mr2883465pgm.53.1510291409377; Thu, 09 Nov 2017 21:23:29 -0800 (PST) Received: from nfv-demo01.hxtcorp.net ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id y27sm16121568pfi.107.2017.11.09.21.23.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Nov 2017 21:23:28 -0800 (PST) From: Jia He To: jerin.jacob@caviumnetworks.com, dev@dpdk.org, olivier.matz@6wind.com Cc: konstantin.ananyev@intel.com, bruce.richardson@intel.com, jianbo.liu@arm.com, hemant.agrawal@nxp.com, Jia He Date: Fri, 10 Nov 2017 05:23:09 +0000 Message-Id: <1510291392-33251-1-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510278669-8489-1-git-send-email-hejianet@gmail.com> References: <1510278669-8489-1-git-send-email-hejianet@gmail.com> Subject: [dpdk-dev] [PATCH v5 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Nov 2017 05:23:30 -0000 From: Jia He 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: 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 *** BLURB HERE *** Jia He (3): eal/arm64: remove the braces {} for dmb() and 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_c11_mem.h | 186 ++++++++++++++++++++ lib/librte_ring/rte_ring_generic.h | 195 +++++++++++++++++++++ 7 files changed, 406 insertions(+), 164 deletions(-) create mode 100644 lib/librte_ring/rte_ring_c11_mem.h create mode 100644 lib/librte_ring/rte_ring_generic.h -- 2.7.4