RE: minor e1000 bug

From: Feldman, Scott
Date: Mon Dec 22 2003 - 14:31:39 EST


> This modification appears to somewhat remedy the problem, however,
> bandwidth measurement seems to be much more accurate with many other
> cards. By what method does, say, the 3c59x card export its
> statistics
> to /proc/net/dev that makes it easier to measure?

e100 and e1000 both query h/w for stats on a timer (2 seconds) and cache
the results. A call into the driver's get_stats function just returns
these cached values. With e100, there is a problem in that issuing the
command to dump stats doesn't return right away, so rather than blocking
in the driver by waiting for the command to complete, the driver just
reads the results of the dump command 2 seconds prior, and then reissues
a new dump command. So e100 stats are delayed by ~2 seconds.

3c59x (and others) query the h/w for stats in the driver's get_stats
function directly. This gives up-to-date stats. We could do this with
e1000, but it'll take a little bit of surgery because there is some
other code in the driver that is dependent on stats collected over 2
second period. Nothing that can't be fixed.

-scott
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/