DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tom Barbette <barbette@kth.se>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>
Subject: [dpdk-dev] Which counters are set by rte_eth_stats_get
Date: Fri, 9 Nov 2018 08:28:46 +0000	[thread overview]
Message-ID: <1541752126267.9242@kth.se> (raw)

Hi ethdev maintainers,


Support of drivers for the fields in rte_eth_stats is a bit random, and never mentioned in the doc. A quick survey showed me :


ipackets : implemented by all drivers
ibytes : all except null, ring
ierror : all except af_packet, ark, avf, axgbe, fm10k, kni, null, pcap, ring, szedata2, vhost
imissed : *only* af_packet, avp, axgbe, fm10k, kni, liquidio, mlx4, mlx5, null, pcap, ring, szedata2, tap, vhost, virtio
rx_nombuf : *only* bnx2x,bnxt,bonding,ena,enic,failsafe,mlx4,mlx5,netvsc,nfp,qede,szedata2,tap,virtio

With no way to know if we can rely on the value or not, as a DPDK user pov. The only way to know if we can rely on a given counter is to grep the driver code. Except if I missed something?

Also the doc of rte_eth_stats_get only mention io packets, bytes and errors. Not the other fields, and the way it is written let the reader think it is always supported if the function does not return 0.

I can update the doc to reflect the state of things. But maybe we could make that function return a bitmask which tells which counter has been set. But that would break the ABI... We could also have the bitmask set through a passed pointer, so it does not break code checking the return value is 0. Or maybe have the bitmask elsewhere, like for the offloads? Which fields are supported is probably a constant. So that may make more sense.

If you give me directions, I can propose a patch.

Cheers,
Tom

             reply	other threads:[~2018-11-09  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09  8:28 Tom Barbette [this message]
2018-11-09  8:38 ` Thomas Monjalon
2018-11-09 13:48   ` Tom Barbette
2018-11-09 16:23   ` Stephen Hemminger
2018-11-13  9:13     ` Tom Barbette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1541752126267.9242@kth.se \
    --to=barbette@kth.se \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).