ofproto: Move logic for collecting read-only rules into rule_criteria.
authorBen Pfaff <blp@nicira.com>
Mon, 9 Jun 2014 21:44:14 +0000 (14:44 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 12 Jun 2014 21:23:27 +0000 (14:23 -0700)
commitdd51dae29bccca39b3e01e2fe17b5b70049ef13f
tree2543b2c3eaf0cfd84c92bcd123b1dbdcd0c7b713
parent5e8b38b07f7bfc2bdfae6cb200ef6cf42c2c9aa8
ofproto: Move logic for collecting read-only rules into rule_criteria.

ofproto supports OpenFlow tables that the controller can view but not
modify.  Until now, the logic for this was separately implemented in each
flow table operation, which meant that it was somewhat error-prone and in
fact seems missing entirely for "delete" operations.  This commit
implements the "modify" and "delete" side of that logic in the common code
for collecting a group of rules to work on, thereby slightly simplifying
the somewhat tricky modify_flows__() function and fixing the bug in
deletion.

There isn't a good way to reuse this logic for "add" operations.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
ofproto/ofproto.c