diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-03 04:50:43 +0200 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-02 13:50:44 +0200 |
commit | 655aa31f028c4498e8896576571ee1ea68dd26e0 (patch) | |
tree | e133f367535d97a6cbe65d95bd0174822a21e76f /drivers/net/virtio_net.c | |
parent | virtio: ignore corrupted virtqueues rather than spinning. (diff) | |
download | linux-655aa31f028c4498e8896576571ee1ea68dd26e0.tar.xz linux-655aa31f028c4498e8896576571ee1ea68dd26e0.zip |
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>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r-- | drivers/net/virtio_net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 555b70c8b863..1fd43e461ba5 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -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); } |