Messages in this thread | | | Date | Tue, 28 Jun 2022 10:45:04 +0200 | From | Oleksij Rempel <> | Subject | Re: [PATCH net-next v1 2/3] net: dsa: ar9331: add support for pause stats |
| |
On Tue, Jun 28, 2022 at 09:22:53AM +0200, Andrew Lunn wrote: > > Yeah, the corrections are always iffy. I understand the doubts, and we > > can probably leave things "under-specified" until someone with a strong > > preference comes along. But I hope that the virt example makes it clear > > that neither of the choices is better (SR-IOV NICs would have to start > > adding the pause if we declare rtnl stats as inclusive). > > > > I can see advantages to both counting (they are packets) and not > > counting those frames (Linux doesn't see them, they get "invented" > > by HW). > > > > Stats are hard. > > I doubt we can define it either way. I once submitted a patch for one > driver to make it ignore CRC bytes. It then gave the exact same counts > as another hardware i was using, making the testing i was doing > simpler. > > The patch got rejected simply because we have both, with CRC and > without CRC, neither is correct, neither is wrong. > > So i would keep it KISS, pause frames can be included, but i would not > go to extra effort to include them, or to exclude them.
After I started investigating this topic, I was really frustrated. It is has hard to find what is wrong: my patch is not working and flow controller is not triggered? Or every HW/driver implements counters in some own way. Same is about byte counts: for same packet with different NICs i have at least 3 different results: 50, 64 and 68. It makes testing and validation a nightmare.
Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
| |