On 1/31/22 11:53, Eelco Chaudron wrote: > This patch checks for none offloadable ct_state match flag combinations. > If they exist tell the user about it once, and ignore the offload. > > Signed-off-by: Eelco Chaudron <[email protected]> > --- > lib/netdev-offload-tc.c | 18 +++++++++++++++--- > 1 file changed, 15 insertions(+), 3 deletions(-) > > diff --git a/lib/netdev-offload-tc.c b/lib/netdev-offload-tc.c > index 8135441c6..f3d1d3e61 100644 > --- a/lib/netdev-offload-tc.c > +++ b/lib/netdev-offload-tc.c > @@ -1478,14 +1478,14 @@ flower_match_to_tun_opt(struct tc_flower *flower, > const struct flow_tnl *tnl, > flower->mask.tunnel.metadata.present.len = tnl->metadata.present.len; > } > > -static void > +static int > parse_match_ct_state_to_flower(struct tc_flower *flower, struct match *match) > { > const struct flow *key = &match->flow; > struct flow *mask = &match->wc.masks; > > if (!ct_state_support) { > - return; > + return 0; > } > > if ((ct_state_support & mask->ct_state) == mask->ct_state) { > @@ -1541,6 +1541,13 @@ 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)) { > + VLOG_INFO_ONCE("For ct_state match offload to work, you must " > + "include +trk with any other flags set!");
Why should OVS care about that? Is it a workaround for a kernel bug? I mean, kernel should reject offload attempts for unsupported flag combinations. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
