All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevich@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>, netdev@vger.kernel.org
Subject: Re: Fw: [Bug 84951] New: 8021q: kernel doesn't take into account ethernet header bytes for received packets
Date: Wed, 24 Sep 2014 10:36:49 -0400	[thread overview]
Message-ID: <5422D701.7080505@gmail.com> (raw)
In-Reply-To: <20140922090134.3a114531@urahara>

On 09/22/2014 12:01 PM, Stephen Hemminger wrote:
> I am inclined to think this is something that is just an incorrect
> user expectation.

Looks like a valid bug.  vlan just uses skb->len which already had
the eth header stripped off, so it will always under-report 12 bytes
per packet.

-vlad

> 
> Begin forwarded message:
> 
> Date: Sun, 21 Sep 2014 11:47:22 -0700
> From: "bugzilla-daemon@bugzilla.kernel.org" <bugzilla-daemon@bugzilla.kernel.org>
> To: "stephen@networkplumber.org" <stephen@networkplumber.org>
> Subject: [Bug 84951] New: 8021q: kernel doesn't take into account ethernet header bytes for received packets
> 
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=84951
> 
>             Bug ID: 84951
>            Summary: 8021q: kernel doesn't take into account ethernet
>                     header bytes for received packets
>            Product: Networking
>            Version: 2.5
>     Kernel Version: 3.16.1
>           Hardware: All
>                 OS: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Other
>           Assignee: shemminger@linux-foundation.org
>           Reporter: g.djavadyan@gmail.com
>         Regression: No
> 
> Statistics exported by the kernel for received packets on 802.1q subinterfaces
> don't consider Ethernet header bytes (dst MAC, src MAC, type). Statistics for
> transmitted packets is not affected. The problem is more prominent on
> high-speed links (>100Mb/s), as networking tools (nload, iftop, ...) display
> lower bandwidth utilization (>5Mb/s difference) than a report from neighboring
> routing device (FreeBSD, Cisco). Also, someone monitoring Linux router
> interfaces will find that the router generates more information than it
> receives.
> 
> Tested on CentOS kernel 2.6.32-431.29.2.el6.x86_64 and vanilla 3.16.1 with
> drivers: bnx2, atl1c and igb.
> 
> How to reproduce:
> 
> 1. Create dot1q subinterfaces on two boxes (vconfig add eth0 4040).
> 2. Assign IP addresses to subinterfaces.
> 3. Check the connection using ping.
> 4. Check the output from ifconfig eth0.4040 or 'cat
> /sys/class/net/eth0.4040/statistics/rx_{packets,bytes}'.
> 5. Issue standard 56 byte payload ping using 'ping -c 1 neighboring_ip'.
> 6. Recheck statistics using step 4.
> 
> Expected results:
> 
> Received packets value should increase by 1 and received bytes value should
> increase by 98.
> 
> dst MAC - 6
> src MAC - 6
> ethertype - 2
> IP header - 20
> ICMP header - 8
> ICMP Payload - 56
> Total: 98 bytes.
> 
> 
> Actual results:
> 
> Received packets value increases by 1 and received bytes value increases by 84
> bytes.
> 

  reply	other threads:[~2014-09-24 14:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 16:01 Fw: [Bug 84951] New: 8021q: kernel doesn't take into account ethernet header bytes for received packets Stephen Hemminger
2014-09-24 14:36 ` Vlad Yasevich [this message]
2014-09-24 14:45 ` [PATCH] vlan: Fix receive statistics under-reporting Vladislav Yasevich
2014-09-24 15:08   ` Eric Dumazet
2014-09-24 16:45     ` Vlad Yasevich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5422D701.7080505@gmail.com \
    --to=vyasevich@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.