dect
/
linux-2.6
Archived
13
0
Fork 0

virtio: fix tx_ stats in virtio_net

get_buf() gives the length written by the other side, which will be
zero.  We want to add the skb length.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2008-05-02 21:50:43 -05:00
parent 5ef827526f
commit 655aa31f02
1 changed files with 1 additions and 1 deletions

View File

@ -221,7 +221,7 @@ static void free_old_xmit_skbs(struct virtnet_info *vi)
while ((skb = vi->svq->vq_ops->get_buf(vi->svq, &len)) != NULL) {
pr_debug("Sent skb %p\n", skb);
__skb_unlink(skb, &vi->send);
vi->dev->stats.tx_bytes += len;
vi->dev->stats.tx_bytes += skb->len;
vi->dev->stats.tx_packets++;
kfree_skb(skb);
}