From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0042.outbound.protection.outlook.com [104.47.41.42]) by dpdk.org (Postfix) with ESMTP id C16E61B41E for ; Sun, 8 Apr 2018 09:59:46 +0200 (CEST) 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=HWBYMDUiFVj5PZS9s3f66Sx97W1XjopVRmn6MS0HA3M=; b=CueZpfOLmLqUSjcj17vjnDfJmEgTazkGFH7q1qXhNBp8V42CIS+Q9X+kzlaFJjSjyQ9ziAd7lZIQSv8z8QTCWnXDpEFe354y/BZqJFZMSjNyQu2wf4xWTtswcbl0BkQiyASmHm3cxT1c/WZViwB4pHBnx5FPraWKQs8tTiwVGBU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (122.178.210.9) by BN3PR07MB2516.namprd07.prod.outlook.com (2a01:111:e400:7bbf::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.653.12; Sun, 8 Apr 2018 07:59:42 +0000 Date: Sun, 8 Apr 2018 13:29:23 +0530 From: Jerin Jacob To: Pavan Nikhilesh Cc: santosh.shukla@caviumnetworks.com, erik.g.carrillo@intel.com, dev@dpdk.org Message-ID: <20180408075922.GD6880@jerin> References: <20180216213700.3415-1-pbhagavatula@caviumnetworks.com> <20180403150514.24201-1-pbhagavatula@caviumnetworks.com> <20180403150514.24201-7-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180403150514.24201-7-pbhagavatula@caviumnetworks.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [122.178.210.9] X-ClientProxiedBy: MA1PR0101CA0021.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:21::31) To BN3PR07MB2516.namprd07.prod.outlook.com (2a01:111:e400:7bbf::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7dae56c4-535f-4130-4471-08d59d26b0ce X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:BN3PR07MB2516; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2516; 3:9JaS+Yj5e3GWoik/M1nEgMPcksiyfOy1bmdGxd9njMFn6wsl5ctm2LPXBV3dkdT70Iq+Ll16Ad/chIfTZX0TNLqw57AdrtMFtfJJGriDSqiebymuO8LL+iwU/DTM0ufnb2yPHG8z9I/PomzTTnB0xQZYm627oCcgFCqwlMVLYsHfVUm4O7/JgIIo0vkGpYX0pqFS1jc9iL7p8nHhDoPdLO2VopRurNF6VP6tfSFne/mFle3TIkir5jaHA9AkB/zl; 25:JihOd802JVmO07oJWjF6y0ggSDXevqEVWiWYMaVJ5H5tR4LYzp8FmYr/2WecfG3gjRG+3klDh936VAqbL1RLnrh2Jus20yn8l4qc1N731je4P9Z3iQ+ZMTjTmz51sttX4FL5VZAHWiKxAZrBmKiiB3hIYxRGdmwtnyOTnM7bYGQJn5wxlwhftS7jcGe2ZJvmaiAixlveY0IgXH2EPYDWkW9dq8YBHvQzl/Q29NTNiCY62PGL4e7iXmu66kxN3dhRymrBMed5rZX/Im+e9QR9DNRCUrGovEs2rjrW5RUt4GHP0Gevcux1IQhkCo+vYAxdEU8u0vmvGZxez60JzUT7Lg==; 31:lAEvPoDhL1scyn30t5QPSmNLhj5nQLvGVKh40NhZQ2Yg3f7mGPiHwjbcDs2fbQW2faOCvGArAxaCvylvfV+UR/G7JyVB586CH1QxNf9YNXTx0A6N+7nCyVMSDsL+15YR3aj5W4AwQ6ZYo8r+/lXemfxvbiSW4NxfKIkH9fLPO+DxRLI6ha+EdyNeXgQTX26mKkKq1XjA+wgCMi4z/K0RY623aRokPKnQbeixWInZ0hg= X-MS-TrafficTypeDiagnostic: BN3PR07MB2516: X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2516; 20:y6ZMfH5eGKW0174CR99C8btMaCaKn07cyCtqbZzqboUd0o11jLiLOW58s5AP4aPP4rqVFlbqbpFLfc3GRG1nxm2MVh3U1fjfMG+o/NOt4GyA63m7LLwAzWgr4UpzjbedsKzeIcyrgmD0+rYk1DaWHMwOzmDYYouYpk860st9NCWvpa4mzNNj0IJylRCGIVK9wX2lwSNgPBa0NxkDNTnkQmMffJbTrmQVYmI4EtMmXru3h3afK0yJqZS6OmKf2WOKcdqgCCcyD9/k/Ov7x0YKCRMnqdt7M8YrdW0Xkl3aRySxbc3/MLJQRy6SzIWMDKjL6re6OGq/6RK5DCBXj12pWxcC91cZWkueqHwBYre8NS80orKyrMf+tbie6P8VkdzGrWltS9OtrPoNEFqIX+YkoturKdTmHObYOaBskx84l1lVCHNFsLYt9G2eZbdJGXHAycLxsHpTexTS9Ctl374vqOa4fBSVHqnPQq88hZqgbXAajOlAfDbfHiwdxGhNp/FRUpKJbAinOxCdE6PvB7PxWNaqmslwMVwGsZq8481IZml2pbDlTv/Y1z+30rbQLoKWImWaZcEx7yq0LmdWtdTIE6EJwBmR7MImPDGsv0lAyNs=; 4:Y1xoN4U+qnC1/6zUsX9bdXZ5KFtOVPMNPnpJzB+KCCl6DW80JulYUOIb7xj97aS0hvH23XBDa3lsMLqqyPK5x0FfmE1LAAK59dJxQZMUuHJR20if6Dw82whWDM4bCBk1bg1t87R4rNIJ52I4OPVN3aZMcJRRg6WZmVekmstVkNdHX/pB+hJBApk8zk2EEBwJHm//uGTMMRLr6CewN2qUUWRqiCW8Ur1GupAfRvW9gISnnmlBRLdd9kXlyQYwkb9jnZNn73Tlxk1T2ne3y+9dTOQXSNrJfwpM4Pfzdl/emmb1PuM8zH/JT6nGQltkcJtT X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3231221)(944501327)(52105095)(3002001)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:BN3PR07MB2516; BCL:0; PCL:0; RULEID:; SRVR:BN3PR07MB2516; X-Forefront-PRVS: 0636271852 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39850400004)(346002)(376002)(39380400002)(366004)(396003)(13464003)(199004)(189003)(11346002)(478600001)(305945005)(59450400001)(68736007)(6496006)(72206003)(16526019)(58126008)(26005)(76176011)(9686003)(8936002)(6666003)(446003)(66066001)(386003)(956004)(52116002)(47776003)(81166006)(105586002)(42882007)(476003)(55016002)(5660300001)(6246003)(33716001)(50466002)(7736002)(6862004)(4326008)(3846002)(1076002)(33656002)(229853002)(106356001)(53936002)(6116002)(486006)(16586007)(316002)(81156014)(8676002)(6636002)(25786009)(2906002)(97736004)(23726003)(33896004)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2516; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2516; 23:yPcTZ0yaWkp8VRcSfAuIr79kKW3JiLTBoj5oegtgJ?= =?us-ascii?Q?Y6ug4LugdRefaG2/NDdEfWAj1be8/w6nTA6Lu3P62Q2puWJEi7ejNbQuZ7Pn?= =?us-ascii?Q?EJttxV7XFR7UVkbVI1HpFpTC6/MVbq3Qs4SJxKGVYS9l7Y1vnMsujbIyVnAv?= =?us-ascii?Q?1Uj0o8EpqdHlZRXcjd5tt0LNFFw12PZk39SARq1PV+w9m8VDQJyeenJID/87?= =?us-ascii?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vj/gJCmHxKin8mjAcb01eeVL1+nTRnMH+nAna+XcE661n29I+PASEyIIYN0A/f7/mx3EKsMNqjDRoQ+Bjhjf5xzh45yjjwImX+6bqbtO75Dzn9hgZ9wdiFM=; 24:oeR2rFdDyzPOffDKRbCu6h+Mm/LxeYUHnoMZUvdEzzT5RY3a8HpKX4LSY7gwDu5RdpTx/TGGl8gwyV+aqFxovwfNwt7FcT440NDCey8jtIQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2516; 7:hfbGc6GOajbyNuUjPsf/m0hfdzDGPPMLbk8v3pwu2w/hYD7NsqflD3MJkAjUUp12p4B670nEbkuAMJUX6NRSbQiUWGU1zlQkSL6MWLLjcz5/1BDKvral2DSujw2iLfx0JIsjVwyxVdj0LvNrMpNuCp9v72ApIRhZhLT+iQ4fptqCknd9nX0oU0OyQDmDqNocdIKfrAsPB3FZYOGHUAgV4lYTGSfeNjk8BcCjA756fXWwkLm8GAsLotfL+MF/Eb+p X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2018 07:59:42.9647 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7dae56c4-535f-4130-4471-08d59d26b0ce X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2516 Subject: Re: [dpdk-dev] [PATCH v3 06/12] event/octeontx: add multiproducer timer arm and cancel 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, 08 Apr 2018 07:59:47 -0000 -----Original Message----- > Date: Tue, 3 Apr 2018 20:35:08 +0530 > From: Pavan Nikhilesh > To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, > erik.g.carrillo@intel.com > Cc: dev@dpdk.org, Pavan Nikhilesh > Subject: [dpdk-dev] [PATCH v3 06/12] event/octeontx: add multiproducer > timer arm and cancel > X-Mailer: git-send-email 2.16.3 > > Signed-off-by: Pavan Nikhilesh > --- > +static inline int16_t > +timr_bkt_get_rem(struct tim_mem_bucket *bktp) > +{ > + return __atomic_load_n((int16_t *)&bktp->chunk_remainder, > + __ATOMIC_ACQUIRE); > +} > + > +static inline void > +timr_bkt_set_rem(struct tim_mem_bucket *bktp, uint16_t v) > +{ > + __atomic_store_n((int16_t *)&bktp->chunk_remainder, v, typecast is not required for __atomic_* gcc atomic builtins functions. > + __ATOMIC_RELEASE); > +} > + > +static inline void > +timr_bkt_sub_rem(struct tim_mem_bucket *bktp, uint16_t v) > +{ > + __atomic_fetch_sub((int16_t *)&bktp->chunk_remainder, v, > + __ATOMIC_RELEASE); > +} > + > +{ > + > +/* Multi producer functions. */ > +static inline int > +timvf_add_entry_mp(struct timvf_ring * const timr, const uint32_t rel_bkt, > + struct rte_event_timer * const tim, > + const struct tim_mem_entry * const pent) > +{ > + uint8_t lock_cnt; > + int16_t rem; > + uint64_t lock_sema; > + struct tim_mem_bucket *bkt; > + struct tim_mem_entry *chunk; > + > +__retry: > + bkt = timvf_get_target_bucket(timr, rel_bkt); > + /* Bucket related checks. */ > + /*Get Bucket sema*/ > + lock_sema = timr_bkt_fetch_sema_lock(bkt); > + if (unlikely(timr_bkt_get_shbt(lock_sema))) { > + timr_bkt_dec_lock(bkt); > + goto __retry; > + } > + > + RTE_SET_USED(lock_cnt); lock_cnt not been used. Remove it. With above changes: Acked-by: Jerin Jacob