I sent out a patch that should fix this: http://openvswitch.org/pipermail/dev/2014-December/049972.html
It will take some time, probably a few days, for it to get into the kernel and the OVS tree's kernel module. After that, I think you'll be ready to go. (However, the buggy behavior will still be present if a user upgrades userspace without upgrading their kernel module. I doubt that that is really a big deal though.) On Thu, Dec 11, 2014 at 12:36:51AM +0900, Motonori Shindo wrote: > Ben and Jesse, > > Thanks for picking this issue up. > > Although current behavior is not consistent in VLAN and no-VLAN cases, as far > as NetFlow concerns it doesn’t matter in fact because NetFlow only counts L3 > packet size anyway. > > Here’s the story. First, I wanted to fix an issue that OVS currently reports > L2 packet size, not L3 packet size in NetFlow flow records (NetFlow should > report L3 packet size). I thought the easiest way to fix this problem was to > subtract the ethernet header length when reporting a NetFlow flow record. > Then, I realized that I should also take VLAN header into account if it is > present. I checked how NetFlow behaves in VLAN case and no-VLAN case and > found out that OVS reports the same packet size in NetFlow regardless to the > presence of VLAN header. > > Once this packet size issue related to VLAN header gets solved by someone > else (as this is probably beyond of my understanding of the relevant code), I > will work on fixing the L2 vs L3 packet size issue specifically in NetFlow. > > Regards, > > On 2014/12/09 3:22, "Jesse Gross" <je...@nicira.com > <mailto:je...@nicira.com>> wrote: > > On Mon, Dec 8, 2014 at 9:58 AM, Ben Pfaff <b...@nicira.com > <mailto:b...@nicira.com>> wrote: > Motonori Shindo (CCed) reported to me recently that NetFlow does not > include VLAN headers in the byte counts that it exports. Taking a > look at the kernel datapath code, I see that ovs_flow_stats_update() > accounts raw skb->len to byte counters. I suspect that it should add > 4 if a VLAN header was present but removed by VLAN acceleration. > > Presumably we should also do this for port stats as well to be consistent. > > > > --- > Motonori Shindo _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev