cs89x0 collect tx_bytes statistics.
A message that is not in the archive (sent off-list or not yet received): 1119948144.10852.10.camel@icampbell-debian
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Andrew Morton
Quoted 3 lines · Ian Campbell
The cs89x0 driver does not collect
tx_bytesstatistics which breaks traffic monitoring on my firewall.The patch looks odd. It records the length of the current outgoing frame in the device-global netdev structure and then, at tx interupt time it adds that value into the stats field.
Why not just do:
I finally got a hold of the device I needed to test this and it works fine, not that anyone would have expected differently...
Signed-off-by Ian Campbell <[email protected]>
%patch
drivers/net/cs89x0.c +1 -0
@@ -1450,6 +1450,7 @@/* Write the contents of the packet */ outsw (dev->base_addr +TX_FRAME_PORT ,skb->data,(skb->len+1 ) >>1 );spin_unlock_irq (&lp->lock); + lp->stats.tx_bytes += skb->len; dev->trans_start = jiffies;dev_kfree_skb (skb);
Signature · 7 lines
Ian Campbell Current Noise: Enslaved - Return to Yggdrasill Dentist, n.: A Prestidigitator who, putting metal in one's mouth, pulls coins out of one's pockets. -- Ambrose Bierce, "The Devil's Dictionary"