mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
odp-util: Return exact mask if netlink mask attribute is missing.
In the ODP context an empty mask netlink attribute usually means that the flow should be an exact match. odp_flow_key_to_mask{,_udpif}() instead return a struct flow_wildcards with matches only on recirc_id and vlan_tci. A more appropriate behavior is to handle a missing (zero length) netlink mask specially (like we do in userspace and Linux datapath) and create an exact match flow_wildcards from the original flow. This fixes a bug in revalidate_ukey(): every flow created with megaflows disabled would be revalidated away, because the mask would seem too generic. (Another possible fix would be to handle the special case of a missing mask in revalidate_ukey(), but this seems a more generic solution).
This commit is contained in:
@@ -240,7 +240,7 @@ enum odp_key_fitness odp_flow_key_to_mask(const struct nlattr *mask_key,
|
||||
size_t mask_key_len,
|
||||
const struct nlattr *flow_key,
|
||||
size_t flow_key_len,
|
||||
struct flow *mask,
|
||||
struct flow_wildcards *mask,
|
||||
const struct flow *flow);
|
||||
|
||||
enum odp_key_fitness odp_flow_key_to_flow_udpif(const struct nlattr *, size_t,
|
||||
@@ -249,7 +249,7 @@ enum odp_key_fitness odp_flow_key_to_mask_udpif(const struct nlattr *mask_key,
|
||||
size_t mask_key_len,
|
||||
const struct nlattr *flow_key,
|
||||
size_t flow_key_len,
|
||||
struct flow *mask,
|
||||
struct flow_wildcards *mask,
|
||||
const struct flow *flow);
|
||||
|
||||
const char *odp_key_fitness_to_string(enum odp_key_fitness);
|
||||
|
Reference in New Issue
Block a user