statistics counters

Robbie Dinn robbie@microbus.co.uk
Fri Dec 17 07:04:15 1999


Hi all,
does anyone know how to convince the intel 82557/8/9 to
dump out the *extended* statistics counters?

I am trying to debug some faulty hardware based on 82558. I
am getting occasional network errors. (The errors also show up
when using a diagnostic program running under MSDOG). To try
to help track the errors down, I added some code to the v1.06
eepro100.c driver (from linux 2.2.12)

These changes allow you to examine the statistical counters
by reading a file in the /proc filesystem.

To do this, I stole some example code from some other
drivers (irda) and added it to the eepro100.c driver.
To my great surprise it worked ! :)

I know that you can already get error counts for the network
interfaces by running 'ifconfig', but I thought that the
registers in the intel ethernet chip would give me a more
detailed picture of what is going on.

Would anyone like me to provide a patch? Is it appropriate
for me to mail a patch to this list? (The patch is about
about 11K)

NB I don't think you want this additional code in a production
driver. It is definitely 'kernel bloat' and it is possible
(probable) that I have introduced new bugs.

However it might be of use to someone.

I would like to make a further change to the driver.

Currently the driver only dumps the first 16 stats
counters. However I read in the 82559 hardware datasheet
that the chip can be made to spit out 19 counters by clearing
the 'Extended statistical counters configuration bit' when
configuring the chip following a reset.

Unfortunately I don't know where this bit lives, because it
is not documented in the hardware datasheet. You need the
intel 82559 software developers manual for that, but it's
not available on the intel web site (at least I can't find it!).

I suspect that it might just involve changing a bit in the
array 'const char i82558_config_cmd[]' in the source code,
(and increasing the size of the area where the stats get dumped)
but without the intel data I am kind of stuck.

Can anyone give me a hint?