Date: Sat, 21 Oct 2000 14:36:20 +0400 (MSD) From: yar@comp.chem.msu.su To: FreeBSD-gnats-submit@freebsd.org Subject: kern/22178: Output byte counter on VLAN parent not advancing Message-ID: <200010211036.e9LAaKB00424@yar.chem.msu.su>
next in thread | raw e-mail | index | archive | help
>Number: 22178 >Category: kern >Synopsis: Output byte counter on VLAN parent not advancing >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Oct 21 03:40:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Yar Tikhiy >Release: FreeBSD 4.1-STABLE i386 >Organization: Moscow State University >Environment: The bug shows up in all branches. >Description: While the output packet counter on an ethernet interface is incremented by its hardware driver, the output byte and output multicast counters are advanced by ether_output(). However, when an ethernet interface acts as a parent for a set of VLAN interfaces, ether_output() is bypassed for it. Therefore, it's a duty of vlan_start() to update the counters. Additionally, the output packet counter of the vlan interface itself is advanced at a wrong place: even if p->if_start() isn't called due to the IFF_OACTIVE flag, the packet has already been enqueued for transmission and will be sent out. >How-To-Repeat: Use the vlan driver and see zero output byte counter on its parent interface with "netstat -i" >Fix: --- if_vlan.c.orig Sat Oct 21 14:13:01 2000 +++ if_vlan.c Sat Oct 21 14:21:58 2000 @@ -269,10 +269,12 @@ continue; } IF_ENQUEUE(&p->if_snd, m); - if ((p->if_flags & IFF_OACTIVE) == 0) { + ifp->if_opackets++; + p->if_obytes += m->m_pkthdr.len; + if (m->m_flags & M_MCAST) + p->if_omcasts++; + if ((p->if_flags & IFF_OACTIVE) == 0) p->if_start(p); - ifp->if_opackets++; - } } ifp->if_flags &= ~IFF_OACTIVE; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010211036.e9LAaKB00424>