From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8E1A1A0487 for ; Mon, 1 Jul 2019 12:55:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9D6C737AF; Mon, 1 Jul 2019 12:55:07 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 7F8162C60 for ; Mon, 1 Jul 2019 12:55:06 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id CBFBDB40063; Mon, 1 Jul 2019 10:55:04 +0000 (UTC) Received: from [192.168.1.11] (85.187.13.180) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 1 Jul 2019 11:54:59 +0100 To: Stephen Hemminger , CC: , Stephen Hemminger References: <20190626222135.11368-1-stephen@networkplumber.org> <20190626233346.4719-1-stephen@networkplumber.org> <20190626233346.4719-2-stephen@networkplumber.org> From: Andrew Rybchenko Message-ID: Date: Mon, 1 Jul 2019 13:54:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <20190626233346.4719-2-stephen@networkplumber.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [85.187.13.180] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24732.003 X-TM-AS-Result: No-12.172900-8.000000-10 X-TMASE-MatchedRID: zGP2F0O7j/vmLzc6AOD8DfHkpkyUphL9FSZQHXjjSNzdEZKQ2x9p3j5Q FsH1QNsOZwIwfmervitD0wfWXDoBOh1YpEPWJiyzPwKTD1v8YV7DAPSbMWlGt5iQXtm0V8JTCT2 og8mlUDutEXpoJ0VYi5TfgMYaGy8R8LacAZ3mDoHYeXBrcJgL5Pfjx7YIT/Biq2RzHFToRUgrFw z1a+NmIrDBuX06bfWxkZOl7WKIImrvXOvQVlExsA9ejiC/BQPd+gD2vYtOFhgqtq5d3cxkNaDjb 4oyKcfRs5ZP0WomuB4bYZOi5x6GgEBzDv8GpEuy7B7UGQxWKNM= X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--12.172900-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24732.003 X-MDID: 1561978505-mkjxrHtiMGRE Subject: Re: [dpdk-dev] [PATCH v2 1/2] ethdev: expose basic xstats for driver use X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 27.06.2019 2:33, Stephen Hemminger wrote: > Avoid duplication by having generic basic xstats available > for use by drivers. A later patch uses this for failsafe > driver. > > Signed-off-by: Stephen Hemminger [...] > diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h > index 2922d5b7cc95..91ce1880d1c6 100644 > --- a/lib/librte_ethdev/rte_ethdev_core.h > +++ b/lib/librte_ethdev/rte_ethdev_core.h > @@ -517,6 +517,20 @@ struct eth_dev_ops { > /**< Test if a port supports specific mempool ops */ > }; > > +/** > + * @internal > + * Get basic stats for ethdev > + */ > +int __rte_experimental > +rte_eth_basic_stats_count(struct rte_eth_dev *dev); > + > +int __rte_experimental > +rte_eth_basic_stats_get_names(struct rte_eth_dev *dev, > + struct rte_eth_xstat_name *xstats_names); > + > +int __rte_experimental > +rte_eth_basic_stats_get(uint16_t port_id, struct rte_eth_xstat *xstats); > + > /** > * @internal > * Structure used to hold information about the callbacks to be called for a It conflicts with __rte_experimenal placing patch which is on the mailing list. Also I've expected to see these functions in rte_ethdev_driver.h to avoid inclusion in rte_ethdev.h. As I understand these functions are for rte_ethdev and drivers only. > diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map > index df9141825c3f..949a79800cbc 100644 > --- a/lib/librte_ethdev/rte_ethdev_version.map > +++ b/lib/librte_ethdev/rte_ethdev_version.map > @@ -239,6 +239,9 @@ DPDK_19.05 { > EXPERIMENTAL { > global: > > + rte_eth_basic_stats_count; > + rte_eth_basic_stats_get; > + rte_eth_basic_stats_get_names; > rte_eth_devargs_parse; > rte_eth_dev_create; > rte_eth_dev_destroy;