X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-util.h;h=7c2803461d33375d3bf0ef8aa8d6f8f1d17dde05;hb=6dc5374435cc25bc4051b27bd52635e609a8872a;hp=298d595eff762c5ded19b235517665e4ebd4cdaf;hpb=5deff5aa263a72a99141e95e50821f77bc687f15;p=sliver-openvswitch.git diff --git a/lib/ofp-util.h b/lib/ofp-util.h index 298d595ef..7c2803461 100644 --- a/lib/ofp-util.h +++ b/lib/ofp-util.h @@ -170,13 +170,15 @@ void ofputil_format_version_bitmap_names(struct ds *msg, uint32_t bitmap); uint32_t ofputil_protocols_to_version_bitmap(enum ofputil_protocol); enum ofputil_protocol ofputil_protocols_from_version_bitmap(uint32_t bitmap); -/* Bitmap of OpenFlow versions that Open vSwitch supports. */ -#define OFPUTIL_SUPPORTED_VERSIONS \ - ((1u << OFP10_VERSION) | (1u << OFP12_VERSION) | (1u << OFP13_VERSION)) - -/* Bitmap of OpenFlow versions to enable by default (a subset of - * OFPUTIL_SUPPORTED_VERSIONS). */ -#define OFPUTIL_DEFAULT_VERSIONS (1u << OFP10_VERSION) +/* Bitmaps of OpenFlow versions that Open vSwitch supports, and that it enables + * by default. When Open vSwitch has experimental or incomplete support for + * newer versions of OpenFlow, those versions should not be supported by + * default and thus should be omitted from the latter bitmap. */ +#define OFPUTIL_SUPPORTED_VERSIONS ((1u << OFP10_VERSION) | \ + (1u << OFP11_VERSION) | \ + (1u << OFP12_VERSION) | \ + (1u << OFP13_VERSION)) +#define OFPUTIL_DEFAULT_VERSIONS OFPUTIL_SUPPORTED_VERSIONS enum ofputil_protocol ofputil_protocols_from_string(const char *s); @@ -246,6 +248,13 @@ enum ofputil_flow_mod_flags { OFPUTIL_FF_CHECK_OVERLAP = 1 << 3, /* All versions. */ OFPUTIL_FF_EMERG = 1 << 4, /* OpenFlow 1.0 only. */ OFPUTIL_FF_RESET_COUNTS = 1 << 5, /* OpenFlow 1.2+. */ + + /* Flags that are only set by OVS for its internal use. Cannot be set via + * OpenFlow. */ + OFPUTIL_FF_HIDDEN_FIELDS = 1 << 6, /* Allow hidden match fields to be + set or modified. */ + OFPUTIL_FF_NO_READONLY = 1 << 7, /* Allow rules within read only tables + to be modified */ }; /* Protocol-independent flow_mod. @@ -291,8 +300,8 @@ struct ofputil_flow_mod { ofp_port_t out_port; uint32_t out_group; enum ofputil_flow_mod_flags flags; - struct ofpact *ofpacts; /* Series of "struct ofpact"s. */ - size_t ofpacts_len; /* Length of ofpacts, in bytes. */ + struct ofpact *ofpacts; /* Series of "struct ofpact"s. */ + size_t ofpacts_len; /* Length of ofpacts, in bytes. */ }; enum ofperr ofputil_decode_flow_mod(struct ofputil_flow_mod *, @@ -334,7 +343,7 @@ struct ofputil_flow_stats { int hard_age; /* Seconds since last change, -1 if unknown. */ uint64_t packet_count; /* Packet count, UINT64_MAX if unknown. */ uint64_t byte_count; /* Byte count, UINT64_MAX if unknown. */ - struct ofpact *ofpacts; + const struct ofpact *ofpacts; size_t ofpacts_len; enum ofputil_flow_mod_flags flags; }; @@ -847,7 +856,7 @@ struct ofputil_flow_update { uint16_t priority; ovs_be64 cookie; struct match *match; - struct ofpact *ofpacts; + const struct ofpact *ofpacts; size_t ofpacts_len; /* Used only for NXFME_ABBREV. */