Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Count up parent's obytes and omcasts counters
details: https://anonhg.NetBSD.org/src/rev/9723cb989229
branches: trunk
changeset: 337540:9723cb989229
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Sat Apr 18 18:32:16 2015 +0000
description:
Count up parent's obytes and omcasts counters
PR kern/49837
diffstat:
sys/net/if_vlan.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 1e75105c48c7 -r 9723cb989229 sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Sat Apr 18 17:00:09 2015 +0000
+++ b/sys/net/if_vlan.c Sat Apr 18 18:32:16 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vlan.c,v 1.80 2015/03/29 13:30:43 ozaki-r Exp $ */
+/* $NetBSD: if_vlan.c,v 1.81 2015/04/18 18:32:16 ozaki-r Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.80 2015/03/29 13:30:43 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.81 2015/04/18 18:32:16 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -836,6 +836,10 @@
}
ifp->if_opackets++;
+
+ p->if_obytes += m->m_pkthdr.len;
+ if (m->m_flags & M_MCAST)
+ p->if_omcasts++;
if ((p->if_flags & (IFF_RUNNING|IFF_OACTIVE)) == IFF_RUNNING)
(*p->if_start)(p);
}
Home |
Main Index |
Thread Index |
Old Index