> -----Original Message----- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Dai, Wei > Sent: Wednesday, November 2, 2016 9:29 AM > To: Thomas Monjalon; Mcnamara, John; Ananyev, Konstantin; Wu, Jingjing; > Zhang, Helin; Dai, Wei; Curran, Greg > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] ethdev: fix statistics description > > Hi, John & Greg > > Would you please give any opinion for this patch ? > > I have looked through all PMDs and found not all statistics items can > be supported by some NIC. > For example, rx_nombuf, q_ipackets, q_opackets, q_ibytes and > q_obytes are not supported by i40e. > But when the function rte_eth_stats_get(uint8_t port_id, struct > rte_eth_stats *stats) is called for i40e PMD, Above un-supported > statistics item in output stats are zero, this is not real value. > So far, there is no way to know whether an item in struct rte_eth_stats > is supported or not only from this structure definition. > Maybe some structure member can be added to indicate each of statistics > item valid or not. > But this means ABI change. > > > > -----Original Message----- > > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > > Sent: Tuesday, October 4, 2016 5:35 PM > > To: Dai, Wei <wei.dai at intel.com>; Mcnamara, John > > <john.mcnamara at intel.com> > > Cc: dev at dpdk.org > > Subject: Re: [dpdk-dev] [PATCH] ethdev: fix statistics description > > > > 2016-08-26 18:08, Wei Dai: > > > /** > > > * A structure used to retrieve statistics for an Ethernet port. > > > + * Not all statistics fields in struct rte_eth_stats are supported > > > + * by any type of network interface card (NIC). If any statistics > > > + * field is not supported, its value is 0 . > > > */ > > > struct rte_eth_stats { > > > > I'm missing the point of this patch. > > Why do you think it is a fix? > > > > John, any opinion? >
I think the source code comment is an improvement. I would also like to see a source code comment describing the criteria for choosing which counters go in the eth_stats, and which counters are relegated to the eth_xstats. It doesn't look like the Interfaces MIB (IF-MIB) or even the etherStats MIB drives this selection. The ifOutQLen in the IF-MIB is deprecated; I guess it is not important for network monitoring. But fast access to the queue lengths are obviously useful for a fast path application with RED or other intelligent queue overflow handling mechanisms, so in my mind they are useful here. -Morten