Petri Gynther 55868120a3 net: bcmgenet: fix dev->stats.tx_bytes accounting
1. Add bytes_compl local variable to __bcmgenet_tx_reclaim() to collect
   transmitted bytes. dev->stats updates can then be moved outside the
   while-loop. bytes_compl is also needed for future BQL support.
2. When bcmgenet device uses Tx checksum offload, each transmitted skb
   gets an extra 64-byte header prepended to it. Before this header is
   prepended to the skb, we need to save the skb "wire" length in
   GENET_CB(skb)->bytes_sent, so that proper Tx bytes accounting can
   be done in __bcmgenet_tx_reclaim().
3. skb->len covers the entire length of skb, whether it is linear or
   fragmented. Thus, when we clean the fragments, do not increase
   transmitted bytes.

Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file")
Signed-off-by: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-24 15:11:39 -04:00
..
2016-03-18 23:14:15 -04:00
2016-03-10 10:30:21 +01:00
2016-01-25 10:51:52 -08:00
2016-03-17 21:05:01 -04:00
2016-02-14 14:36:04 -08:00
2016-03-23 14:35:31 -04:00
2016-03-20 16:53:42 -04:00
2016-03-13 22:08:01 -04:00
2016-03-13 22:40:24 -04:00
2016-03-13 22:40:24 -04:00
2016-03-17 21:05:01 -04:00
2016-03-13 22:40:24 -04:00
2016-03-01 15:54:30 -05:00
2016-03-01 15:54:31 -05:00