From patchwork Wed Nov 1 14:00:05 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: 117692 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp921753qgn; Wed, 1 Nov 2017 07:01:20 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SOrgl1p/RYgdwknQRhxeloGaWcJXCNqAJwJ85v1seXh47Zqes+XodaQbQF0ciKlNRnR98M X-Received: by 10.237.57.228 with SMTP id m91mr8466462qte.267.1509544880675; Wed, 01 Nov 2017 07:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509544880; cv=none; d=google.com; s=arc-20160816; b=g7Nm1BC9pteuvuyR08gSCb6AyLxmPJLlbqu8biyc/9tdd8SAIU06Girxhv+i1Bd1SW 8L9DyC5tMN7oIZi0I1sA2i4ZgeBquONxqEZO2EMupjShahO9lCDM9mcxsevXSWYezoH4 6RBgu3/IrXWUDefsKKtpC5j0LAiQml+mP6JPiJpCj8P/LgS9IvWUw+K1Cu4ZkZU64erC 8cV/il6yi7GLLp3Ggfjd3Ow1KflrZ9uhBoZ22hcvoWvZkPmNAPRmDRdsl1EJk9/QszPA BD42eZyE0Rlud9GP6CLDdcmPTOmpPdAZBca5ST5I+Zhh4X2gmUEOr+twKYIY+XEne6NS OWyg== 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=Z0MMOGxH1ij0Z9qsdLYuiJ5CwRVpIA52ObY0ainS9J0=; b=yS+UukT0bu0DxKx2fENfDXsZkSAciAvHuP99C839FoQbukkRzMSn5hl+xwaGpNBwxi q8GwwcsL3U4/PiF30t9VThyXJMfqngYU95IG8UfNnqQXv2Ild8rgauGUaJpzGazjcbpC jmVDDRBK3vmeiVIxJJMi/Gfq9QLTvMzPOlL6030XYdkfz1ChVpsI+bQ40Q4hLk7LeWVe /teOjrqU0qznHoBqo5Yqq13j5G69bOXB7q8TGC7hihDN3j/+6msbEOxHR8qgWrV5YSP6 loDaCNr5K4AbAICs06TygK/uImO9mkkGtenQZJWlPEWfypDXVr9OmP3YUqjecmUn6q+p KEMw== 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 t41si622305qtt.230.2017.11.01.07.01.20; Wed, 01 Nov 2017 07:01:20 -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 2316560BE3; Wed, 1 Nov 2017 14:01:20 +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.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,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 D7D8B60C1C; Wed, 1 Nov 2017 14:00:30 +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 E088A60A31; Wed, 1 Nov 2017 14:00:16 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id AB76C609C3 for ; Wed, 1 Nov 2017 14:00:14 +0000 (UTC) Received: from mxback7j.mail.yandex.net (mxback7j.mail.yandex.net [IPv6:2a02:6b8:0:1619::110]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 0EE161244116 for ; Wed, 1 Nov 2017 17:00:13 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback7j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id EfTHF9JeZZ-0Cw8CcKG; Wed, 01 Nov 2017 17:00:13 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id aFzVa8u6W9-0Cmqdcpi; Wed, 01 Nov 2017 17:00:12 +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: Wed, 1 Nov 2017 17:00:05 +0300 Message-Id: <1509544807-5034-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509544807-5034-1-git-send-email-odpbot@yandex.ru> References: <1509544807-5034-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 267 Subject: [lng-odp] [PATCH 2.0 v2 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 linux-generic version of odp_packet_io_internal.h to a new header file. This is part of an attempt to remove from linux-generic version of odp_packet_io_internal.h all the references to symbols implemented only in linux-generic platform before enabling it for linux-dpdk platform as well. 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: ca1be967bd4f6aec7dc99b72de643718cb8a32b8 ** Merge commit sha: 29fab9a6071107a8bb565ceee1837755d3ca1eee **/ 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_ */