From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.hxt-semitech.com (unknown [223.203.96.7]) by dpdk.org (Postfix) with ESMTP id E09E21B600 for ; Fri, 13 Oct 2017 04:13:03 +0200 (CEST) X-ASG-Debug-ID: 1507860778-093b7e611d9fe10001-TfluYd Received: from HXTBJIDCEMVIW02.hxtcorp.net (localhost [10.128.0.15]) by barracuda.hxt-semitech.com with ESMTP id BPgVCEeAW7BNm4iN (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Oct 2017 10:12:58 +0800 (CST) X-Barracuda-Envelope-From: bing.zhao@hxt-semitech.com Received: from HXTBJIDCEMVIW02.hxtcorp.net (10.128.0.15) by HXTBJIDCEMVIW02.hxtcorp.net (10.128.0.15) with Microsoft SMTP Server (TLS) id 15.0.847.32; Fri, 13 Oct 2017 10:12:58 +0800 Received: from HXTBJIDCEMVIW02.hxtcorp.net ([fe80::3e:f4ff:7927:a6f6]) by HXTBJIDCEMVIW02.hxtcorp.net ([fe80::3e:f4ff:7927:a6f6%12]) with mapi id 15.00.0847.030; Fri, 13 Oct 2017 10:12:58 +0800 From: "Zhao, Bing" To: "Liu, Jie2" , "Ananyev, Konstantin" , Olivier MATZ , "dev@dpdk.org" , "jerin.jacob@caviumnetworks.com" CC: "He, Jia" , Jia He Thread-Topic: [PATCH] ring: guarantee ordering of cons/prod loading when doing enqueue/dequeue X-ASG-Orig-Subj: RE: [PATCH] ring: guarantee ordering of cons/prod loading when doing enqueue/dequeue Thread-Index: AQHTQ3xkDVu3WD3bxEeZGT9drjcRQ6LgZkAAgACiw+A= Date: Fri, 13 Oct 2017 02:12:58 +0000 Message-ID: <97c71aa26b854b11860e1932a5b1b584@HXTBJIDCEMVIW02.hxtcorp.net> References: <20171010095636.4507-1-hejianet@gmail.com> <20171012155350.j34ddtivxzd27pag@platinum> <2601191342CEEE43887BDE71AB9772585FAA859F@IRSMSX103.ger.corp.intel.com> <3dc359ce73394a5293c77109f8b1d717@HXTBJIDCEMVIW01.hxtcorp.net> In-Reply-To: <3dc359ce73394a5293c77109f8b1d717@HXTBJIDCEMVIW01.hxtcorp.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.65.20.220] Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Barracuda-Connect: localhost[10.128.0.15] X-Barracuda-Start-Time: 1507860778 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://192.168.50.101:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at hxt-semitech.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.5000 1.0000 0.7500 X-Barracuda-Spam-Score: 0.76 X-Barracuda-Spam-Status: No, SCORE=0.76 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_SC0_SA_TO_FROM_DOMAIN_MATCH X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.43850 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.01 BSF_SC0_SA_TO_FROM_DOMAIN_MATCH Sender Domain Matches Recipient Domain X-Mailman-Approved-At: Mon, 16 Oct 2017 12:33:49 +0200 Subject: Re: [dpdk-dev] [PATCH] ring: guarantee ordering of cons/prod loading when doing enqueue/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, 13 Oct 2017 02:13:04 -0000 SGkgR3V5cywNCklmIG5lZWRlZCwgd2UgY2FuIHByb3ZpZGUgYSBzaW1wbGlmaWVkIFVUIHRlc3Qg Y2FzZSBhbmQgcmluZyBwYXRjaCB0byByZXByb2R1Y2UgdGhpcy4gQW5kIHRoZW4gd2UgY2FuIGNh dGNoIHRoZSBpbmZ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