summaryrefslogtreecommitdiff
path: root/lib/odp-util.h
diff options
context:
space:
mode:
authorAndy Zhou <azhou@nicira.com>2014-04-17 23:13:46 -0700
committerAndy Zhou <azhou@nicira.com>2014-04-20 22:27:55 -0700
commitfbfe01de0dedaf6d5b909b1a977d1f8164243754 (patch)
tree058c337e412773c78803a35cfbb5e082f414bd93 /lib/odp-util.h
parent4a750708bc9b6d76d67d88cd1b7193a9c62fdb9e (diff)
downloadopenvswitch-fbfe01de0dedaf6d5b909b1a977d1f8164243754.tar.gz
odp-util: Always generate key/mask pair in netlink for recirc_id
Currently netlink flow (and mask) recirc_id attribute is only serialized when the recirc_id value is non-zero. For this logic to work correctly, the interpretation of the missing recirc_id depends on whether the datapath supports recirculation. This patch remove the ambiguity of the meaning of missing recirc_id attribute in netlink message. When recirc_id is non-zero, or when it is not a wildcard match, both key and mask attributes are serialized. On the other hand, when recirc_id is zero, and being wildcarded, they are not serialized. A missing recirc_id key and mask attribute thus should always be interpreted as wildcard, same as other flow fields. Signed-off-by: Andy Zhou <azhou@nicira.com> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Diffstat (limited to 'lib/odp-util.h')
-rw-r--r--lib/odp-util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/odp-util.h b/lib/odp-util.h
index 7bc64c7eb..0dfbccaa9 100644
--- a/lib/odp-util.h
+++ b/lib/odp-util.h
@@ -143,8 +143,8 @@ int odp_flow_from_string(const char *s,
const struct simap *port_names,
struct ofpbuf *, struct ofpbuf *);
-void odp_flow_key_from_flow(struct ofpbuf *, const struct flow *,
- odp_port_t odp_in_port);
+void odp_flow_key_from_flow(struct ofpbuf *, const struct flow * flow,
+ const struct flow *mask, odp_port_t odp_in_port);
void odp_flow_key_from_mask(struct ofpbuf *, const struct flow *mask,
const struct flow *flow, uint32_t odp_in_port,
size_t max_mpls_depth);