[ovs-dev] [bond megaflow v4 3/4] dpif-netdev: user space datapath recirculation

Andy Zhou azhou at nicira.com
Tue May 13 04:39:14 UTC 2014


Their is no use case of partial mask in the user space.

Now that both user space and kernel data path always export recirc_id
and dp_hash, may be we can drop the else if (is_mask) case
for recirc_id?

On Mon, May 12, 2014 at 4:00 PM, Joe Stringer <joe at wand.net.nz> wrote:
> On 25 March 2014 14:58, Andy Zhou <azhou at nicira.com> wrote:
>>
>>      /* Metadata. */
>> +    if (present_attrs & (UINT64_C(1) << OVS_KEY_ATTR_RECIRC_ID)) {
>> +        flow->recirc_id = nl_attr_get_u32(attrs[OVS_KEY_ATTR_RECIRC_ID]);
>> +        expected_attrs |= UINT64_C(1) << OVS_KEY_ATTR_RECIRC_ID;
>> +    } else if (is_mask) {
>> +        /* Always exact match recirc_id when datapath does not sepcify
>> it. */
>> +        flow->recirc_id = UINT32_MAX;
>> +    }
>> +
>> +    if (present_attrs & (UINT64_C(1) << OVS_KEY_ATTR_DP_HASH)) {
>> +        flow->dp_hash = nl_attr_get_u32(attrs[OVS_KEY_ATTR_DP_HASH]);
>> +        expected_attrs |= UINT64_C(1) << OVS_KEY_ATTR_DP_HASH;
>> +    }
>>      if (present_attrs & (UINT64_C(1) << OVS_KEY_ATTR_PRIORITY)) {
>>          flow->skb_priority =
>> nl_attr_get_u32(attrs[OVS_KEY_ATTR_PRIORITY]);
>>          expected_attrs |= UINT64_C(1) << OVS_KEY_ATTR_PRIORITY;
>
>
> What's the reasoning behind the "else if (is_mask)" case for recirc_id, and
> why does this not apply to dp_hash?



More information about the dev mailing list