From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id C9A29378E for ; Wed, 21 Sep 2016 10:57:19 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 21 Sep 2016 01:57:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,373,1470726000"; d="scan'208";a="11568364" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by fmsmga006.fm.intel.com with ESMTP; 21 Sep 2016 01:57:17 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX153.ger.corp.intel.com (163.33.192.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 21 Sep 2016 09:57:17 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.164]) by irsmsx111.ger.corp.intel.com ([169.254.2.67]) with mapi id 14.03.0248.002; Wed, 21 Sep 2016 09:57:17 +0100 From: "Dumitrescu, Cristian" To: Nikhil Jagtap CC: "dev@dpdk.org" , "Ramia, Kannan Babu" Thread-Topic: [PATCH v2] meter: fix excess token bucket update in srtcm implementation Thread-Index: AQHSE8089pD3c3+I6kSr0tuBXfe+2KCDpFqw Date: Wed, 21 Sep 2016 08:57:16 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D8912647A85CB4@IRSMSX108.ger.corp.intel.com> References: <1473228910-10429-1-git-send-email-nikhil.jagtap@gmail.com> <1474437462-6955-1-git-send-email-nikhil.jagtap@gmail.com> In-Reply-To: <1474437462-6955-1-git-send-email-nikhil.jagtap@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmI2Y2FkOWYtN2QwOC00ZTY1LWJiOTctOWQ0OWZmMjYwZjFlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkQ3XC9MeTExQVpYOURMMzZ1Szd4UXhER3ZxVmFZc0FISWt1U0lIcUxjcEI0PSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] meter: fix excess token bucket update in srtcm implementation 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: , X-List-Received-Date: Wed, 21 Sep 2016 08:57:20 -0000 > -----Original Message----- > From: Nikhil Jagtap [mailto:nikhil.jagtap@gmail.com] > Sent: Wednesday, September 21, 2016 6:58 AM > To: Dumitrescu, Cristian > Cc: dev@dpdk.org; Ramia, Kannan Babu ; > Nikhil Jagtap > Subject: [PATCH v2] meter: fix excess token bucket update in srtcm > implementation >=20 > As per srTCM RFC 2697, we should be updating the E bucket only after the > C bucket overflows. This patch fixes the current DPDK implementation, > where we are updating both the buckets simultaneously at the same rate > (CIR) which results in token accumulation rate of (2*CIR). >=20 > Signed-off-by: Nikhil Jagtap > --- >=20 > v2: > Removed the else part and instead added a default initialization of te. >=20 > --- > lib/librte_meter/rte_meter.h | 24 ++++++++++++++---------- > 1 files changed, 14 insertions(+), 10 deletions(-) >=20 Acked-by: Cristian Dumitrescu Thanks, Nikhil!