From mboxrd@z Thu Jan 1 00:00:00 1970 From: Remy Horton Subject: [RFC PATCH v1 0/3] Remove string operations from xstats Date: Fri, 15 Apr 2016 15:44:19 +0100 Message-ID: <1460731462-21229-1-git-send-email-remy.horton@intel.com> To: dev@dpdk.org Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id B3C572C13 for ; Fri, 15 Apr 2016 16:44:24 +0200 (CEST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. -- Since this will involve API & ABI breakage as previously advertised, there are several design assumptions that need consideration: *) id-name & id-value pairs for both lookup and query Permits out-of-order 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. *) 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. *) 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? Comments welcome. 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 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(-) -- 2.5.5