From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0040.outbound.protection.outlook.com [104.47.40.40]) by dpdk.org (Postfix) with ESMTP id 0BB86A49F for ; Mon, 19 Feb 2018 10:35:16 +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=ABiw/egX/b/rKjNM43rUhIVMDiNmCcUdQ3p34BbcWMw=; b=UyUBH78ShA9Q9LsxL58dv/xSIZ1NNRTs0Vk4Jm2Wx5EqSpJUV+t2vIgq4SwTcSOFoTcNCzZQjgEv8VX20QJr4apXyQ9JfoDMwuALxgpaasFKoojbxjRLAFqvBnUzv4OpJffPdPpGbTSWDDm2/IhjWQ0FmEyHcRbE4JuFaUoOBy0= Received: from ltp-pvn (111.93.218.67) by CY4PR07MB3463.namprd07.prod.outlook.com (2603:10b6:910:75::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Mon, 19 Feb 2018 09:35:13 +0000 Date: Mon, 19 Feb 2018 15:04:57 +0530 From: Pavan Nikhilesh To: Jerin Jacob , santosh.shukla@caviumnetworks.com, erik.g.carrillo@intel.com Cc: dev@dpdk.org Message-ID: <20180219093456.GA5828@ltp-pvn> References: <20180216213700.3415-1-pbhagavatula@caviumnetworks.com> <20180216213700.3415-8-pbhagavatula@caviumnetworks.com> <20180217050623.GE2941@jerin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180217050623.GE2941@jerin> User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR0601CA0020.apcprd06.prod.outlook.com (2603:1096:3::30) To CY4PR07MB3463.namprd07.prod.outlook.com (2603:10b6:910:75::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef1b544d-0395-450c-7fde-08d5777c14b6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CY4PR07MB3463; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 3:1Icb1JaMOV/pbmMozVbUdxmh7RPeILcgXwvu+QDCf9m74PIDhLWEiOXrz0vFv8DIfw2k3phWkTZkcUtv3kG1GUXEvH20D9u6B7+u1TgN+nJdpAJQEBpwgw3j3nLGWGQ2DsMo1FmnHUDnncCuYjrDzLdTe+VG/sGQCXmTDzV74Aaa1Rr2pR8h9+30E32kp9Xd0NT478sH/od6dIQy912SYSWW+ciuC1gkrLTdCQBl6Nrz3dUb3pPWQ48jpYTI6jaC; 25:AM3eyqZNy9kqidPM6xVf3p+zfrYchs+y6oXiw85J0OPM3AeH9dR98eW8tgHOlJKsmrm2O/LLvprAQ5j7gWZGH4kX0V+VUh93MDK/s7LWELigKBvOtZrG1fquabwOK+3d0bdaMQcSitrX1wZkeT8q8SIbLgRmlaWtoZmq4GWmNfCH5x3N2IPsNZIm1MNbZDKlAuWPjZGwHzfQwvQ1UoUV66OjGdpOqy03GEegLJgTaCBExLmnyla6MSP+Yh+i+UHiXzCLORy19ZOaL08SVd8hrexSXeGhBVNYzU6fph7EIXIy2ONNQUVneERe2m1D85Q7XiBJl1Y5SyA7/rBL96um2g==; 31:eAYhmCEyHTpFexIo9zR9mXlbAAGL/pNxBCYrq87hsL9tKfYluGhDxtpY2xbDCb7mFK/BZ+97w0Y8mw9EGsLMl+FdKDITRKUYFyXmbRodLsk0Y0iLJwcMGOQgzPVSIKYaIW5rJD0Lz/6VIw5rusXbh/inLktHEEX6+GV3eNyHb1+89Gg15tNAW3z+fh7KPRxd14bHvp5gA1ijR7Vjim7hNRcmfUUMH8f8wK1BLXUQsvI= X-MS-TrafficTypeDiagnostic: CY4PR07MB3463: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3463; 20:tXV40yQe7EXP2I06RBVVzZ8TBpVrIcAyphEnHfGL/5++EaLxp1JYipfXjPPeM2CEc8KY1cdKOGW6mhPq6QmIh3lU6NSsPPAaRohH2mrZ5wwnvRhlJO37X7LJPYmSLuz/5alDVjMKXK6w1mGPsWi0dJ/AJ74aK9+vgwqm/nwc1OqQbM6YgfyO7IU5WOqEy8wOLxDcgH/fxodm4eb6ksVZ/qyFI0svdLSNYgUugVyUCGN5uq0FkqvSlpeQIam7c+x9A5gFSmkeisBFWFuc6LNU2ym4g1MjgRTdpbnrq7BOpoWM5iIwvlqYSL57u2+Th3ZQVGIz59AgH3lLgDA1RQ7cuPInovcTMQdLDh47kkQul3fLqMAnzzwd5qRZqmJwc5clQpjg7JYzXzs6j5b7zLH5Blek1TPDU0kqQaOxmUhlO9Ni8UV/8+bjbbIWD7AiDdY1q8uA5X82jZO7S9/8+zjvf++3UjRYyuCbMfMDZ0wzkPyuglBQuuiQJ0Eb7EjOhQeRHfkgJSfUhjt2ArE2Q7H37atQE5pI+wr1GCrbp1aUa8FK73d2d6FxhC1MJ01eCFQFXm2EVYLbivis5o+NKFN0prKMXC5E8KAfodbf2dECS5U=; 4:cmed9QIWjmQAEig0jwuu47scQvRHA4by8UeV8nfbQiahvz/ASZkbDssUsAqsy4WJABGO1joG3xG5Woh00GczFlvuuahkp9Te9940Q75A1/YtNUO+e+cUOAWwm4kB9xhn/B8Q6TbKZjNzrlgKkYTJhspKvPzr1ijGK9NJnLaO7cTqckc11KLokb9LZuHpONQWlg9d6sr9jLVkuYGTZVt5pqr7yXHUpAaik9bRGVltqaxAfAcczAQNXxoxNU24cMJUhoEJRSja8nPPf4HNPjJHfPXY4vKw3TUE/0KFaVUNnHNcrv/fp6elEkmgKCiyauJi X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001056)(6040501)(2401047)(5005006)(8121501046)(93006095)(3002001)(3231101)(944501161)(10201501046)(6041288)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:CY4PR07MB3463; BCL:0; PCL:0; RULEID:; SRVR:CY4PR07MB3463; X-Forefront-PRVS: 0588B2BD96 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(39850400004)(366004)(346002)(376002)(396003)(189003)(199004)(13464003)(6246003)(2950100002)(16586007)(6116002)(8676002)(316002)(8936002)(81156014)(386003)(53936002)(59450400001)(2906002)(16526019)(50466002)(6496006)(72206003)(5660300001)(23726003)(52116002)(81166006)(26005)(6666003)(25786009)(105586002)(47776003)(33716001)(478600001)(5009440100003)(305945005)(97736004)(68736007)(42882006)(58126008)(7736002)(1076002)(55016002)(3846002)(9686003)(229853002)(76176011)(83506002)(33896004)(4326008)(66066001)(33656002)(106356001)(18370500001)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3463; H:ltp-pvn; 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; CY4PR07MB3463; 23:QcT704CjtdxwVLptGlXMps7m50OjB3/CoM0BvhuHv?= =?us-ascii?Q?WQWXSVn/kH6PPF5zw7LAsWlCLnH78nsFSLfn4EbLWMF1IpV/cCfsp6hogDpB?= =?us-ascii?Q?u/IQ4/5d+E0YZGuy3QJnnWwrTIBpJUb6BKVUEqyyOk/DLJqgHJRgOLfyplOP?= =?us-ascii?Q?XeYLsqBTlcfGZLou37Ps03V3Y6Jh2iDNyUbVeFmpWMJ9MU7Xe7R0WAYHn558?= =?us-ascii?Q?PUjv0vboONN8SG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/1/8ef3COq3V1yxpw9/0w15VU+yze8rszbozvYcpwPBkhzkJsP/NX3Bzoc/r0FzxTAHFa1z7He32xrwWEniw2WYG3IbxmWYp99uCuGtZlSJDjhjVHA+uM9ulpMuIAiO+Z8dDMvu5B//YxlTeOPu3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Feb 2018 09:35:13.1822 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef1b544d-0395-450c-7fde-08d5777c14b6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3463 Subject: Re: [dpdk-dev] [PATCH 07/10] event/octeontx: optimize timer adapter resolution parameters 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: Mon, 19 Feb 2018 09:35:17 -0000 On Sat, Feb 17, 2018 at 10:36:24AM +0530, Jerin Jacob wrote: > -----Original Message----- > > Date: Sat, 17 Feb 2018 03:06:57 +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 07/10] event/octeontx: optimize timer adapter > > resolution parameters > > X-Mailer: git-send-email 2.16.1 > > > > When application sets `RTE_EVENT_TIMER_ADAPTER_F_ADJUST_RES` flag > > while creating adapter underlying driver is free to optimize the > > resolution for best possible configuration. > > > > Signed-off-by: Pavan Nikhilesh > > --- > > drivers/event/octeontx/timvf_evdev.c | 51 +++++++++++++++++++++++++++++++++++- > > drivers/event/octeontx/timvf_evdev.h | 6 +++++ > > 2 files changed, 56 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c > > index 6cf5d4846..ffdfbb387 100644 > > --- a/drivers/event/octeontx/timvf_evdev.c > > +++ b/drivers/event/octeontx/timvf_evdev.c > > @@ -82,6 +82,48 @@ timvf_get_start_cyc(uint64_t *now, uint8_t ring_id) > > return octeontx_ssovf_mbox_send(&hdr, NULL, 0, now, sizeof(uint64_t)); > > } > > > > +#define ALIGN_CEIL(a, b) \ > > + (((a + (typeof(a)) b - 1) / ((typeof(a)) b)) * (typeof(a))b) > > + > > Can this moved to common code if this not already available? > Currently, align macros support aligning given value to a power of 2 and not to a given multiple. Will move this to common code and send a seperate patch.