[ovs-discuss] Vlan handling problem in Linux datapath

Ben Pfaff blp at nicira.com
Tue Mar 10 21:17:25 UTC 2015


On Mon, Mar 09, 2015 at 08:02:57PM -0400, Thomas F Herbert wrote:
> First apologies in advance for a lengthy message:
> 
> I have seen some strange vlan behavior where there is a miss-match
> on vlan tci. It can be reproduced on every commit I tried since
> version 2.3 but cannot be reproduced in version 2.2.
> 
> The example below is from commit
> 7cc398cb8561a16ae3be5ffc687be5620981d619 in the current master
> branch.
> 
> To reproduce set a specific rule to match on a particular tci. Every
> incoming packet with a miss-matched vlan tag will get the following
> error from the Linux datapath function ovs_nla_get_match():
> 
> [449232.750362] openvswitch: netlink: VLAN tag present bit must have
> an exact match (tci_mask=100).
> [449233.767975] openvswitch: netlink: VLAN tag present bit must have
> an exact match (tci_mask=100).
> [449234.765656] openvswitch: netlink: VLAN tag present bit must have
> an exact match (tci_mask=100).
> 
> This is the flow rule to reproduce the problem:
> 
> ovs-ofctl --protocols=OpenFlow13 add-flow br0
> in_port=2,vlan_tci=0x1e36,priority=20000,actions=pop_vlan,output:1
> 
> I believe that the miss matched packet is getting up-called but when
> the flow comes back to the kernel it doesn't have the mask set
> correctly in the netlink attributes so the kernel has trouble
> parsing it, the flow is never set in the kernel so every subsequent
> packet also misses.

Hmm.  It sounds like a bug, and it sounds like the solution would be
to make sure that if any bits in the VLAN tag are masked, then the
VLAN tag present bit is also masked, but I wasn't able to reproduce
the problem with either branch-2.3 or master with a few minutes'
experimentation.



More information about the discuss mailing list