[dpdk-dev] [RFC PATCH v1 0/3] Remove string operations from xstats

Remy Horton remy.horton at intel.com
Fri Apr 15 16:44:19 CEST 2016


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


More information about the dev mailing list