odp-util: Always generate key/mask pair in netlink for recirc_id
authorAndy Zhou <azhou@nicira.com>
Fri, 18 Apr 2014 06:13:46 +0000 (23:13 -0700)
committerAndy Zhou <azhou@nicira.com>
Mon, 21 Apr 2014 05:27:55 +0000 (22:27 -0700)
commitfbfe01de0dedaf6d5b909b1a977d1f8164243754
tree058c337e412773c78803a35cfbb5e082f414bd93
parent4a750708bc9b6d76d67d88cd1b7193a9c62fdb9e
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>
lib/dpif-netdev.c
lib/odp-util.c
lib/odp-util.h
ofproto/ofproto-dpif.c
tests/ofproto-dpif.at
tests/test-odp.c