From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0080.outbound.protection.outlook.com [104.47.41.80]) by dpdk.org (Postfix) with ESMTP id 9FFDC1D90 for ; Sun, 3 Dec 2017 13:13:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kEio1V58Tj7gBw7B/37GgsjM4BmSfldrNHm+KoH7muA=; b=dyoIq00ihKzpUmVH2GecUtqI7Q7cr3miHZyQAygbZmFOVDGfAktWlajJYphvF6+FJs+bIih+/7vm7pD15xwd2jMqFCAdhBQxIAt/8BHtn21zY/y4fxv7GBOfHnTfqoc9Q0d7MF41rFf8GHqE4kPuXInN/T5K6wy+OCHaPLeEJFM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (171.61.94.184) by SN2PR07MB2528.namprd07.prod.outlook.com (2603:10b6:804:7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Sun, 3 Dec 2017 12:13:39 +0000 Date: Sun, 3 Dec 2017 17:43:21 +0530 From: Jerin Jacob To: Jia He Cc: dev@dpdk.org, bruce.richardson@intel.com, konstantin.ananyev@intel.com, olivier.matz@6wind.com, jianbo.liu@arm.com, hemant.agrawal@nxp.com, Jia He Message-ID: <20171203121320.GA12755@jerin> References: <1510291392-33251-1-git-send-email-hejianet@gmail.com> <1511748024-7245-1-git-send-email-hejianet@gmail.com> <1511748024-7245-3-git-send-email-hejianet@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1511748024-7245-3-git-send-email-hejianet@gmail.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [171.61.94.184] X-ClientProxiedBy: PN1PR01CA0094.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::34) To SN2PR07MB2528.namprd07.prod.outlook.com (2603:10b6:804:7::6) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9706d21d-296b-4848-df9e-08d53a474b33 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603286); SRVR:SN2PR07MB2528; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 3:Tt3J2lqTLs6c6gEuE8d3n86N547qTJ7GTgsOQkq5kqeZhSRs7vVAYz579SQF2MN4x2uXuWeAO86PExw1grKcq2LBAdqGajFahUt6PED0ncFTjA/Q36AJHgjMIOwJNcFC8yG1yF9KU5yuBnPJUIvDIxF27Uxa9Su/LCVYv36taKHcWs5Fj0rZH6d1bV13GqZ5BWG7QyNNbGwBjejIGvAy/LWNUAsN1e9Ma/4xxW0YIbK7XQ/acbdIC8beVDodDHxn; 25:G9trnIGitWN9mQ0DBGlo2tNlh/I7qHw+YSR5L/67R2o+hDtpkSkSq+pIrNaDDkpYb1fEs5UX6oDQh8rD4re91pefnPGPY5na2Bj5neiU1TURM/yoUt4/hl28W2l538iFKStx724vNb3MwjOO57xg9B3evfhH3V11VbqZpHcZ8BVJKqoS8JF1TUBCErwdYt007Ow3NJlkKgPmw/N0tgSdH5vo3VhZbBKPNlP2Krx0KdpF+SScmWg6/cpvVDFp3mQy2Li5i2IL4XORwrjZNS8h3il0pf7Vj3tAGotvMOYNuX9BPOsKj7nE7ZRJfJWzH+WZNBOM6peYsXX1D+zWOqXdpw==; 31:mZgFoe8sbCZYwZs39N3VR3l5YCdt8HHEzwbVh1wJZMRTADpDyuSyNrdFiE7ahWImP88A54YlA4kJoyBH9AMMobNJR1H0eyzDxHgPHNh/gANicaycHR9Fk8VWSwgrr2mjDOXraTNJgR9Iu6ByBkKhMTuOtXRL5/4dV8MgQHYUQ04j1yGUre/fAxH70ejO2ydUpufrZ8AkqN4TZ1bosd5V+fVaL+UJ/m0kVlxenN/4/Fg= X-MS-TrafficTypeDiagnostic: SN2PR07MB2528: X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 20:lAsSbrJT8ppOlz/lb6sW4QC0Ib3GffY1waepZdeRv5Jn2x3KAFaxLnt8jOV0toTDfwc9GDLB+Sik6djorIPHr64WU0MW079G6sgaefnoFZ3Dz+trKOXsy/4jd3clsYWhuPEFBW1Sht+h2RTez9pHqR2pITPKCHMBYfj6vtXLQIvgLT+nXLwwXEL0gZ+kxPSd8L+T7Nn5MCwZKwi3iLRwTkakSi+sJp1h0Fei57l0l6UogYFkNaIeT1ESRmMr/N2YwW5d+3Aki2UtzQtGopcgLXviUiU/uAZS2TTWg/OMN1L/t6QaMJolMjfqP/OKfobs9PqMsw76PoecEb1rBxO1+ERqhrh4++NHuFv/45fRsPMnlq3/0UQ5/tIereznlMJCs4onvii0OOBv/g/RANNBIAp9QDGhfbQc97Ts4r0AFn2yPXG95iPL4X+QphSKIqUI9Zo8NGL3WBPb5QcC3RuxAyW2NJ2CMoDUX28iAJ80l4spyfMVVItYN8TqLeVvT64V8r+UzfS8V1IeRWwUnxzExrZQit9WgCHkrQYiacGylTd5S+WzM6r78IyfQxtu7o8HqZkRoohDAwbILLQ+uaFsP71FOe1Ldl2KcSGkCUE8BHI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917)(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231022)(93006095)(6041248)(20161123558100)(20161123564025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011); SRVR:SN2PR07MB2528; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:SN2PR07MB2528; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 4:Q2vTf/WDTTjHGgWpsr/B2BqXNaCztAK95ZfrQFzfd5IjxTaJqtCvX5L18DCjtW8ugzOOdvtdJmmpLmkD5qky+JN7x0cZKXRWqKvqfrNtlvGKVAYkZ8YkCZbZehyKRVAQIo29vvfJ3wJSBRvjp2N5IFXuTWX/PjMB+VXDxveDxYRVTCTarjQrKscMDenKc0+Iff3P1XH+T0+9onzoIxAT0Uk0EScyqaYTBhuN6MLGkvZ5d39omrPpzKdZIAyZ5h92/toYP0Wr/Opa68m7kxZFlMqi8ddxl0x2g5Jy+w6PlZGa2+b4nV/e5sbhdhtSN3K0XQZkQv1pyIJ3kIRuXshW848mfdHZzJBHNfwdwBRyAg0PTN4ttpfsmjmWLigm2gKI X-Forefront-PRVS: 05102978A2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(366004)(13464003)(189002)(199003)(106356001)(6496006)(105586002)(16586007)(58126008)(6246003)(39060400002)(81156014)(81166006)(316002)(54356011)(1411001)(4326008)(8676002)(9686003)(83506002)(53936002)(101416001)(2906002)(8656006)(7736002)(6666003)(2950100002)(478600001)(6916009)(42882006)(76176011)(50466002)(52116002)(16526018)(97736004)(66066001)(305945005)(47776003)(33716001)(25786009)(6116002)(55016002)(33656002)(3846002)(229853002)(23726003)(8936002)(5660300001)(189998001)(72206003)(1076002)(68736007)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2528; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR07MB2528; 23:+ppyxtIPSV4mO0wXTWNmdY9B4w2hfjlY4WgzFWgN1?= =?us-ascii?Q?eArd7ZpQO2dXZ07U+SAvdT/iWiU4l4u6B6YBYHplVZsbwqmeAIPjE+7xJ0a9?= =?us-ascii?Q?lpX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NBQWmc=; 24:aDE9gapQ1YOdjACIzPElLJ/jM96vf8MXrXby9qYTG/jC3kXtsHUmmtWtTOelcT57i0eeqcJTYZIfNZZrYlMt9BTNpWKw6v7dZOMfIJ+orKM=; 7:bcLrjJMrjmNZPkNm4rd/cMhMgfijEnCMbT3HXxnPpsI91qZu1dtwj1sClpIDoBGhR4rETUDDGVAwgC104MNESfx2dpQY5phr/qVUHnzhAODttXtOZfKvmhlKd/DYm/HemlihD7ePSmeB6Xuyx+fPGCTOn4BV5nx7PWxFQzISg/I99U7NRhdrufaa5tXxy7qhmX/VhljDqCU/Nu/ln2CgRCTrFV4FY4BzlOkbj0bJnQNAIMknDkJqPJSH6TEchQB1 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2017 12:13:39.0010 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9706d21d-296b-4848-df9e-08d53a474b33 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2528 Subject: Re: [dpdk-dev] [PATCH V6 2/3] ring: introduce new header file to include common functions 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: Sun, 03 Dec 2017 12:13:45 -0000 -----Original Message----- > Date: Sun, 26 Nov 2017 18:00:23 -0800 > From: Jia He > To: jerin.jacob@caviumnetworks.com, dev@dpdk.org, > bruce.richardson@intel.com, konstantin.ananyev@intel.com > Cc: olivier.matz@6wind.com, jianbo.liu@arm.com, hemant.agrawal@nxp.com, Jia > He , Jia He > Subject: [PATCH V6 2/3] ring: introduce new header file to include common > functions > X-Mailer: git-send-email 2.7.4 > > move the common part of rte_ring.h into rte_ring_generic.h. > move the memory barrier part into update_tail(). > > no functional changes here. > > Signed-off-by: Jia He > Suggested-by: Jerin Jacob > Suggested-by: Ananyev, Konstantin Wrong tag: complaint from checkpatch. Suggested-by: Ananyev, Konstantin > --- > + */ > + > +#ifndef _RTE_RING_GENERIC_H_ > +#define _RTE_RING_GENERIC_H_ > + > +static __rte_always_inline void > +update_tail(struct rte_ring_headtail *ht, uint32_t old_val, uint32_t new_val, > + uint32_t single, uint32_t enqueue) > +{ How about making enqueue as const. ie. const uint32_t enqueue ? > + if (enqueue) > + rte_smp_wmb(); > + else > + rte_smp_rmb(); Other than that, it looks good to me. Acked-by: Jerin Jacob