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 6C7A11E33 for ; Mon, 22 Jan 2018 05:41:47 +0100 (CET) Received: by mail-pf0-f195.google.com with SMTP id e76so6192870pfk.1 for ; Sun, 21 Jan 2018 20:41:47 -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=NPkLdSoDJP64YG/rtT/0SRVhZHleHwztUnCS/wtUc8s=; b=O4qzqhSbfX66CycRrmJl/JK+L3k3qR5JZEOw9SuHLaGSqv4HABQB3ffZBC2Yps17Xj hCF57HUqe6XWuE212IxTlJVVWUu3XGZ/bnCUOkwkUV/bTYOsEMY5PthjeGIwXaT1+nJS t7P/rAIGgMJ+UCN2qexkEpkuD19kvlBsibiu/CSp9U//blG4Ri/vypsz9PzoZsCWmVnA RjZ6pwsD3yrCTzOrwRiu0VqiVvfHvTdvo+8yQjKUgGu+QuPY6GFo1149VhC+Pah2/K26 tfjR7kG46ToGZAPCrgE3tk2vNytMKUfrxfhIGOLxJ7Gtbw19QWJhFbvqXy3j5DZ7T6us qVug== 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=NPkLdSoDJP64YG/rtT/0SRVhZHleHwztUnCS/wtUc8s=; b=HbyJFnp2K/M4nZ9t3s/KlzxhB4vgKyZSbpHj03uftFyMxeUfOYXM4WMU/w6wJV4C4j w6dArRZBbnIpsnMS7uwPviERvsZNgnKbJTvB99Xt8u5GUVCfDDMZ9tJU5L8IzQOOKe+b cQsCadadQ7/oLFJHeFAsiHBR/c4rsN9QYuXzUPwN10c6I41J+5MbS4CBA311ME8/EHIe Xm+NrEQm1+msgs8kghBgGBUm0qDmwvqVd0Kv6AMZ8fdtt85S7Dg5MJ/NiIephR2A/Shq gDtwY7H4SpUQVQHBoG4umoSpzkBIFVa9Jtfpf0T8b9FiEwmAWVbkqbtTtzrLUjwouyPd S2JA== X-Gm-Message-State: AKwxytfCtjo8v9dq1v8aXgAGgbSM+g8/gAq+RHa1o/O6aWnd8p//S1Rf bXTo8xr1gw5Urje9AA8eWkanbQ== X-Google-Smtp-Source: AH8x227Dz2QA+KE1TgIC59qw2KRNWFa2guHgCqNXRcKnlWVZSEYL4/xdEDtxXxS3utlqyDkCSaWkxg== X-Received: by 10.99.163.96 with SMTP id v32mr6081571pgn.432.1516596106462; Sun, 21 Jan 2018 20:41:46 -0800 (PST) Received: from localhost.localdomain ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id m24sm29347372pfj.184.2018.01.21.20.41.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 21 Jan 2018 20:41:45 -0800 (PST) From: Jia He To: dev@dpdk.org, Thomas Monjalon , Hemant Agrawal Cc: Jerin Jacob , Jianbo Liu , Jan Viktorin , Olivier Matz , konstantin.ananyev@intel.com, bruce.richardson@intel.com, Jia He Date: Sun, 21 Jan 2018 20:41:25 -0800 Message-Id: <1516596088-10364-1-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516161831-28719-1-git-send-email-hejianet@gmail.com> References: <1516161831-28719-1-git-send-email-hejianet@gmail.com> Subject: [dpdk-dev] [PATCH v9 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: Mon, 22 Jan 2018 04:41:47 -0000 There are 2 model barrier options in librte_ring suggested by Jerin: 1. use rte_smp_rmb 2. use load_acquire/store_release CONFIG_RTE_RING_USE_C11_MEM_MODEL is provided for supporting C11 memory model barrier in librte_ring. By default it is "y" on arm64, "n" on any other architectures so far. 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: V9: remove the SPDX tag and refine commit logs V8: Change the license to SPDX tag. Change USE_C11_MEM_MODEL to "n" on any architectures by default V7: fix check-git-log warnings which is suggested by Jerin 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() 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 + config/common_base | 5 + .../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 | 218 ++++++++++++++++++++ lib/librte_ring/rte_ring_generic.h | 228 +++++++++++++++++++++ 8 files changed, 476 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