ashaffer / rt3573sta

Patched version of this ralink driver to handle sk_buff structures properly on 64-bit systems
25 stars 25 forks source link

Wrong traffic totals reported by driver to kernel? #9

Open ricab opened 10 years ago

ricab commented 10 years ago

Using this driver for a netgear WDNA 4100, I get an inconsistency between total reported traffic for the interface and the sum of individual packets. I have confirmed the two results with several tools:

  1. the totals of Rx traffic are around a few Kb/s (~6kb)
    • confirmed with /proc/net/dev, dstat, bmw-ng, cbm, iptraf, ifstat, gnome-system-monitor
  2. connection/packet streams don't get anywhere close to that
    • confirmed with netstat, tcpdump, iftop, nethogs, iptraf

For instance, "watch -n 1 'cat /proc/net/dev'" shows the totals constantly increasing (~6Kb/s), while tcpdump shows periods of several seconds without any packet (the few packets that come through being mostly <100kb)

I am therefore let to suspect the driver reports wrong totals to the kernel. Would that make sense to you? Thanks!

(I made a post regarding this on http://unix.stackexchange.com/questions/114803/accounting-for-proc-net-dev-reported-traffic)

ricab commented 10 years ago

I meant "the few packets that come through being mostly <100b" (bytes instead of Kb)

maroviher commented 6 years ago

That is because this driver reports not the 802.3 statistics but 802.11 (all beacons from a connected BSSID let the totals constantly increasing (~6Kb/s) ). If you want to fix it, look here: https://github.com/maroviher/DPO_RT5572_LinuxSTA_2.6.1.3_20121022_mod/commit/81cddb83af73ccaf2b7e41dd2ef40b395ad3f42d

ricab commented 6 years ago

Nice, thanks. I am not using this nowadays, but still good to know.