From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stephen@networkplumber.org>
Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com
 [209.85.220.43]) by dpdk.org (Postfix) with ESMTP id E40499A92
 for <dev@dpdk.org>; Tue, 26 May 2015 16:57:17 +0200 (CEST)
Received: by padbw4 with SMTP id bw4so94644785pad.0
 for <dev@dpdk.org>; Tue, 26 May 2015 07:57:17 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-type:content-transfer-encoding;
 bh=HlSc0woChoJuUVm35+2pS6/UwVnQ1KSuQKPGfpqS4jI=;
 b=aOcPVmD478L6EFbbWj8KuE2UtbKs/CrymlgNA+cb+xQE8/cZ6+2BHRolHcPakkhakm
 VaXj6Pvxq4qBtaHGSaSnZf5//Hd8gGcJGinA3HFCXQaNLi3TslZH993uGzPwiDB035/V
 lArWk6o6Hle5b3/HWN8Y9u7czyenHKQGvQT++z6fHFq8a5tuq+LOHYAE/zgrjNLAyTpV
 9+K/gN85OGOmlhYGVb7KGD5EUjT6BgFH+GiY00Yy0XrMuJweoTiTwAe4Fl9nLEQLTA33
 sxyN3+lWvlj0XUrEZLTiEgr0OtiO1dDL0J6NJS8wCuNNlLhLfqHz/TNvxNsq/ckGEDx2
 eV+Q==
X-Gm-Message-State: ALoCoQkAjFigjwDjMYXXuniTwjhY5E+BTG4mZU1Ap+MMKFAb5yw1XYlzuzCQCV7+wHm2TeaKT+iZ
X-Received: by 10.66.244.16 with SMTP id xc16mr49704635pac.87.1432652237287;
 Tue, 26 May 2015 07:57:17 -0700 (PDT)
Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net.
 [50.53.82.155])
 by mx.google.com with ESMTPSA id lb1sm13432437pab.39.2015.05.26.07.57.16
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 26 May 2015 07:57:17 -0700 (PDT)
Date: Tue, 26 May 2015 07:57:19 -0700
From: Stephen Hemminger <stephen@networkplumber.org>
To: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Message-ID: <20150526075719.24bed9cf@urahara>
In-Reply-To: <1432647558-9062-1-git-send-email-maciejx.t.gajdzica@intel.com>
References: <1432647558-9062-1-git-send-email-maciejx.t.gajdzica@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3] pipeline: add statistics for
 librte_pipeline ports and tables
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 26 May 2015 14:57:18 -0000

On Tue, 26 May 2015 15:39:18 +0200
Maciej Gajdzica <maciejx.t.gajdzica@intel.com> wrote:

> +#if RTE_LOG_LEVEL == RTE_LOG_DEBUG
> +#define RTE_PIPELINE_STATS_ADD(counter, val) \
> +	({ (counter) += (val); })
> +
> +#define RTE_PIPELINE_STATS_ADD_M(counter, mask) \
> +	({ (counter) += __builtin_popcountll(mask); })
> +#else
> +#define RTE_PIPELINE_STATS_ADD(counter, val)
> +#define RTE_PIPELINE_STATS_ADD_M(counter, mask)
> +#endif

This is worse idea than the previous one.
I want statistics done on a per lcore basis, and always available
because real users on production system want statistics (but they
don't want log spam).