Pushed to master,

  Jarno

On Dec 11, 2013, at 10:36 AM, Ben Pfaff <[email protected]> wrote:

> On Mon, Dec 09, 2013 at 06:35:57PM -0800, Jarno Rajahalme wrote:
>> Normally OVS userspace supplies a mask along with a flow key for each
>> new data path flow that should be created.  OVS also provides an
>> option to disable the kernel wildcarding, in which case the flows are
>> created without a mask.  When kernel wildcarding is disabled, the
>> datapath should use exact match, i.e. not wildcard any bits in the
>> flow key.  Currently, what happens with the userspace datapath instead
>> is that a datapath flow with mostly empty mask is created (i.e., most
>> fields are wildcarded), as the current code does not examine the given
>> mask key length to find out that the mask key is actually empty.  This
>> results in the same datapath flow matching on packets of multiple
>> different flows, wrong actions being processed, and stats being
>> incorrect.
>> 
>> This patch refactors userspace datapath code to explicitly initialize
>> a suitable exact match mask when a flow put without a mask is
>> executed.
>> 
>> Signed-off-by: Jarno Rajahalme <[email protected]>
>> 
>> v6: - Unwildcard all fields whose prerequisities are met, add test case
>>      to prevent future regressions.
>> 
>> v5: - Split dpif_netdev_flow_mask_from_nlattrs() to
>>      dpif_netdev_flow_from_nlattrs() and dpif_netdev_mask_from_nlattrs()
>>      and make the latter to require non-zero mask_key_len.
>>    - Make dp_netdev_flow_add() to initialize an exact match mask if no
>>      wildcards are given.  This reflects the kernel datapath behavior.
> 
> Acked-by: Ben Pfaff <[email protected]>

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to