Skip to content

Commit

Permalink
net/hyperv: rx_bytes should account the ether header size
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Feb 1, 2012
1 parent a7ed07d commit 48c3883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/hyperv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48c3883

Please sign in to comment.