>> 
>> 
>> +    /* Metadata. */
>>      if (md) {
>> -        flow->tunnel = md->tunnel;
>> -        flow->in_port = md->in_port;
>> -        flow->skb_priority = md->skb_priority;
>> -        flow->pkt_mark = md->pkt_mark;
>> -        flow->recirc_id = md->recirc_id;
>> -        flow->dp_hash = md->dp_hash;
>> +        if (md->tunnel.ip_dst) {
>> +            miniflow_push_words(mf, tunnel, &md->tunnel,
>> +                                sizeof md->tunnel / 4);
>> +        }
>> +        miniflow_push_uint32_check(mf, skb_priority, md->skb_priority);
>> +        miniflow_push_uint32_check(mf, pkt_mark, md->pkt_mark);
>> +        miniflow_push_uint32_check(mf, recirc_id, md->recirc_id);
>> +        miniflow_push_uint32(mf, in_port, odp_to_u32(md->in_port.odp_port));
>>      }
> 
> ... 
> 
>>          }
>>      }
>> +    if (md) {
>> +        miniflow_push_uint32_check(mf, dp_hash, md->dp_hash);
>> +    }
>> + out:
>> +    dst->map = mf.map;
>>  }
> 
> Was there a particular reason for shifting the dp_hash part to the end of the 
> function here, rather than having it grouped with the other metadata fields? 

The only reason is that we push the miniflow data in order. I actually proposed 
moving the dp_hash up with the other metadata in struct flow, so that it could 
be pushed together with the other metadata, but did not follow through. I'll 
send a patch to do that.

  Jarno

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to