From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) by dpdk.org (Postfix) with ESMTP id 998032BF9 for ; Wed, 20 Apr 2016 18:03:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3932; q=dns/txt; s=iport; t=1461168225; x=1462377825; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=qCCFwhQFhZYFVN2BQZLoMBtiEpc+CvOoeBu0XaYZ2EU=; b=btae1tD4chHSKhVl7WidtA76/rw6egh00rzT+zpKsmMlNmlUR7IaPvt5 EKQElejM3w+cHPv/t0TzUZ3fumf8wkE/ANjmuSv6g0ZP9MCbWJk52LVGY puyUYso/utSvPGo9IHfRMt5Wr6I3/ObphMHPzW8Gww8q4zSZo5Qk0IqTX Q=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BJAgCXpxdX/4UNJK1egziBUAa3WIIPA?= =?us-ascii?q?Q2BcYYOAoFGOBQBAQEBAQEBZSeEQQEBAQMBOksEAgEIEQQBAR8JBzIUCQgCBAE?= =?us-ascii?q?SCIgZCL5QAQEBAQEBAQEBAQEBAQEBAQEBAQEWhiGES4oVBY1TijwBiG+FHY8Xj?= =?us-ascii?q?ywBHgEBQoNobIdJfgEBAQ?= X-IronPort-AV: E=Sophos;i="5.24,510,1454976000"; d="scan'208";a="95745239" Received: from alln-core-11.cisco.com ([173.36.13.133]) by rcdn-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Apr 2016 16:03:44 +0000 Received: from XCH-RCD-018.cisco.com (xch-rcd-018.cisco.com [173.37.102.28]) by alln-core-11.cisco.com (8.14.5/8.14.5) with ESMTP id u3KG3iFs004581 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 20 Apr 2016 16:03:44 GMT Received: from xch-rcd-016.cisco.com (173.37.102.26) by XCH-RCD-018.cisco.com (173.37.102.28) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Wed, 20 Apr 2016 11:03:44 -0500 Received: from xch-rcd-016.cisco.com ([173.37.102.26]) by XCH-RCD-016.cisco.com ([173.37.102.26]) with mapi id 15.00.1104.009; Wed, 20 Apr 2016 11:03:43 -0500 From: "David Harton (dharton)" To: Remy Horton , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC PATCH v1 0/3] Remove string operations from xstats Thread-Index: AQHRlyVTq5+EWbgW3kKb6tsWJ2kqsZ+TB72Q Date: Wed, 20 Apr 2016 16:03:43 +0000 Message-ID: References: <1460731462-21229-1-git-send-email-remy.horton@intel.com> In-Reply-To: <1460731462-21229-1-git-send-email-remy.horton@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.82.212.154] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [RFC PATCH v1 0/3] Remove string operations from xstats X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Apr 2016 16:03:46 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Remy Horton > Sent: Friday, April 15, 2016 10:44 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [RFC PATCH v1 0/3] Remove string operations from > xstats >=20 > The current extended ethernet statistics fetching involve doing several > string operations, which causes performance issues if there are lots of > statistics and/or network interfaces. This RFC patchset changes the API > for xstats to use integer identifiers instead of strings and implements > this new API for the ixgbe driver. Others drivers to follow. >=20 > -- >=20 > Since this will involve API & ABI breakage as previously advertised, ther= e > are several design assumptions that need consideration: >=20 > *) id-name & id-value pairs for both lookup and query Permits out-of-orde= r > and non-contigious returning of names/ids/values, even though expected > implmentations would in practice return items in sorted order by id. Is > this sufficent/desirable future proofing? Idea is to allow possibility of > drivers returning partial statistics. I believe forcing drivers to match to a common id-space will become=20 burdensome. If the stats id-space isn't common then matching strings is=20 probably just as sufficient as long as drivers don't add/remove stats ad hoc between the time the device is initialized and removed. >=20 > *) Bulk name-id mapping lookup only > At the moment individual lookup is not supported, as this would impose > extra overheads on drivers. The assumption is that any end user would > fetch all this data once on startup and then cache the mappings. I'm not sure I see the value of looking up a single stat from a user perspective. I can see where the drivers might say that some stats are less disruptive/etc but the user doesn't have that knowledge and wouldn't know how to take advantage. Usually all stats are grabbed multiple times and the changes noted during debug sessions. >=20 > *) Replacement or additional API > This patch replaces the current xstats API, but there is no inherant > reason beyond maintainability why this funtionality could not be in > addition rather than a replacement. What is consensus on this? I came to the conclusion that replacing the existing API isn't necessary but rather extending it so backwards compatibility could be maintained during the previous discussions on this topic. However, if we want to=20 go forward with cleaning up in order to reduce the support drivers provide I'm all for it. I still believe the API we develop should follow an "ethtool stats like" format as suggested earlier this year: extern int rte_eth_xstats_names_get(uint8_t port_id, struct rte_eth_xstats_name *names, unsigned n); extern int rte_eth_xstats_values_get(uint8_t port_id, uint64_t *values, unsigned n); Again, these could be provided alongside the existing API or replace it. I also like the idea you provided of a separate API to obtain the xstats count rather than deriving the count by calling one of the above functions with "dummy" values. Again, I can provide the patches for the changes I've made that align with this proposed API. I just never got any feedback on it when requested previously. Regards, Dave >=20 > Comments welcome. >=20 > Remy Horton (3): > rte: change xstats to use integer keys > drivers/net/ixgbe: change xstats to use integer keys > examples/ethtool: add xstats display command >=20 > drivers/net/ixgbe/ixgbe_ethdev.c | 87 > +++++++++++++++++++++++++++++++---- > examples/ethtool/ethtool-app/ethapp.c | 57 +++++++++++++++++++++++ > lib/librte_ether/rte_ethdev.c | 87 > +++++++++++++++++++++++++++++++---- > lib/librte_ether/rte_ethdev.h | 38 +++++++++++++++ > 4 files changed, 252 insertions(+), 17 deletions(-) >=20 > -- > 2.5.5