[ovs-dev] [PATCH v2 1/2] dpif-netdev: Exact match non-presence of vlans.

Jarno Rajahalme jrajahalme at nicira.com
Sat Sep 19 00:49:38 UTC 2015


> On Sep 18, 2015, at 2:59 PM, Ben Pfaff <blp at nicira.com> wrote:
> 
> On Tue, Sep 15, 2015 at 04:54:20PM -0700, Jarno Rajahalme wrote:
>> The Netlink encoding of datapath flow keys cannot express wildcarding
>> the presence of a VLAN tag. Instead, a missing VLAN tag is interpreted
>> as exact match on the fact that there is no VLAN.  This makes reading
>> datapath flow dumps confusing, since for everything else, a missing
>> key value means that the corresponding key was wildcarded.
>> 
>> Unless we refactor a lot of code that translates between Netlink and
>> struct flow representations, we have to do the same in the userspace
>> datapath.  This makes at least the flow install logs show that the
>> vlan_tci field is matched to zero.  However, the datapath flow dumps
>> remain as they were before, as they are performed using the netlink
>> format.
>> 
>> Add a test to verify that packet with a vlan will not match a rule
>> that may seem wildcarding the presence of the vlan tag.  Applying this
>> test without the userspace datapath modification showed that the
>> userspace datapath failed to create a new datapath flow for the VLAN
>> packet before this patch.
>> 
>> This fix may be needed in the Windows datapath as well.
> 
> The Windows datapath uses Netlink, like the Linux kernel datapath.  Is
> there a reason to believe that it gets this wrong somehow anyway?
> 

I forgot that the Windows datapath currently does not support megaflows, so it is exact matching everything. When megaflow support is implemented there, vlan mask must default to 0xffff, though.

>> Reported-by: Tony van der Peet <tony.vanderpeet at gmail.com <mailto:tony.vanderpeet at gmail.com>>
>> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com <mailto:jrajahalme at nicira.com>>
> 
> Acked-by: Ben Pfaff <blp at nicira.com <mailto:blp at nicira.com>>

I removed the Windows datapath comment and pushed this to master.

Thanks for the review!

  Jarno




More information about the dev mailing list