* [PATCH] net/hyperv: rx_bytes should account the ether header size
@ 2012-01-30 8:14 Wei Yongjun
2012-02-01 19:30 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2012-01-30 8:14 UTC (permalink / raw)
To: davem; +Cc: haiyangz, kys, netdev
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
skb->len after call eth_type_trans() does not include the ether
header size, but rx_bytes should account it.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/net/hyperv/netvsc_drv.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 1a1ca6c..9dccc7a 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -298,7 +298,7 @@ int netvsc_recv_callback(struct hv_device *device_obj,
skb->ip_summed = CHECKSUM_NONE;
net->stats.rx_packets++;
- net->stats.rx_bytes += skb->len;
+ net->stats.rx_bytes += packet->total_data_buflen;
/*
* Pass the skb back up. Network stack will deallocate the skb when it
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net/hyperv: rx_bytes should account the ether header size
2012-01-30 8:14 [PATCH] net/hyperv: rx_bytes should account the ether header size Wei Yongjun
@ 2012-02-01 19:30 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-02-01 19:30 UTC (permalink / raw)
To: weiyj.lk; +Cc: haiyangz, kys, netdev
From: Wei Yongjun <weiyj.lk@gmail.com>
Date: Mon, 30 Jan 2012 16:14:02 +0800
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> skb->len after call eth_type_trans() does not include the ether
> header size, but rx_bytes should account it.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-01 19:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-30 8:14 [PATCH] net/hyperv: rx_bytes should account the ether header size Wei Yongjun
2012-02-01 19:30 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).