On 23 Feb 2022, at 8:09, Roi Dayan wrote:
> On 2022-02-22 5:26 PM, Eelco Chaudron wrote:
>> This patch checks for none offloadable ct_state match flag combinations.
>> If they exist force the +trk flag down to TC Flower
>>
>> Signed-off-by: Eelco Chaudron <[email protected]>
>> ---
>> v3:
>> - Instead of warning about an invalid flag combination fix it.
>>
>> lib/netdev-offload-tc.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c
>> index 0105d883f..3d2c1d844 100644
>> --- a/lib/netdev-offload-tc.c
>> +++ b/lib/netdev-offload-tc.c
>> @@ -1541,6 +1541,12 @@ parse_match_ct_state_to_flower(struct tc_flower
>> *flower, struct match *match)
>> flower->key.ct_state &= ~(TCA_FLOWER_KEY_CT_FLAGS_NEW);
>> flower->mask.ct_state &= ~(TCA_FLOWER_KEY_CT_FLAGS_NEW);
>> }
>> +
>> + if (flower->key.ct_state &&
>> + !(flower->key.ct_state & TCA_FLOWER_KEY_CT_FLAGS_TRACKED)) {
>> + flower->key.ct_state |= TCA_FLOWER_KEY_CT_FLAGS_TRACKED;
>> + flower->mask.ct_state |= TCA_FLOWER_KEY_CT_FLAGS_TRACKED;
>> + }
>> }
>> if (mask->ct_zone) {
>>
>
> just to be sure, the check is if we have a ct state flag
> that can be offloaded but no +trk then force add +trk ?
> so any +state will always be with +trk ?
Yes correct. The TC framework in the kernel will only accept any other flags if
+trk is set. This makes sense, as these flags can only be set for a tracked
connection.
See also the discussion around this patch for the v2.
//Eelco
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev