From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Barbette Subject: Which counters are set by rte_eth_stats_get Date: Fri, 9 Nov 2018 08:28:46 +0000 Message-ID: <1541752126267.9242@kth.se> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko To: "dev@dpdk.org" Return-path: Received: from smtp-4.sys.kth.se (smtp-4.sys.kth.se [130.237.48.193]) by dpdk.org (Postfix) with ESMTP id AB08E4C99 for ; Fri, 9 Nov 2018 09:28:50 +0100 (CET) Content-Language: fr-FR List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi ethdev maintainers, Support of drivers for the fields in rte_eth_stats is a bit random, and nev= er 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, rin= g, szedata2, vhost imissed : *only* af_packet, avp, axgbe, fm10k, kni, liquidio, mlx4, mlx5, n= ull, pcap, ring, szedata2, tap, vhost, virtio rx_nombuf : *only* bnx2x,bnxt,bonding,ena,enic,failsafe,mlx4,mlx5,netvsc,nf= p,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 driv= er 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 i= s always supported if the function does not return 0. I can update the doc to reflect the state of things. But maybe we could mak= e that function return a bitmask which tells which counter has been set. Bu= t 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. O= r 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