From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 15 Apr 2016 07:44:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,487,1455004800"; d="scan'208";a="686820469" Received: from rhorton-mobl.ger.corp.intel.com (HELO VM.ir.intel.com) ([163.33.228.84]) by FMSMGA003.fm.intel.com with ESMTP; 15 Apr 2016 07:44:22 -0700 From: Remy Horton To: dev@dpdk.org Date: Fri, 15 Apr 2016 15:44:19 +0100 Message-Id: <1460731462-21229-1-git-send-email-remy.horton@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [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: Fri, 15 Apr 2016 14:44:25 -0000 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