From nobody@FreeBSD.org  Mon Jan  9 12:19:59 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0ECD7106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  9 Jan 2012 12:19:59 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id D79498FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  9 Jan 2012 12:19:58 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q09CJwVZ079171
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 9 Jan 2012 12:19:58 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q09CJw2u079170;
	Mon, 9 Jan 2012 12:19:58 GMT
	(envelope-from nobody)
Message-Id: <201201091219.q09CJw2u079170@red.freebsd.org>
Date: Mon, 9 Jan 2012 12:19:58 GMT
From: Eugen Konkov <Eugen.Konkov@freeline.in.ua>
To: freebsd-gnats-submit@FreeBSD.org
Subject: input packet for interface are counted twice
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         163955
>Category:       ports
>Synopsis:       input packet for interface are counted twice
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    stefan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 09 12:20:12 UTC 2012
>Closed-Date:    Thu May 02 09:35:38 UTC 2013
>Last-Modified:  Thu May 02 09:35:38 UTC 2013
>Originator:     Eugen Konkov
>Release:        9.0-RELEASE
>Organization:
ISP FreeLine
>Environment:
# uname -a
FreeBSD  9.0-RELEASE FreeBSD 9.0-RELEASE #0 r229830: Mon Jan  9 02:53:51 EET 2012     :/usr/obj/usr/src.svn/9.0.0/sys/KES_KERN_v9  i386

>Description:
input packets for interface are counted twice. packed are twiced for all interfaced in system.



>How-To-Repeat:
# get stat by snmp:

octetsIn:24526413 octetsOut:37921853 packetsIn:46927 packetsOut:72314

# ping -c 3 10.11.19.145
PING 10.11.19.145 (10.11.19.145): 56 data bytes
64 bytes from 10.11.19.145: icmp_seq=0 ttl=64 time=0.222 ms
64 bytes from 10.11.19.145: icmp_seq=1 ttl=64 time=0.393 ms
64 bytes from 10.11.19.145: icmp_seq=2 ttl=64 time=0.385 ms

--- 10.11.19.145 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.222/0.333/0.393/0.079 ms

octetsIn:24526707 octetsOut:37922147 packetsIn:46933 packetsOut:72317

diff:        294                 294               6                3

as you can notice octets are same, but input packets counted twice

# tcpdump -n -i vlan7
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vlan7, link-type EN10MB (Ethernet), capture size 65535 bytes
14:05:48.826901 IP 10.11.19.149 > 10.11.19.145: ICMP echo request, id 39685, seq 0, length 64
14:05:48.827092 IP 10.11.19.145 > 10.11.19.149: ICMP echo reply, id 39685, seq 0, length 64
14:05:49.827133 IP 10.11.19.149 > 10.11.19.145: ICMP echo request, id 39685, seq 1, length 64
14:05:49.827485 IP 10.11.19.145 > 10.11.19.149: ICMP echo reply, id 39685, seq 1, length 64
14:05:50.827370 IP 10.11.19.149 > 10.11.19.145: ICMP echo request, id 39685, seq 2, length 64
14:05:50.827718 IP 10.11.19.145 > 10.11.19.149: ICMP echo reply, id 39685, seq 2, length 64
^C
6 packets captured
6 packets received by filter
0 packets dropped by kernel

>Fix:
there were patch in current for vlan: output packets were not couted at all.
Maybe this is related issue

>Release-Note:
>Audit-Trail:

