netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] vlan: GRO rx statistics
@ 2009-11-10 16:52 Eric Dumazet
  2009-11-13 16:41 ` Eric Dumazet
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Dumazet @ 2009-11-10 16:52 UTC (permalink / raw)
  To: David S. Miller; +Cc: Herbert Xu, Linux Netdev List

It seems vlan interfaces with hardware-assisted VLAN reception 
dont have rx statistics.

Following patch cures the problem for me but I have no idea
if it is correct ?

Another problem about all rx stats is about multi rx queues devices.
Several cpus can access these counters in parallel ?


diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 8d5ca2a..e13b007 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -89,6 +89,11 @@ vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp,
 	if (!skb->dev)
 		goto drop;
 
+	skb->dev->stats.rx_packets++;
+	skb->dev->stats.rx_bytes += skb->len;
+	if (skb->pkt_type == PACKET_MULTICAST)
+		skb->dev->stats.multicast++;
+
 	for (p = napi->gro_list; p; p = p->next) {
 		NAPI_GRO_CB(p)->same_flow =
 			p->dev == skb->dev && !compare_ether_header(

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-11-16  5:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-10 16:52 [RFC] vlan: GRO rx statistics Eric Dumazet
2009-11-13 16:41 ` Eric Dumazet
2009-11-13 16:44   ` Eric Dumazet
2009-11-14  1:27   ` Herbert Xu
2009-11-14  7:27     ` Eric Dumazet
2009-11-15 19:35     ` Eric Dumazet
2009-11-16  5:21       ` 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).