From patchwork Tue Oct 31 11:00:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 117571 Delivered-To: patch@linaro.org Received: by 10.80.245.45 with SMTP id t42csp3805500edm; Tue, 31 Oct 2017 04:04:10 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TkxCs1mXHzlCKlEZks55x0tkLTjOQvJEqbvNSxfM4RzFh/p3mILy/grs5TSk5C5kEA+4Lc X-Received: by 10.55.23.160 with SMTP id 32mr1865668qkx.20.1509447850060; Tue, 31 Oct 2017 04:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509447850; cv=none; d=google.com; s=arc-20160816; b=qwGiRVwJXjKkNrx9HFbiwtbGvdD/YPuk1pPCVw6HCRuv5Zfbit56lNg8DLCHtJ5tmS 5WxECcehJHygg/WHcEFagdubYodXe9ZPn6XxNLh1P5P430iyzJ8CW0jWBL+zdB3tMSJJ /rF5GAFHTjymB+v2eBZ8xoZXussBfdLp5EzaltiF+p9cTHJkSy9Ivft/uyNy9fqJzv/3 Mt3qsyDvZXt5P2g4H6eSQyHQiiRhi374YqG3ojA9mRZefP+GVGO6zLSSqhlqbyrqoU2U n92B9WGzW+C6kt3RYgU2N+M5TDucDuUeNKEO390OId7R3pzpjr++1RhUS5MVUHkuOmLr ovdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=9bx2e7lKeoIA4G5gK6WBB723uECQEZFdl0VWUz6SkMI=; b=pbw1lrHi4hm/OA2Kl7m1BHdilIAhev2Nf/sMAC1HiFqr3gg6b+IctLVg2keR6Uc/Pe cbRUqsqZQPscAWOFBv8mU9RDx2QdkZNktXCAmSdNiuQjb5O0Ewn5rDwrReq4qbOFm8Ls /N1hlIY3REp4XGwlenw0MyLFKZJYI975TjkFVmqtgx/H6aVp/GxnEAwkuxSFPATyveCt Ol7CCccsUTR63ZheHgNncfqoDTsyAYl0sFdEuYHtoA+29aMGzdKJ8Dmf9XkRF3eSkZY9 /xEcj2jn8igV0h5TdTjsmAOw3FiuBkF5PoDOX8R/kikZcBAgHzR7JnGTUIKWblt7qh7c k3Bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id e8si1170291qtk.427.2017.10.31.04.04.09; Tue, 31 Oct 2017 04:04:10 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id B543560C05; Tue, 31 Oct 2017 11:04:09 +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=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, 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 D681260C1E; Tue, 31 Oct 2017 11:00:38 +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 B854460961; Tue, 31 Oct 2017 11:00:26 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 81F5D6069D for ; Tue, 31 Oct 2017 11:00:13 +0000 (UTC) Received: from mxback9o.mail.yandex.net (mxback9o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::23]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 1AEC66A84C7F for ; Tue, 31 Oct 2017 14:00:12 +0300 (MSK) Received: from smtp1j.mail.yandex.net (smtp1j.mail.yandex.net [2a02:6b8:0:801::ab]) by mxback9o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 2sWsojS4HU-0BkCKro6; Tue, 31 Oct 2017 14:00:12 +0300 Received: by smtp1j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id p0SvtzPjlX-0Bkqe6OZ; Tue, 31 Oct 2017 14:00:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 31 Oct 2017 14:00:04 +0300 Message-Id: <1509447606-15110-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1509447606-15110-1-git-send-email-odpbot@yandex.ru> References: <1509447606-15110-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 267 Subject: [lng-odp] [PATCH 2.0 v1 2/4] linux-gen: pktio: move sysfs stats function prototype X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Bogdan Pricope Move sysfs stats function prototype from odp_packet_io_internal.h Signed-off-by: Bogdan Pricope --- /** Email created from pull request 267 (bogdanPricope:2_0_pktio_internal_pr) ** https://github.com/Linaro/odp/pull/267 ** Patch: https://github.com/Linaro/odp/pull/267.patch ** Base sha: 1236f1ad2bba56b5e49ff62df247e52143b48985 ** Merge commit sha: a69a4d7670d99912c517574391cb72bae3308c3f **/ platform/linux-generic/Makefile.am | 1 + .../linux-generic/include/odp_packet_io_internal.h | 3 --- platform/linux-generic/pktio/common.c | 1 + platform/linux-generic/pktio/socket.c | 1 + platform/linux-generic/pktio/socket_mmap.c | 1 + platform/linux-generic/pktio/sysfs.c | 1 + platform/linux-generic/pktio/sysfs.h | 23 ++++++++++++++++++++++ 7 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 platform/linux-generic/pktio/sysfs.h diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 277418142..db466dd2a 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -177,6 +177,7 @@ noinst_HEADERS = \ ${srcdir}/include/odp_packet_io_ring_internal.h \ ${srcdir}/pktio/ethtool.h \ ${srcdir}/pktio/common.h \ + ${srcdir}/pktio/sysfs.h \ ${srcdir}/pktio/dpdk.h \ ${srcdir}/include/odp_pktio_ops_ipc.h \ ${srcdir}/include/odp_pktio_ops_loopback.h \ diff --git a/platform/linux-generic/include/odp_packet_io_internal.h b/platform/linux-generic/include/odp_packet_io_internal.h index e078cc826..1302a59bf 100644 --- a/platform/linux-generic/include/odp_packet_io_internal.h +++ b/platform/linux-generic/include/odp_packet_io_internal.h @@ -147,9 +147,6 @@ static inline void pktio_cls_enabled_set(pktio_entry_t *entry, int ena) entry->s.cls_enabled = ena; } -int sysfs_stats(pktio_entry_t *pktio_entry, - odp_pktio_stats_t *stats); - int pktin_poll_one(int pktio_index, int rx_queue, odp_event_t evt_tbl[]); diff --git a/platform/linux-generic/pktio/common.c b/platform/linux-generic/pktio/common.c index 050d2d950..900dcbba2 100644 --- a/platform/linux-generic/pktio/common.c +++ b/platform/linux-generic/pktio/common.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/platform/linux-generic/pktio/socket.c b/platform/linux-generic/pktio/socket.c index 7481f4f7f..d9f85b29a 100644 --- a/platform/linux-generic/pktio/socket.c +++ b/platform/linux-generic/pktio/socket.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include diff --git a/platform/linux-generic/pktio/socket_mmap.c b/platform/linux-generic/pktio/socket_mmap.c index 67d2b9206..9b35d89fe 100644 --- a/platform/linux-generic/pktio/socket_mmap.c +++ b/platform/linux-generic/pktio/socket_mmap.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include diff --git a/platform/linux-generic/pktio/sysfs.c b/platform/linux-generic/pktio/sysfs.c index c3d4faea1..f674ac42c 100644 --- a/platform/linux-generic/pktio/sysfs.c +++ b/platform/linux-generic/pktio/sysfs.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/platform/linux-generic/pktio/sysfs.h b/platform/linux-generic/pktio/sysfs.h new file mode 100644 index 000000000..f8fe3072a --- /dev/null +++ b/platform/linux-generic/pktio/sysfs.h @@ -0,0 +1,23 @@ +/* Copyright (c) 2016, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_PKTIO_SYSFS_H_ +#define ODP_PKTIO_SYSFS_H_ + +/** + * Get statistics for a pktio entry + * + * @param pktio_entry Packet IO entry + * @param stats[out] Output buffer for counters + * + * @retval 0 on success + * @retval != 0 on failure + */ + +int sysfs_stats(pktio_entry_t *pktio_entry, + odp_pktio_stats_t *stats); + +#endif /* ODP_PKTIO_SYSFS_H_ */