From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from smtp-4.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-4.sys.kth.se (Postfix) with ESMTP id 5E56029AA; Fri, 9 Nov 2018 09:28:50 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-4.sys.kth.se ([127.0.0.1]) by smtp-4.sys.kth.se (smtp-4.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id q4WISvAK8R4v; Fri, 9 Nov 2018 09:28:49 +0100 (CET) Received: from exdb01.ug.kth.se (unknown [192.168.32.111]) by smtp-4.sys.kth.se (Postfix) with ESMTPS id BDAEB27EE; Fri, 9 Nov 2018 09:28:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kth.se; s=default; t=1541752129; bh=382OaLMzaKctHcDJTh2uDe2DcGg57Pt7Ph2ZplZr0WI=; h=From:To:CC:Subject:Date; b=ORuu8+dfMy8QFMJEN9IN6Vd5TZdU/faS7ardaYom6bcPSqVMpyH3aF70+cOYRUUlb T984uAMGiYAj/NmgqjF9QJEEgfSGdwT+RXxmtGkx9KVc1luZhTzWoimAdRV7us0ALv a/OucgZzPyFx2bdt9PBJAdYft0YZAoaVCKmfAyLY= Received: from exdb03.ug.kth.se (192.168.32.113) by exdb01.ug.kth.se (192.168.32.111) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 9 Nov 2018 09:28:47 +0100 Received: from exdb05.ug.kth.se (192.168.32.115) by exdb03.ug.kth.se (192.168.32.113) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 9 Nov 2018 09:28:46 +0100 Received: from exdb05.ug.kth.se ([192.168.32.115]) by exdb05.ug.kth.se ([192.168.32.115]) with mapi id 15.00.1367.000; Fri, 9 Nov 2018 09:28:46 +0100 From: Tom Barbette To: "dev@dpdk.org" CC: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Thread-Topic: Which counters are set by rte_eth_stats_get Thread-Index: AQHUeAYlqxuyzt26LEG3T9EQIj85rg== Date: Fri, 9 Nov 2018 08:28:46 +0000 Message-ID: <1541752126267.9242@kth.se> Accept-Language: fr-FR, sv-SE, en-US Content-Language: fr-FR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [130.237.20.142] MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Which counters are set by rte_eth_stats_get X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2018 08:28:50 -0000 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