Hi. On 2022/07/22 23:22, Hisashi T Fujinaka wrote: > On Fri, 22 Jul 2022, SAITOH Masanobu wrote: > >> Module Name: src >> Committed By: msaitoh >> Date: Fri Jul 22 05:23:50 UTC 2022 >> >> Modified Files: >> src/sys/dev/pci: if_wm.c if_wmreg.h >> >> Log Message: >> Add more statistics countes. >> >> - Add many statics counters that the chip has. > > Shouldn't you say which "the chip" you're talking about since wm seems > to handle so many?
The current implementation is based on the FreeBSD and Linux. All counters I added to NetBSD are also counted on both FreeBSD and Linux. There are some difference between those two. I also noticed that some code are doubtful and wrote them the different way. To make the implementation perfect, I have to read (almost) all datasheets and test on some chips. It's not good to write only based on the datasheets. One of the reason is that, for example, a register is not listed in the statistics counters' table but the detail of the register is described later in the chapter. It's not clear whether the register is exist or not. The current implementation may not count some useful counters. The current implementation is not the final form but it's worth to have. I could have written the details of the current implementation when I committed, but I didn't really feel the need to write the details of the implementation in its half-way state. My apologies. Thanks. > I suppose this isn't git so you can't fix this easily. > >> - Attach event counters only if available. >> >> >> To generate a diff of this commit: >> cvs rdiff -u -r1.745 -r1.746 src/sys/dev/pci/if_wm.c >> cvs rdiff -u -r1.126 -r1.127 src/sys/dev/pci/if_wmreg.h >> >> Please note that diffs are not public domain; they are subject to the >> copyright notices on the relevant files. >> >> > -- ----------------------------------------------- SAITOH Masanobu (msai...@execsw.org msai...@netbsd.org)