[dpdk-dev] [RFC PATCH 1/2] ethdev: introduce internal rxq/txq stats API

Stephen Hemminger stephen at networkplumber.org
Tue Mar 19 18:54:01 CET 2019


On Tue, 19 Mar 2019 17:18:08 +0000
Ferruh Yigit <ferruh.yigit at intel.com> wrote:

> On 3/14/2019 3:13 PM, David Marchand wrote:
> > Introduce a new api to retrieve per queue statistics from the drivers.
> > The api objectives:
> > - easily add some common per queue statistics and have it exposed
> >   through the user xstats api while the user stats api is left untouched
> > - remove the limitations on the per queue statistics count (inherited
> >   from ixgbe) and avoid recurrent bugs on stats array overflow  
> 
> The patch is adding two new dev_ops 'rxq_stats_get' & 'txq_stats_get', my
> concern is if it is overkill to have three dev_ops to get stats
> and I am feeling that is making xstat code more complex.
> 
> Would it be simpler to add 'q_ierrors' & 'q_oerrors' to 'struct rte_eth_stats'?
> 
> And perhaps we can do the 'fix rxq q_errors' patchset [1] after this change, so
> fix can be done with less changes, although it will push the fix into next
> release because of the ABI break.
> OR ethdev will be broken this release, because of max_mtu, since ABI is already
> broken perhaps we can squeeze this in.
> 
> Overall I would like to get more comment on this, Andrew, Thomas?
> 
> > 
> > Signed-off-by: David Marchand <david.marchand at redhat.com>  
> 
> <...>
> 

My preference would be:
  1. Make all DPDK drivers consistent in usage of current statistic values.
  2. Propose an enhancement to have new ethdev statistics match some pre-existing
     standard like SNMP or other RFC.
  3. Reduce custom (xstats) values by using #2. Leave it for driver specific stuff.

I.e: don't modify existing API at all, make a new one.

PS: ethdev is one of those structures that needs to get removed/hidden from
application headers.  It should be possible to add/remove stuff from ethdev internals, device and bus
without breaking API/ABI.



More information about the dev mailing list