From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by dpdk.org (Postfix) with ESMTP id 359611B236 for ; Fri, 10 Nov 2017 04:31:05 +0100 (CET) Received: by mail-pg0-f67.google.com with SMTP id s11so963543pgc.5 for ; Thu, 09 Nov 2017 19:31:04 -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=lj8gHLIfOdjgO9ojVUbj7cVRwHVAowQhJXqeO59kF20=; b=dlLiq3is93F3HFdllDYZVuL2v5oysH4xogmbY9/h8VuqJSmmkEKyassgRt8W8Erg53 CKeSRa1IWjvso9KLhh/NZ88yn94EXKL9ul6are+A/b5LxlMCwQs5w/Q0R/SWKXgQdgob zNS1yC9e7N2ZipRg65+0f4OuAja2uWbWWCplwW0p4JeV5bq/6e5U8Dik+gTkeunhiP09 x45811JgjTIYwu/TkA+pC7JyTN1GmnfVeFcDOEX/iN3Izkfn43A1gYANK8HBJdMGKKfp zAroIiMQ5HDqDwaexKtAvUZZ7jOgWlq4/LW0s1zfU+ua83FzWn1XusgNrTdydFpXYFrw qQ3g== 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=lj8gHLIfOdjgO9ojVUbj7cVRwHVAowQhJXqeO59kF20=; b=FEDJKCkQTATHokHqPx3MYmuh8eLuKtfoIbtXatHmpG4z1kqi5fpZwfx7V0/X9jcVWH HdofrHCIBuxtZ14jhq91iwD8I+SXPxJSqWPD+M5S7lm95LXMWKOxKV1VsMyXaOamgVU+ td1GNkhIYadsw7khE0cYKHK808C/8f9VFYV3JpwkDnpXeFUed5r0KwU+iYmvd00oRexi APvxcuIYak7LTEUh7n7q1G24peNnYphecrsYJy8AbpAwUsAErVRy/P461M0sMwAmCsS6 jyCbbjsFTXO7+1JoV9hfN7d8pmh11RtEpg0piqLJmfpubb1twSKQgLykbUWJQpjnALdY 7YkA== X-Gm-Message-State: AJaThX4/twr2+FRLeNL5E56Xe5Sd2flkfry20acFAJQoEMWib+C1XbJS CcBYh01+xQWwdj7vDckEpW0= X-Google-Smtp-Source: ABhQp+QyFnj8nQYr3XtV7gxlqdDarLLwq5GPsJZ1wgR/qoDUTYdcD99yJ+Tg2kOu+IPppWAacNSUaw== X-Received: by 10.84.254.79 with SMTP id a15mr2659254pln.413.1510284664248; Thu, 09 Nov 2017 19:31:04 -0800 (PST) Received: from nfv-demo01.hxtcorp.net ([38.106.11.25]) by smtp.gmail.com with ESMTPSA id g24sm15992608pfk.0.2017.11.09.19.30.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Nov 2017 19:31:03 -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 03:30:41 +0000 Message-Id: <1510284642-7442-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 v6] guarantee load/load order in enqueue and dequeue 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 03:31:05 -0000 From: Jia He We watched a rte panic of mbuf_autotest in our qualcomm arm64 server (Amberwing) due to a possible race condition. To fix this race condition, rmb() is needed to add between the 2 loads. Already fuctionally tested on the machines as follows: - on X86 - on arm64 --- Changelog V6: improve the text description and fix the checkpatch warnings V5: split it into 2 patchset due to the milestone concerns, this is the 1st one 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 (1): ring: guarantee load/load order in enqueue and dequeue lib/librte_ring/rte_ring.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.7.4