From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= <kes-kes@yandex.ru>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/163955: input packet for interface are counted twice
Date: Mon, 9 Jan 2012 14:59:07 +0200

 netstat statistic shows good counters, they are not twiced
 
 # ifconfig vlan7
 vlan7: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
         options=3<RXCSUM,TXCSUM>
         ether 00:30:67:5a:44:72
         inet 10.11.19.149 netmask 0xfffffff8 broadcast 10.11.19.151
         inet6 fe80::230:67ff:fe5a:4472%vlan7 prefixlen 64 scopeid 0x8
         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
         media: Ethernet autoselect (1000baseT <full-duplex>)
         status: active
         vlan: 7 parent interface: re0
 # netstat -iIb vlan7
 Name    Mtu Network       Address              Ipkts Ierrs Idrop    Opkts Oerrs  Coll
 meta-up# netstat -iI vlan7 -b
 Name    Mtu Network       Address              Ipkts Ierrs Idrop     Ibytes    Opkts Oerrs     Obytes  Coll
 vlan7  1500 <Link#8>      00:30:67:5a:44:72    24222     0     0   24630387    73420     0   38598435     0
 vlan7  1500 10.11.19.144/ 10.11.19.149         24189     -     -   24267751    73287     -   37563766     -
 vlan7  1500 fe80::230:67f fe80::230:67ff:fe        0     -     -          0        0     -          0     -
 meta-up# ping -c 1 10.11.19.145
 PING 10.11.19.145 (10.11.19.145): 56 data bytes
 64 bytes from 10.11.19.145: icmp_seq=0 ttl=64 time=0.300 ms
 
 --- 10.11.19.145 ping statistics ---
 1 packets transmitted, 1 packets received, 0.0% packet loss
 round-trip min/avg/max/stddev = 0.300/0.300/0.300/0.000 ms
 # netstat -iI vlan7 -b
 Name    Mtu Network       Address              Ipkts Ierrs Idrop     Ibytes    Opkts Oerrs     Obytes  Coll
 vlan7  1500 <Link#8>      00:30:67:5a:44:72    24223     0     0   24630485    73421     0   38598533     0
 vlan7  1500 10.11.19.144/ 10.11.19.149         24190     -     -   24267835    73288     -   37563850     -
 vlan7  1500 fe80::230:67f fe80::230:67ff:fe        0     -     -          0        0     -          0     -
 meta-up# ping -c 1 10.11.19.149
 PING 10.11.19.149 (10.11.19.149): 56 data bytes
 64 bytes from 10.11.19.149: icmp_seq=0 ttl=64 time=0.033 ms
 
 --- 10.11.19.149 ping statistics ---
 1 packets transmitted, 1 packets received, 0.0% packet loss
 round-trip min/avg/max/stddev = 0.033/0.033/0.033/0.000 ms
 # netstat -iI vlan7 -b
 Name    Mtu Network       Address              Ipkts Ierrs Idrop     Ibytes    Opkts Oerrs     Obytes  Coll
 vlan7  1500 <Link#8>      00:30:67:5a:44:72    24223     0     0   24630485    73421     0   38598533     0
 vlan7  1500 10.11.19.144/ 10.11.19.149         24191     -     -   24267919    73288     -   37563850     -
 vlan7  1500 fe80::230:67f fe80::230:67ff:fe        0     -     -          0        0     -          0     -
 
 but:
 is it right that input packet and octets are counted and no counts for
 output when dst is localhost?
 

From: Ryan Steinmetz <zi@FreeBSD.org>
To: Eugen Konkov <Eugen.Konkov@freeline.in.ua>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: ports/163955: input packet for interface are counted twice
Date: Tue, 10 Jan 2012 17:32:02 -0500

 Which SNMP daemon yields these results?
 
 Does this issue only surface whenever using subinterfaces (VLANs)?
State-Changed-From-To: open->feedback 
State-Changed-By: stefan 
State-Changed-When: Sun Apr 28 22:18:16 UTC 2013 
State-Changed-Why:  
Awaiting submitter's feedback. 


Responsible-Changed-From-To: freebsd-ports-bugs->stefan 
Responsible-Changed-By: stefan 
Responsible-Changed-When: Sun Apr 28 22:18:16 UTC 2013 
Responsible-Changed-Why:  
Track this while waiting for feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163955 

From: Stefan Walter <stefan@freebsd.org>
To: Eugen Konkov <Eugen.Konkov@freeline.in.ua>
Cc: Ryan Steinmetz <zi@FreeBSD.org>,
	GNATS <FreeBSD-gnats-submit@FreeBSD.org>
Subject: Re: ports/163955: input packet for interface are counted twice
Date: Mon, 29 Apr 2013 00:18:07 +0200

 Hello Eugen,
 
 there hasn't been any activity with your problem report (see [1]) for
 quite a while. What is the current state of things? Does the problem your
 described still exist, or should the PR be closed? If the problem still
 exists, please answer Ryan's questions in a followup to the PR so the
 problem can be investigated:
 
 > Which SNMP daemon yields these results?
 > 
 > Does this issue only surface whenever using subinterfaces (VLANs)?
 
 Best regards,
 Stefan
 
 [1]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/163955
State-Changed-From-To: feedback->closed 
State-Changed-By: stefan 
State-Changed-When: Thu May 2 09:35:11 UTC 2013 
State-Changed-Why:  
Submitter timeout (>1 year). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163955 
>Unformatted:
