On 2022-02-24 4:24 PM, Eelco Chaudron wrote:
On 23 Feb 2022, at 12:35, Roi Dayan wrote:
On 2022-02-23 11:31 AM, Eelco Chaudron wrote:
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
yes i read the discussion just wanted to be sure. just getting confused
with the commit msg "checks for none offloadable ct_state match flag
combinations".. it's checking for offloadable flags.
maybe remove the "none" ? maybe i'm reading it wrong.
Maybe it’s my English, I’m trying to say “check for ct_state flag combinations
that are not offloadable”.
If it really needs a change I can send out a v4, but if it’s the only change,
maybe Ilya can change it on commit.
I’ll wait a bit for more reviews, or Ilya’s comments if any.
//Eelco
ok. and its fine by me. thanks
Acked-by: Roi Dayan <[email protected]>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev