On 10 Jan 2023, at 12:16, Farhan Tariq wrote:
> Hi OVS family,
>
> I have been working on offloading only the exact-match flows in case of
> disable-megaflows. We observed that when the megaflows are disabled and we
> add a rule without any mask for any match field, then mf_set_value() function
> is called
Note that the disable-megaflows option is an old switch used in the past when
megaflow support got added. I think no one in production is using this option,
nor are any of the self-tests being run with this.
> In this function the mask values of all the match fields are set to
> UINT_XX_MAX which eventually populates the 'struct match'.
>
> When mask values of certain members of the 'struct match' are checked in the
> 'test_key_and_mask()' function
> (https://github.com/openvswitch/ovs/blob/e5d92c1a54852e9b5912aa53417d1f64bfee9af2/lib/netdev-offload-tc.c#L1536),
> if any one of them is non-NULL, the function will return 'EOPNOTSUPP' and
> the rule will not be offloaded to tc-flower.
> For now, I have just commented out the function 'test_key_and_mask()' and I
> am able to offload the exact match flows.
Well TC can not offload those matches, so TC will not match against those
fields. So removing test_key_and_mask() function breaks OVS.
> My question is: Will this create any issue or am I breaking the functionality
> of the OVS? I have tested for few cases and I have seen the functionality is
> fine.
Yes, this will break HW offload for OVS with any of the test_key_and_mask() you
are now ignoring.
//Eelco
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev