From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v14 5/6] lib: added new library for latency stats Date: Wed, 05 Apr 2017 16:24:57 +0200 Message-ID: <2528866.SURTCWTgWk@xps13> References: <1490907662-27666-1-git-send-email-remy.horton@intel.com> <1490907662-27666-6-git-send-email-remy.horton@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Harry van Haaren To: Remy Horton , Reshma Pattan Return-path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 97D5D2A6C for ; Wed, 5 Apr 2017 16:24:59 +0200 (CEST) Received: by mail-wr0-f177.google.com with SMTP id k6so16964245wre.2 for ; Wed, 05 Apr 2017 07:24:59 -0700 (PDT) In-Reply-To: <1490907662-27666-6-git-send-email-remy.horton@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2017-03-30 22:01, Remy Horton: > + /* > + * The jitter is calculated as statistical mean of interpacket > + * delay variation. The "jitter estimate" is computed by taking > + * the absolute values of the ipdv sequence and applying an > + * exponential filter with parameter 1/16 to generate the > + * estimate. i.e J=J+(|D(i-1,i)|-J)/16. Where J is jitter, > + * D(i-1,i) is difference in latency of two consecutive packets > + * i-1 and i. > + * Reference: Calculated as per RFC 5481, sec 4.1, > + * RFC 3393 sec 4.5, RFC 1889 sec. > + */ > + glob_stats->jitter += (abs(prev_latency - latency[i]) > + - glob_stats->jitter)/16; > lib/librte_latencystats/rte_latencystats.c:204:27: fatal error: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value] glob_stats->jitter += (abs(prev_latency - latency[i]) ^ note: use function 'fabsf' instead I am a bit sad to see such error at v14. Do you want I fix it for you?