projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ef8275
)
virtio: fix tx_ stats in virtio_net
author
Rusty Russell
<rusty@rustcorp.com.au>
Sat, 3 May 2008 02:50:43 +0000
(21:50 -0500)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Fri, 2 May 2008 11:50:44 +0000
(21:50 +1000)
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>
drivers/net/virtio_net.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/virtio_net.c
b/drivers/net/virtio_net.c
index 555b70c8b8635226a1fa295c7334d5d70c34f939..1fd43e461ba572d750712b00cf5a37ccc1a44998 100644
(file)
--- 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);
}