From patchwork Thu Oct 22 10:45:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 55433 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id 9031323024 for ; Thu, 22 Oct 2015 10:46:29 +0000 (UTC) Received: by wicfg8 with SMTP id fg8sf18377398wic.0 for ; Thu, 22 Oct 2015 03:46:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=TFZMPULeY087G7TAY0zkGDUNJVgqTqBMJYVMfmlTNcc=; b=NoVuupyBr2kJNIuwNsZtJsTCjYPaHa5SjVFixiAvot5HMfHn8vPE69dOKv2zbxvr9/ w29iAr0GmX1QkHnP4wV1iGnw3692oM9M1hFlAPO39kbAXQmarle/4KxkUwAOROSdUjMA Vhy5MV8Wci4IxQU0Kk0WpXTpp8uBaDimmS2KHNjQcgZAWRMUxbsb2rEXvhjxb04CLgVu l+SoCuQMVfAGcAlY/YCXsZzt4Y97p/cc9uvkaoqWwMPO+EGCDT++NhMMo5+oCX2Eycgs TduvImpV+sAAFlXL2+O18FpXZ/mpmnKGaVPnMdXq6zx9SBRIAFbWMGzmU/IdJzVt47oE co8w== X-Gm-Message-State: ALoCoQkxc9H34TvKAtzlAlN4R5qZczJGcaRv7R+ws1IQOjrXU206vXzHmWFJAj3wHGrPsW51u0uj X-Received: by 10.112.54.197 with SMTP id l5mr3465521lbp.21.1445510788631; Thu, 22 Oct 2015 03:46:28 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.18.90 with SMTP id h87ls334971lfi.9.gmail; Thu, 22 Oct 2015 03:46:28 -0700 (PDT) X-Received: by 10.112.135.136 with SMTP id ps8mr7984706lbb.38.1445510788488; Thu, 22 Oct 2015 03:46:28 -0700 (PDT) Received: from mail-lf0-x235.google.com (mail-lf0-x235.google.com. [2a00:1450:4010:c07::235]) by mx.google.com with ESMTPS id p74si9214755lfd.22.2015.10.22.03.46.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Oct 2015 03:46:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c07::235 as permitted sender) client-ip=2a00:1450:4010:c07::235; Received: by lfaz124 with SMTP id z124so42929122lfa.1 for ; Thu, 22 Oct 2015 03:46:28 -0700 (PDT) X-Received: by 10.112.159.136 with SMTP id xc8mr6712322lbb.76.1445510788339; Thu, 22 Oct 2015 03:46:28 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp519577lbq; Thu, 22 Oct 2015 03:46:27 -0700 (PDT) X-Received: by 10.140.151.140 with SMTP id 134mr16477026qhx.25.1445510787394; Thu, 22 Oct 2015 03:46:27 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 86si12652871qky.58.2015.10.22.03.46.25; Thu, 22 Oct 2015 03:46:27 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 4252961D23; Thu, 22 Oct 2015 10:46:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id AA5A46204B; Thu, 22 Oct 2015 10:45:26 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 0014061E11; Thu, 22 Oct 2015 10:45:19 +0000 (UTC) Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) by lists.linaro.org (Postfix) with ESMTPS id 155ED619DA for ; Thu, 22 Oct 2015 10:45:17 +0000 (UTC) Received: by lfaz124 with SMTP id z124so42898390lfa.1 for ; Thu, 22 Oct 2015 03:45:16 -0700 (PDT) X-Received: by 10.112.172.138 with SMTP id bc10mr7727450lbc.74.1445510715928; Thu, 22 Oct 2015 03:45:15 -0700 (PDT) Received: from localhost.localdomain (ppp91-76-161-180.pppoe.mtu-net.ru. [91.76.161.180]) by smtp.gmail.com with ESMTPSA id m139sm2280719lfg.17.2015.10.22.03.45.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Oct 2015 03:45:15 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Thu, 22 Oct 2015 13:45:11 +0300 Message-Id: <1445510711-12313-3-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445510711-12313-1-git-send-email-maxim.uvarov@linaro.org> References: <1445510711-12313-1-git-send-email-maxim.uvarov@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv5 2/2] api: pktio statistics: define start and stop X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Original-Sender: maxim.uvarov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c07::235 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Define pktio stats start/stop functions for case when same statistic module is used by different pktios, so if it's used for one of them it cannot be used by other, to allow it for first it should be disable for second. For instance 2 statistic modules are shared between 4 eth ports, etc. Signed-off-by: Maxim Uvarov --- include/odp/api/packet_io_stats.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/odp/api/packet_io_stats.h b/include/odp/api/packet_io_stats.h index 1bff9ca..03f060e 100644 --- a/include/odp/api/packet_io_stats.h +++ b/include/odp/api/packet_io_stats.h @@ -123,6 +123,26 @@ int odp_pktio_stats(odp_pktio_t pktio, int odp_pktio_stats_reset(odp_pktio_t pktio); /** + * Start statistics for pktio handle + * + * @param pktio Packet IO handle + * @retval 0 on success + * @retval <0 on failure + * + */ +int odp_pktio_stats_start(odp_pktio_t pktio); + +/** + * Stop statistics for pktio handle + * + * @param pktio Packet IO handle + * @retval 0 on success + * @retval <0 on failure + * + */ +int odp_pktio_stats_stop(odp_pktio_t pktio); + +/** * @} */