diff options
author | Ben Pfaff <blp@nicira.com> | 2010-11-10 14:39:54 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-11-22 10:11:40 -0800 |
commit | d8ae4d672673cd72285eb405a96b4ac3590a7639 (patch) | |
tree | fb6c030b086cc5f2b492d3c4411d12d81c9093b3 /include/openvswitch/types.h | |
parent | 844dff325b1f6a6f520fce9242c85162275ab7ad (diff) | |
download | openvswitch-d8ae4d672673cd72285eb405a96b4ac3590a7639.tar.gz |
flow: Fully separate flow_wildcards from OpenFlow wildcard bits.
Originally, wildcards were just the OpenFlow OFPFW_* bits. Then, when
OpenFlow added CIDR masks for IP addresses, struct flow_wildcards was born
with additional members for those masks, derived from the wildcard bits.
Then, when OVS added support for tunnels, we added another bit
NXFW_TUN_ID that coexisted with the OFPFW_*. Later we added even more bits
that do not appear in the OpenFlow 1.0 match structure at all. This had
become really confusing, and the difficulties were especially visible in
the long list of invariants in comments on struct flow_wildcards.
This commit cleanly separates the OpenFlow 1.0 wildcard bits from the
bits used inside Open vSwitch, by defining a new set of bits that are
used only internally to Open vSwitch and converting to and from those
wildcard bits at the point where data comes off or goes onto the wire.
It also moves those functions into ofp-util.[ch] since they are only for
dealing with OpenFlow wire protocol now.
Diffstat (limited to 'include/openvswitch/types.h')
-rw-r--r-- | include/openvswitch/types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/openvswitch/types.h b/include/openvswitch/types.h index 2f670c042..fbd2997b3 100644 --- a/include/openvswitch/types.h +++ b/include/openvswitch/types.h @@ -21,8 +21,10 @@ #ifdef __CHECKER__ #define OVS_BITWISE __attribute__((bitwise)) +#define OVS_FORCE __attribute__((force)) #else #define OVS_BITWISE +#define OVS_FORCE #endif /* The ovs_be<N> types indicate that an object is in big-endian, not |