tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Using event counters with network interfaces, is there a reason they're all ifdefed out of mainline use?

On Sun, Dec 11, 2011 at 11:24:45AM -0800, Brian Buhrow wrote:
>       hello.  I'm interested in seeing detailed errors like CRC, frame,
> underrun and overrun error counts.  Further investigation reveals that
> drivers that came later in the game, i.e. nfe(4) and age(4)  don't have
> latent support for these counters, but it looks fairly easily added.

I think it's up to the driver's author discretion, and maybe debugging
history (I remember adding such counters to a driver for debugging

>       While I understand performance considerations are necessary, the
> counters I'm proposing to add should be fairly low frequency events, since
> we already count bytes and packets in and out, and if the performance of
> the event counters infrastructure were really a problem, we should be
> taking a hit because many of the interrupt counters are using it to keep
> their statistics. 

I don't think performances would be a problem, at last with modern nics,
because statistics are gathered internally by the NIC and the driver updates
its copy periodically, but not necesserely for each transmitted or received

> While I don't aspire to be like Linux, Linux does report
> these kinds of errors, as do most modern networking devices.  I think we
> should hav the capability of tracking such errors, and I think we can for
> little effort and almost no performance loss.
>       Since there's been some nervousness expressed to me about performance
> hits, I propose to do one driver at a time, do some testing of mine, then 
> commit
> those changes to the tree.  We can either set the COUNT_INTERFACE_EVENTS
> option to true at that time, or have a self selected group do some early
> testing.  However, it is my  wish to have this higher granularity of error
> tracking turned on by default in future releases of NetBSD.

If we want to add support for this, I'd suggest adding this to the statistics
reported by netstat -i, instead of driver-specific event counters.

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index