ofp-util: Abstract flow_mod OFPFF_* flags.
authorBen Pfaff <blp@nicira.com>
Mon, 26 Aug 2013 23:23:50 +0000 (16:23 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 27 Aug 2013 20:23:01 +0000 (13:23 -0700)
commit0fb88c18fb26dcbe353501d346ac03295d552b36
tree00ac80cafd80d2e499b512b55ad0333990cc2779
parent994c997345100f1868d8fbee508443475c556439
ofp-util: Abstract flow_mod OFPFF_* flags.

The OFPFF_* flags used in flow_mods are just confusing enough that it
seems worthwhile to try to abstract them out.  In particular:

    * OFPFF_EMERG was introduced in OF1.0, deleted in OF1.1, and then
      its bit was reused for a different purpose in OF1.2.

    * OFPFF_RESET_COUNTS was introduced in OF1.2 but the semantics that it
      specifies are implied by "add" commands in earlier versions, so
      proper translation requires the OpenFlow version number and flow_mod
      command.

This commit does the abstraction.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/learn.c
lib/ofp-actions.h
lib/ofp-errors.h
lib/ofp-parse.c
lib/ofp-print.c
lib/ofp-util.c
lib/ofp-util.h
ofproto/ofproto.c
utilities/ovs-ofctl.c