summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <hawk@comx.dk>2008-12-18 19:50:49 -0800
committerDavid S. Miller <davem@davemloft.net>2008-12-18 22:27:40 -0800
commitb8a606b871d37e03b92be1bd3deedeee97ea4f13 (patch)
treebece6e16df238b560ea1dec04e30c2080b3eca94 /samples
parent5664dd5561850df580414783cf3c8e0aa834c62e (diff)
NIU: Implement discard counters
Implementing discard counters for the NIU driver turned out to be more complicated than first assumed. The discard counters for the NIU neptune chip are only 16-bit (even though this is a 64-bit chip). These 16-bit counters can overflow quickly, especially considering this is a 10Gbit/s ethernet card. The overflow indication bit is, unfortunatly, not usable as the counter value does not wrap, but remains at max value 0xFFFF. Resulting in lost counts until the counter is reset. The read and reset scheme also poses a problem. Both in theory and in practice counters can be lost in between reading nr64() and clearing the counter nw64(). For this reason, the number of counter clearings nw64() is limited/reduced. On the fast-path the counters are only syncronized once it exceeds 0x7FFF. When read by userspace, its syncronized fully. Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions