From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) by dpdk.org (Postfix) with ESMTP id A8A4F7F58 for ; Wed, 7 Sep 2016 08:22:22 +0200 (CEST) Received: by mail-it0-f65.google.com with SMTP id g185so314970ith.0 for ; Tue, 06 Sep 2016 23:22:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mnEI5fXUUiTU+SHiqmpgzlBWHN39gjUtMNkPQJQy3cw=; b=dVoesy1hIiAFUp1rcDhib4tJFIeO+bcqI+9QPo8B5D6kLhykzvxPTHIIo/vodB9Tfh ov4/XADhwhnqdKO4+PDNyyeZ+eZQQyJiKBlMke+Gf/ONThyFqV7kkZWNqNDa2WbAZA5M 5i2AZ663OTSaAdEKKGPi5Qd5QxpQ9GtbULx43ODWzI+cwMzWQEJrWh3YZpgqIvLGQwP8 9n491zMdhwaoyOfuhHt1WYT0QIsVC8wlzno9Gnza4KEyJStGrz+kdjOJcC+jWY/PfagQ 2+WhejuD2bIxrtPNyfUVNMf1dLe+g/Xc0asRxNADW2D29GPluX8BsPrPrCdfL2+HDeQw X/tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mnEI5fXUUiTU+SHiqmpgzlBWHN39gjUtMNkPQJQy3cw=; b=Wqbv1+CVLhcN+PEHl5qk+05qdsyDg6WlYgblyQ1Cgp9ImIvau9LxuoXI4P93Isf9g+ mQBbDVV3fLwvbqFxS2LMCsPG+Ja1QpFl0LJYvubgPuLfF3Eo7gQM6/PV/wGSNBfyNVjP u1EDF6tPVyUpkgc9cmGoyDEvnrewXsNwa6IBRApMlzUIV6Bz3SdVJ3MuoVZdvoX68LwW XOiU7YUi5R19JUn/NQGq/dkZaixYAXG49WbyJ3AQ3d39FhudO6I8oAxCld16J9eendk9 hI9HA2S23n1WpEqlSD9V2i7IwHD6Tx3h7M9BA3K+VMASEPy5DVMVwpfdFORkr2xye1Un SGmw== X-Gm-Message-State: AE9vXwPszgj3CjlUBd3ozfhfrxioUlyWbLeX4fVWCPd3FfnFvGHbJcP8/kW3CQzlV+H3Zb35JO5w/ws3aQ/Ubw== X-Received: by 10.36.127.87 with SMTP id r84mr4030553itc.4.1473229341929; Tue, 06 Sep 2016 23:22:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.53.23 with HTTP; Tue, 6 Sep 2016 23:22:21 -0700 (PDT) In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D8912647A64644@IRSMSX108.ger.corp.intel.com> References: <682698A055A0F44AA47192B20141149762528A49@BGSMSX102.gar.corp.intel.com> <3EB4FA525960D640B5BDFFD6A3D8912647A64644@IRSMSX108.ger.corp.intel.com> From: Nikhil Jagtap Date: Wed, 7 Sep 2016 11:52:21 +0530 Message-ID: To: "Dumitrescu, Cristian" Cc: "Ramia, Kannan Babu" , "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] meter: excess token bucket update in srtcm 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, 07 Sep 2016 06:22:22 -0000 Hi Cristian, Thanks for the confirmation. I have submitted a patch for the same. http://dpdk.org/ml/archives/dev/2016-September/046226.html Regards, Nikhil On 6 September 2016 at 15:26, Dumitrescu, Cristian < cristian.dumitrescu@intel.com> wrote: > Hi Nikhil, > > It also looks to me that you are right. Sorry, my mistake when translating > the RFC into code. > > Challenge in fixing this is how to code it using minimal number of > branches ... > > Thanks, > Cristian > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nikhil Jagtap > > Sent: Tuesday, September 6, 2016 7:30 AM > > To: Ramia, Kannan Babu > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] meter: excess token bucket update in srtcm > > > > Hi Kannan, > > > > Thank you for your reply. I will submit the patch on similar lines I had > > used for my test. > > > > Regards, > > Nikhil > > > > On 6 September 2016 at 10:40, Ramia, Kannan Babu < > > kannan.babu.ramia@intel.com> wrote: > > > > > Hi Nikhil > > > > > > You could submit a patch, something like that below logic > > > > > > If( ((n_periods * m->cir_bytes_per_period) > (m->cbs-m->tc)) > > > te = m->te + ((n_periods * m->cir_bytes_per_period) - > > > (m->cbs-m->tc)); > > > > > > and this should be done before m->tc update. > > > > > > > > > Regards > > > Kannan Babu > > > > > > -----Original Message----- > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Nikhil Jagtap > > > Sent: Tuesday, September 6, 2016 9:43 AM > > > To: Dumitrescu, Cristian > > > Cc: dev@dpdk.org > > > Subject: Re: [dpdk-dev] meter: excess token bucket update in srtcm > > > > > > Hi, > > > Can someone please comment on this? > > > > > > Nikhil > > > > > > On 31 August 2016 at 15:32, Nikhil Jagtap > wrote: > > > > > > > Hi, > > > > > > > > As per srTCM RFC 2697, we should be updating the E bucket only after > > > > the C bucket overflows. > > > > "Thereafter, the token counts Tc and Te are updated CIR times per > > > > second as follows: > > > > o If Tc is less than CBS, Tc is incremented by one, else > > > > o if Te is less then EBS, Te is incremented by one, else > > > > o neither Tc nor Te is incremented." > > > > > > > > However in the current DPDK implementation of srTCM, we are updating > > > > both the buckets simultaneously at the same rate (CIR). This will > > > > result in a token accumulation rate of (2*CIR). This seems like a bug > > > > to me. Can you confirm this? > > > > > > > > Nikhil > > > > > > > > > > > >