On 9/16/24 17:59, Adrián Moreno wrote:
> On Mon, Sep 02, 2024 at 10:14:34AM GMT, Eelco Chaudron via discuss wrote:
>> Hi,
>>
>> I’m not an expert in this area, but I can see the metadata is explicitly
>> cleared when traffic goes over a patch port.
>>
>> https://github.com/openvswitch/ovs/blob/0051785f00c52cbbc2897989a454a5512e82dce0/ofproto/ofproto-dpif-xlate.c#L4131
>>
>> If I go over the Git history, I can see this has always been the case since
>> the introduction in commit 0a740f48293e.
>>
>> It also explicitly mentions this:
>>
>>     /* If 'struct flow' gets additional metadata, we'll need to zero it out
>>      * before traversing a patch port. */
>>
>> So I assume the documentation might be off, or the commit was wrong (and
>> it’s a bug), or there is another reason. Maybe Ilya or others know, as this
>> was done 12 years ago :)
> 
> My 2 cents:
> 
> The documentation says regarding REGISTER fields:
> "
>        These fields give an OpenFlow switch space for temporary storage
>        while the pipeline is running. Whereas metadata fields can have a
>        meaningful initial value and can persist across some hops across
>        OpenFlow switches, registers are always initially 0 and their
>        values never persist across inter-switch hops (not even across
>        patch ports).
> "
> 
> I think the documentation refers to METADATA Fields, not the REGISTER
> field that is (very confusingly) called "metadata". IIUC, it refers to
> the following fields:
>     in_port
>     in_port_oxm
>     skb_priority
>     pkt_mark
>     actset_output
>     packet_type

Yeah, only above fields may be preserved and the OXM_OF_METADATA is
a register and not a metadata field.  Unfortunate naming.

> 
> From these, the only field that is treated specially when a packet
> traverses a patch port to another bridge is "in_port" that is set to
> such patch port.
> 
> Thanks.
> Adrián
> 
>>
>> Cheers,
>>
>> Eelco
>>
>>
>> On 30 Aug 2024, at 4:27, 征途 via discuss wrote:
>>
>>> hello,In the ovs fields documentation, it says that metadata can retain
>>> values across the ovs bridge
>>>
>>>
>>> https://man7.org/linux/man-pages/man7/ovs-fields.7.html#METADATA_FIELDS
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> But in my tests, it doesn't seem to retain the value, can you help us to
>>> answer the design in the first place?
>>> Does metadata support retention of values across the ovs bridge or
>>> not?thanks.
>>
>>> _______________________________________________
>>> discuss mailing list
>>> disc...@openvswitch.org
>>> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
> 
>> _______________________________________________
>> discuss mailing list
>> disc...@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
> 

_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to