Subject: Question about octet input and output counts on vlan interfaces
To: None <tech-kern@netbsd.org>
From: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
List: tech-kern
Date: 12/13/2006 13:33:26
	Hello.  I have   a machine using the wm(4) ethernet driver, with a
series of vlan subinterfaces setup as children of the interface driven by
the wm(4) driver.  I also hav altq turned on, in case it matters.  This is
under NetBSD-3.


	Allo works fine, but the output  of netstat  -bin against the vlan
interfaces seems to show that the output byte counters are not getting
updated properly as traffic goes out the vlan interface.  A look at
if_vlan.c shows that ibytes and obytes are never updated in the ifp
structure inside the if_vlan.c file itself.  Neither are they updated in
the if_wm.c driver file.  They are updated in the if_ethersubr.c, in
ether_input() and ether_output(), which makes some sense, but here's the
problem.  The output byte counters do increment, just not in line with the
actual amount of traffic being generated.  Has anyone else run into this
problem, and, if so, has it been fixed?  If not, I'm happy to fix it, but I
need some pointers on how, exactly, the vlan interfaces get attached to
their parents, and how the tethernet routines get tied  in.

Any followups would be greatly appreciated.
-thanks
-Brian