On 24/02/2022 14:06, Eelco Chaudron wrote:
> CAUTION: This message has originated from an External Source. Please use 
> proper judgment and caution when opening attachments, clicking links, or 
> responding to this email.
> 
> 
> On 24 Feb 2022, at 10:35, [email protected] wrote:
> 
>> From: Pieter Jansen van Vuuren <[email protected]>
>>
>> Previously when making use of the tc datapath to achieve decrement ttl, we 
>> would
>> install a filter that matches on the ttl/hoplimit field and use a pedit set 
>> action
>> to set the ttl/hoplimit to one less than the match value. This results in a 
>> filter
>> for each unique ttl value we want to decrement.
>>
>> This patch introduces true decrement ttl which makes use of the pedit add 
>> action.
>> Adding 0xff is equivalent to decrementing the ttl/hoplimit field. This also
>> improves the hardware offload case by reducing the number of filters 
>> required to
>> support decrement ttl. In order to utilise this, the following config option 
>> needs
>> to be set to true.
>>
> 
> Hi Pieter, I did not go through the entire patch, but the 
> OVS_ACTION_ATTR_DEC_TTL action already exists on the kernel size and has an 
> alternative set of actions that need to be called when the TTL hits 0 (or is 
> already zero).
> Note that this is a requirement and hence the match is needed to make sure we 
> handle the ttl is 1 and 0 case.
> 

Thank you for pointing that out.

> The OVS side implementation was partially done, as I was running into some 
> issues to make the alternative actions work and still be fully OpenFlow 
> compliant.
> See the last email in this patch:
> 
> https://patchwork.ozlabs.org/project/openvswitch/patch/162134902591.762107.15543938565196336653.st...@wsfd-netdev64.ntdv.lab.eng.bos.redhat.com/
> 
> My v5 preparation is here: https://github.com/chaudron/ovs/tree/dev/decttl
> 
> For TC we were looking at extending the pedit action to do some carry 
> detection, so we know we rolled over and have an alternative set of action. 
> Like the tc police actions, which I’m currently doing for the check_pkt_len 
> action.
> Some of that work is here: 
> https://github.com/chaudron/ovs/tree/dev/decttl_tc_davide
> 

Excellent, thank you. I will have a look into these.

> 
> So I think you might want to make the code below works for the TTL 1 and TTL 
> 0 cases, i.e., it’s taking the exception path, which quickly looking at the 
> code currently it’s not.

Yes, I will look at adding handling for the "TTL <= 1" case.

> 
> While you are @ it, you might want to add those test-cases to 
> system-offloads-traffic.at.

I will do.

> 
> Cheers,
> 
> 
> Eelco
>

Thank you Eelco for the speedy feedback on this.

<snip>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to