From patchwork Thu Sep 29 14:27:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karmarkar Suyash X-Patchwork-Id: 16232 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 8641D38EB; Thu, 29 Sep 2016 16:27:20 +0200 (CEST) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0082.outbound.protection.outlook.com [104.47.40.82]) by dpdk.org (Postfix) with ESMTP id D900B2B84 for ; Thu, 29 Sep 2016 16:27:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=SonusNetworks.onmicrosoft.com; s=selector1-sonusnet-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=L3R/GBKbsQMoPMamM5ml0lbFpdVbrqIsES7XcCjXBEw=; b=nn3DFWQNQk9rfxyDTBlWv3rv1RUHfX2sTlF9K4hFVy+kC/YnrvPm6mfyf3hk1Q9kO0UGm0JpbLbXxy+N+7F2OZIIyviuSjihPm68X4FchujHiFLqd8YE8RIAdnaBiMTBeLgXPDhVNKetqFzVPusZZ8aMBOvtMDdkGNr3+RP9sV4= Received: from BN3PR03MB1431.namprd03.prod.outlook.com (10.163.34.26) by BN3PR03MB1429.namprd03.prod.outlook.com (10.163.34.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.649.16; Thu, 29 Sep 2016 14:27:17 +0000 Received: from BN3PR03MB1431.namprd03.prod.outlook.com ([10.163.34.26]) by BN3PR03MB1431.namprd03.prod.outlook.com ([10.163.34.26]) with mapi id 15.01.0649.017; Thu, 29 Sep 2016 14:27:17 +0000 From: Karmarkar Suyash To: "dev@dpdk.org" , "thomas.monjalon@6wind.com" , "rsanford@akamai.com" , "reshma.pattan@intel.com" Thread-Topic: [PATCH v2]:rte_timer:timer lag issue correction Thread-Index: AQHSEDPB2NrTgxc9oUadR+nlImJRw6CENQnwgAA/PYCADCZJ4A== Date: Thu, 29 Sep 2016 14:27:17 +0000 Message-ID: References: <20160921205427.14116-1-skarmarkar@sonusnet.com> In-Reply-To: <20160921205427.14116-1-skarmarkar@sonusnet.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=skarmarkar@sonusnet.com; x-originating-ip: [208.45.178.4] x-ms-office365-filtering-correlation-id: c0432ea7-c139-4ef5-1871-08d3e874b6f7 x-microsoft-exchange-diagnostics: 1; BN3PR03MB1429; 6:XPWDOjrT+jc3wcHNuhSmMrMKOwiz0oXjrphbxCw9Lo5fqhzMa2o6H9a2eTQynJ2ZuXjM24mpkH/yzyRSENqL4rxR2p20rPFHZzzASB0IqdNwrVnCnSsMEOUJu9k7wY5zAgRbS0CVrImtD1NpOQVkNwFcuuZJhjuogLaoFZA4hQYl+U6RMy29iiqfoe0/exP2C1MKiMSDzRe5s2fTye1K6dbrlvJt/M+KV2CKXHhHbawlcINKUzeZ8W9x/CnCUyYFMh1npnwGsmJdv0o5dgEjs3SDjw3Wpw8dWgz05euVvrTraaU0RIXojSn7is1A0liG; 5:uhJbIpB4AXPcMpVTnccJLe/3AKUJ698diF6XqtItsA0YqTSr6O5aqsdCULrWO4X3JHJhz57wvIAZ9sF+EB4jkKldevhoBuYmYaTTsEYUVUkRZ4FfOQVpqngoVYMVHP+YF0HIYP34Gj8pmevSowZeMluGEGG0jwxN0GA8C8VbhCE=; 24:WdIW+dYb31pQd5mkikrxAWq6ZxAbWtaz/a3rKkIDvkFa024SRHiP2gn0WCZXsrRs+hfA5U2uQ0PW2nbdclL9DSKipLkvIVOC3p/9sMKMCUo=; 7:I5i8J0ymtjDwdSd8ore3yBTNPSUcZJzJEs2CP0FmhJuo/4O6CnD/1HvsI2eM8Sh/9JvHHHMd+EJMGIIxj789SjzJtqVAb/3BB3h2w0McDazYmDQrUp7zwLWyfchJ0CG2/BTNtCspRcnZoxKbT4u2ZCv4UPRJz4BiNoNazB6AiuPoLbYOQ2IIYnKtXsSFrALavjVCxqGSbUOf5btyzEPY7DWQn8u0l+Wv+b8ASCK02ivOOEqoXO8gkd46dwGiEFOMMR7QMphfP7c83y7IpNJylRHLBi+u4GBCTfxYUR1WBvtuD3QkzB3NZWWZlpRxEEfol/49ZFXT8nyZHUY6wBAA+g== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1429; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BN3PR03MB1429; BCL:0; PCL:0; RULEID:; SRVR:BN3PR03MB1429; x-forefront-prvs: 00808B16F3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(377454003)(13464003)(189002)(199003)(105586002)(19580405001)(81156014)(8676002)(81166006)(99286002)(19580395003)(97736004)(5001770100001)(68736007)(5002640100001)(2900100001)(101416001)(76176999)(50986999)(3900700001)(54356999)(3280700002)(6116002)(102836003)(3660700001)(106116001)(76576001)(11100500001)(66066001)(586003)(77096005)(3846002)(106356001)(122556002)(7736002)(305945005)(189998001)(92566002)(87936001)(2950100002)(74316002)(2201001)(33656002)(10400500002)(86362001)(7846002)(7696004)(2501003)(5660300001)(107886002)(9686002)(2906002)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB1429; H:BN3PR03MB1431.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: sonusnet.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: sonusnet.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Sep 2016 14:27:17.0917 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 29a671dc-ed7e-4a54-b1e5-8da1eb495dc3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1429 Subject: Re: [dpdk-dev] [PATCH v2]:rte_timer:timer lag issue correction X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hello, Can you please review the changes and suggest next steps? Thanks Regards Suyash Karmarkar -----Original Message----- From: Karmarkar Suyash Sent: Wednesday, September 21, 2016 4:54 PM To: dev@dpdk.org; thomas.monjalon@6wind.com; rsanford@akamai.com; reshma.pattan@intel.com Cc: Karmarkar Suyash Subject: [PATCH v2]:rte_timer:timer lag issue correction For Periodic timers ,if the lag gets introduced, the current code added additional delay when the next peridoc timer was initialized by not taking into account the delay added, with this fix the code would start the next occurrence of timer keeping in account the lag added.Corrected the behavior. Fixes: 9b15ba89 ("timer: use a skip list") Karmarkar Suyash (1): Signed-off-by: Karmarkar Suyash lib/librte_timer/rte_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- lib/librte_timer/rte_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c index 43da836..18782fa 100644 --- a/lib/librte_timer/rte_timer.c +++ b/lib/librte_timer/rte_timer.c @@ -613,7 +613,7 @@ void rte_timer_manage(void) status.owner = (int16_t)lcore_id; rte_wmb(); tim->status.u32 = status.u32; - __rte_timer_reset(tim, cur_time + tim->period, + __rte_timer_reset(tim, tim->expire + tim->period, tim->period, lcore_id, tim->f, tim->arg, 1); rte_spinlock_unlock(&priv_timer[lcore_id].list_lock); }