[ovs-dev] [PATCH V2] odp-util: Make sure vlan tci mask has exact match for VLAN_CFI.

Ben Pfaff blp at nicira.com
Sun Jun 7 15:55:13 UTC 2015


On Sat, Jun 06, 2015 at 11:37:08PM -0700, Alex Wang wrote:
> OVS datapath has check which prevents the installation of flow
> that matches VLAN TCI but does not have exact match for VLAN_CFI
> bit.  To follow this rule, ovs userspace must make sure the
> flow key for datapath flow matching VLAN TCI has exact match for
> VLAN_CFI bit.
> 
> Before this commit, this is not enforced, so OpenFlow flow like
> "vlan_tci=0x000a/0x0fff,action=output:local" can generate datapath
> flow like "vlan(vid=5/0xfff,pcp=0/0x0,cfi=1/0)".
> 
> With the OVS datapath check, the installation of such datapath
> flow will be rejected with:
> "|WARN|system at ovs-system: failed to put[create][modify] (Invalid argument)"
> 
> This commit makes ovs userspace always exact match the VLAN_CFI
> bit if the flow matches VLAN TCI.
> 
> Reported-by: Ronald Lee <ronaldlee at vmware.com>
> Signed-off-by: Alex Wang <alexw at nicira.com>
> 
> ---
> PATCH->V2:
> - Fix careless testing.
> - Adopt Jarno's suggestions.

This is perfect.  It was actually my first thought at approach, but
somehow I got sidetracked.

Jarno, will you take a look too?

Acked-by: Ben Pfaff <blp at nicira.com>



More information about the dev mailing list