On 21 Mar 2022, at 10:07, Ilya Maximets wrote:
> On 2/17/22 13:27, Ilya Maximets wrote:
>> On 1/31/22 11:34, Eelco Chaudron wrote:
>>> The parse_key_and_mask_to_match() is a function to translate
>>> a netlink formatted key/mask to match structure. And should
>>> not consider any configuration setting when translating.
>>>
>>> Signed-off-by: Eelco Chaudron <[email protected]>
>>> ---
>>> lib/odp-util.c | 41 ++++++++++++++++++++++++++++-------------
>>> 1 file changed, 28 insertions(+), 13 deletions(-)
>>
>> <snip>
>>
>>> @@ -7540,7 +7554,8 @@ parse_key_and_mask_to_match(const struct nlattr *key,
>>> size_t key_len,
>>> {
>>> enum odp_key_fitness fitness;
>>>
>>> - fitness = odp_flow_key_to_flow(key, key_len, &match->flow, NULL);
>>> + fitness = odp_flow_key_to_flow__(key, key_len, &match->flow,
>>> &match->flow,
>>> + NULL, true);
>>> if (fitness) {
>>> /* This should not happen: it indicates that
>>> * odp_flow_key_from_flow() and odp_flow_key_to_flow() disagree on
>>> @@ -7561,8 +7576,8 @@ parse_key_and_mask_to_match(const struct nlattr *key,
>>> size_t key_len,
>>> return EINVAL;
>>> }
>>>
>>> - fitness = odp_flow_key_to_mask(mask, mask_len, &match->wc,
>>> &match->flow,
>>> - NULL);
>>> + fitness = odp_flow_key_to_mask__(mask, mask_len, &match->wc,
>>> &match->flow,
>>> + NULL, false);
>>
>> Should there be 'true'? Doesn't seem right to ignore the limit for keys, but
>> not for a mask.
>
> Hi, Eelco.
>
> I don't see a reply to this comment. Did you miss it?
Yes, I missed it, and you are right for correct operations this should also
have been true! However, this brought up another issue :)
I will send out an updated patch soon fixing both, will send it as a separate
v4 patch.
//Eelco
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev