From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40061.outbound.protection.outlook.com [40.107.4.61]) by dpdk.org (Postfix) with ESMTP id 9EF3412001 for ; Tue, 16 Jan 2018 03:48:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/JsqRIZOZ5dQeDrMHpy9UJqZn3SkAxvdkJAsc8+Bh90=; b=Msxqw8dqBtEqrDXxFwUQE+w8N+ngVBKUAaFDku828GDmACns5z/aw48InlkE4ghff+hRjJHhjkpiIxp+4TcOS5OhQ2h2CgBxbzWLzV6KHnIkC7MFNnGJxTX31IVId2SWYyF2yR7NG9mB8gkHAlxLVPt4q87/d4mJAfyHRvdIQRs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jianbo.Liu@arm.com; Received: from arm.com (113.29.88.7) by HE1PR0801MB1356.eurprd08.prod.outlook.com (2603:10a6:3:3a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 02:48:28 +0000 Date: Tue, 16 Jan 2018 10:47:07 +0800 From: Jianbo Liu To: Yongseok Koh Cc: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com, jerin.jacob@caviumnetworks.com, dev@dpdk.org Message-ID: <20180116024706.GA14652@arm.com> References: <20171227042824.33373-1-yskoh@mellanox.com> <20180116011050.18866-1-yskoh@mellanox.com> <20180116011050.18866-2-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180116011050.18866-2-yskoh@mellanox.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [113.29.88.7] X-ClientProxiedBy: SG2PR06CA0114.apcprd06.prod.outlook.com (2603:1096:1:1d::16) To HE1PR0801MB1356.eurprd08.prod.outlook.com (2603:10a6:3:3a::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: cdbf6ea6-4a32-4f54-17e0-08d55c8ba07f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:HE1PR0801MB1356; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1356; 3:3FQ/6GN8V13ouot7zK6AykDg4Kq1SgtRlRpGXhQfpPWNk0uArZ+wrAgUONffXqZA7R8Q+qrG6bRZU2CtPuU5pl7ZabqYgcEFdyifsIfgyovje6U8PO9mBigW8mpGeneRgn7ZYNBaqwK+u5340YLfhpy4J5C2Yt2gyWedSCA//3j5KCau+iGAANmgVVvt+fe5chln8r0EVnvSZkqUrBjewobL1kxmzHBfnLr9TJ1cZQAUeZ9saZTIhsdzMu8ubENa; 25:0h6YF3Mx87Wpa+8SwcTVZFBWK6ZHwyuqgPmhgRX7lT9+0p21hJRNHtVv7uRXC9TjnTq5jI52OS7oM6fq01Y7J/gI8Rycx65D1HsRy9YqiM3Fwr+frB0Q9ovgyPaTlRRwILpWbF5RoP4MAsAMxW5rjg4LVOoj6zgEBJhZfY+1oUISRg/zaUnhSUfgejMp/C4MdlAG8Cup1TKTt4421C/tYidA732ilLRbkPPQAphnfqqsznL2HrYdhU1ksVLmyE6KuZyti9x6627VislfzaeFoN1WSOHbWnpsDeyZ7p4RQyeQMpMY+uwZS2Wh35uV876WgpKw5R9c8s4QWg/cIuoNAw==; 31:yCUENt99zKoAKHAzGS57Bt6IgZjq/H0tONvU6CgeNGzHOi/DYGATeaZiktEzDFXBvGSvA3zOg8MxhuagaUgfXXswtQ/J/mZ4mF9FDMho5XTw39NmdMThc5XOwIhOYMueN+pf8R3jAXSdqnQE83j3g6GnyLCq5sZco8qVdHay0bqDevEKqAZaBopnKYhxAOF3bVB729PoyfGHiWq4Xh38Kp0rkUXXvbChCYJRVlwspvQ= X-MS-TrafficTypeDiagnostic: HE1PR0801MB1356: Content-Transfer-Encoding: quoted-printable X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1356; 20:PVgxUYXgrqGLXa1m31qD6Scaqb03C8/Ug3ZEqxdPZ8tppoKJhByQqtynADFnk0mCrgxP8AR0/ECVs4mJHozWz2u4G2gLG1MzV2Vg2w16YXhPrNE2VU6hZ9k9mOnftdlgXaxeBKg7ZykExck6j3m7PcazEvwu18fanCJqxzhGGpHQoTdHIZzn3Jw/SU/5QonaRfqa1ruecu/3fGGqCIuhDHVDutqPAfvIuCplwLJrdNGD1QsfllTChzcCMmI68QZuAQLj9YNxAmZiSPLkFXoNS9mgrI72cNPGvm/bkrBfsxMaJJ8VSBNA1hF2Qv5bzon541GZl8AzajMkVN//1An6d/v7Ga3vqlhUuQtnIZtChrX6cIuBC2AyzqHNIcoh8m1vK38qcZPj2leBrKIXzV8eLBKjtKTy07yn7l1mExTKCkYctdexnv+YosMtdq1HO2bicjBMq0Qgknn/H0eeZNb9OPJvdilqbi0C5WxlGxIHbgiuB3DrHkYaoTrrEGAVihoq; 4:gF8wiK8tjxSjx2bIwSeiMh5d403zO1X4L6d4rojGuZylqWUr8K/hSIDmNZxkKWlpbg/GE42fAzeZ0zhX63NberPA+PLJKv6JNlF4StGZNu+OVM/sw8a0mycWLpd9gxe7FzONMLoHjSTIcibZL49+tLbG4yGrrzvVvGGw/C15mkJPoIN4r+Dn0m8ypkrygRRtsstrtKuj+6GvpI3+OZ6/fAtmSx05eT3Kl4OL5CVZ885YsoqzgiACnIsVa1gt9WdMUJv2gCBzbY0TFUUBzgc4JqmZzeCWOKA/fC3k3W3jwLvdGXgJN4D+X1sFdk5zE2Wq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231023)(944501161)(93006095)(93001095)(6055026)(6041268)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:HE1PR0801MB1356; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR0801MB1356; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(376002)(39860400002)(396003)(346002)(39380400002)(189003)(199004)(40434004)(24454002)(6116002)(81156014)(33656002)(8746002)(81166006)(8936002)(478600001)(1076002)(66066001)(47776003)(72206003)(3846002)(8676002)(2906002)(68736007)(305945005)(7736002)(105586002)(106356001)(5890100001)(21086003)(50466002)(76176011)(16526018)(23676004)(36756003)(7696005)(6246003)(2486003)(83506002)(55016002)(5660300001)(58126008)(229853002)(52146003)(59450400001)(316002)(86362001)(53936002)(25786009)(97736004)(6666003)(2950100002)(52116002)(6916009)(386003)(26005)(4326008)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0801MB1356; H:arm.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtIRTFQUjA4MDFNQjEzNTY7MjM6bGdkOGhYcktGNTJsdnJqU05ETEtCQ2ZE?= =?utf-8?B?emtvOHpjQWpmdUZhVGlHNWJKd21TMWJUYUJNeXh5KzAwQmlRNkRBYUlSSHdw?= =?utf-8?B?Y0N0ZWFxL3FYTnpTTC9BaGFvb2JpNXhqM0JmSmFSU2srZWVUL2h3aUdWNWNU?= =?utf-8?B?eHNuV2RGQ2dCWUM2OE02amVvRzBPVFB1blFwYzR4aEtCQk1keHRENk1yOXNM?= =?utf-8?B?c1MyVlVwZjNKS2lrREw4ZkNZTnZKeis4eDh5eVJSYjBaUkZYTXgyZ1o1d0dD?= =?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Ex4ZkW7KwTch4LU33rC7/6nu+DEYV0VwBN7ecnb44MQ3W7hZfsgE+zeJjkgsAAj+V5Vt97ZYDjmoQS5FTtgWWpseersaQrhMwPJY9enKpO86W6HRvdLJ8lt6kcY=; 5:lHFiYnnhUaDPy3PEDx7MVujeNMv7qhExvxwkb5J8DNysBkfzMyEzbe1SSIzj/cww4neCzQh0PQ9eK83wZDub7WgM7xiSNVLDzB43h5uqtBrESWvTOAbqdhaIwVsEmyVfMvyEpFreDBkLUiVbVFW9Gek7FEe0cFcaWGRZo2Sd//0=; 24:3XYk2Jl9TC92si/IzPoYh2X+YENBscpRJxcXpWSJmiKogFuWaXLJAUiQ7qpgXQM6jeh9OJYcoqkxJ/aTQBI2p9kIfSQjczKghmUQBUII4l8=; 7:xS28bVDKgY7KTaV4gPbziWeCI1SzP+O5VCwes8unzKHBsq7I6io5+pTDxde2xPwgGZDc/l4rI8UQQgcaF38yi5ALLnGYvVTSnHaG3KRiclpwiyp9YC9imdnvjLUhpI+taU60OpGiTACAI/FKevn0KTogqRZP5XcdpWmFSjBqdy/It4k35ByXE4khRGK7GpYPQDa5Cam/I51/B3YTHM+i8BnuekYVWio2h6h2iIZJR43ULMQkit6p/U/q2gKzoPfs SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 02:48:28.5060 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cdbf6ea6-4a32-4f54-17e0-08d55c8ba07f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1356 Subject: Re: [dpdk-dev] [PATCH v2 1/8] eal: introduce DMA memory barriers 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: Tue, 16 Jan 2018 02:48:33 -0000 The 01/15/2018 17:10, Yongseok Koh wrote: > This commit introduces rte_dma_wmb() and rte_dma_rmb(), in order to > guarantee the ordering of coherent shared memory between the CPU and a DM= A > capable device. > > Signed-off-by: Yongseok Koh Acked-by: Jianbo Liu > --- > lib/librte_eal/common/include/generic/rte_atomic.h | 18 ++++++++++++++++= ++ > 1 file changed, 18 insertions(+) > > diff --git a/lib/librte_eal/common/include/generic/rte_atomic.h b/lib/lib= rte_eal/common/include/generic/rte_atomic.h > index 16af5ca57..2e0503ce6 100644 > --- a/lib/librte_eal/common/include/generic/rte_atomic.h > +++ b/lib/librte_eal/common/include/generic/rte_atomic.h > @@ -98,6 +98,24 @@ static inline void rte_io_wmb(void); > */ > static inline void rte_io_rmb(void); > > +/** > + * Write memory barrier for coherent memory between lcore and IO device > + * > + * Guarantees that the STORE operations on coherent memory that > + * precede the rte_dma_wmb() call are visible to I/O device before the > + * STORE operations that follow it. > + */ > +static inline void rte_dma_wmb(void); > + > +/** > + * Read memory barrier for coherent memory between lcore and IO device > + * > + * Guarantees that the LOAD operations on coherent memory updated by > + * IO device that precede the rte_dma_rmb() call are visible to CPU > + * before the LOAD operations that follow it. > + */ > +static inline void rte_dma_rmb(void); > + > #endif /* __DOXYGEN__ */ > > /** > -- > 2.11.0 > -- IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.