#ifndef OPENFLOW_13_H
#define OPENFLOW_13_H 1
-#include "openflow/openflow-1.2.h"
+#include <openflow/openflow-1.2.h>
/*
* OpenFlow 1.3 modifies the syntax of the following message types:
* - new field: auxiliary_id
* - removed: ofp_ports at the end
*
- * OFPT_PACKET_IN = 10 (ofp13_packet_in) new field: cookie
+ * OFPT_PACKET_IN = 10 (appends an ovs_be64 to ofp12_packet_in)
*
* OpenFlow 1.3 adds following new message types:
*
OFPIT13_METER = 6 /* Apply meter (rate limiter) */
};
-#define OFPIT13_ALL (OFPIT11_GOTO_TABLE | OFPIT11_WRITE_METADATA | \
- OFPIT11_WRITE_ACTIONS | OFPIT11_APPLY_ACTIONS | \
- OFPIT11_CLEAR_ACTIONS | OFPIT13_METER)
-
/* Instruction structure for OFPIT_METER */
struct ofp13_instruction_meter {
ovs_be16 type; /* OFPIT13_METER */
};
OFP_ASSERT(sizeof(struct ofp13_instruction_meter) == 8);
-enum ofp13_action_type {
- OFPAT13_OUTPUT = 0, /* Output to switch port. */
- OFPAT13_COPY_TTL_OUT = 11, /* Copy TTL "outwards" -- from next-to-outermost
- to outermost */
- OFPAT13_COPY_TTL_IN = 12, /* Copy TTL "inwards" -- from outermost to
- next-to-outermost */
- OFPAT13_SET_MPLS_TTL = 15, /* MPLS TTL */
- OFPAT13_DEC_MPLS_TTL = 16, /* Decrement MPLS TTL */
- OFPAT13_PUSH_VLAN = 17, /* Push a new VLAN tag */
- OFPAT13_POP_VLAN = 18, /* Pop the outer VLAN tag */
- OFPAT13_PUSH_MPLS = 19, /* Push a new MPLS Label Stack Entry */
- OFPAT13_POP_MPLS = 20, /* Pop the outer MPLS Label Stack Entry */
- OFPAT13_SET_QUEUE = 21, /* Set queue id when outputting to a port */
- OFPAT13_GROUP = 22, /* Apply group. */
- OFPAT13_SET_NW_TTL = 23, /* IP TTL. */
- OFPAT13_DEC_NW_TTL = 24, /* Decrement IP TTL. */
- OFPAT13_SET_FIELD = 25, /* Set a header field using OXM TLV format. */
- OFPAT13_PUSH_PBB = 26, /* Push a new PBB service tag (I-TAG) */
- OFPAT13_POP_PBB = 27 /* Pop the outer PBB service tag (I-TAG) */
-};
-
/* enum ofp_config_flags value OFPC_INVALID_TTL_TO_CONTROLLER
* is deprecated in OpenFlow 1.3 */
};
OFP_ASSERT(sizeof(struct ofp13_table_stats) == 24);
-/* Common header for all Table Feature Properties */
-struct ofp13_table_feature_prop_header {
- ovs_be16 type; /* One of OFPTFPT_*. */
- ovs_be16 length; /* Length in bytes of this property. */
-};
-OFP_ASSERT(sizeof(struct ofp13_table_feature_prop_header) == 4);
-
/* Body for ofp_multipart_request of type OFPMP_TABLE_FEATURES./
* Body of reply to OFPMP_TABLE_FEATURES request. */
struct ofp13_table_features {
char name[OFP_MAX_TABLE_NAME_LEN];
ovs_be64 metadata_match; /* Bits of metadata table can match. */
ovs_be64 metadata_write; /* Bits of metadata table can write. */
- ovs_be32 config; /* Bitmap of OFPTC_* values */
+
+ /* In OF1.3 this field was named 'config' and it was useless because OF1.3
+ * did not define any OFPTC_* bits.
+ *
+ * OF1.4 renamed this field to 'capabilities' and added OFPTC14_EVICTION
+ * and OFPTC14_VACANCY_EVENTS. */
+ ovs_be32 capabilities; /* Bitmap of OFPTC_* values */
+
ovs_be32 max_entries; /* Max number of entries supported. */
/* Table Feature Property list */
OFPTFPT13_EXPERIMENTER_MISS = 0xFFFF, /* Experimenter for table-miss. */
};
-/* Instructions property */
-struct ofp13_table_feature_prop_instructions {
- ovs_be16 type; /* One of OFPTFPT13_INSTRUCTIONS,
- OFPTFPT13_INSTRUCTIONS_MISS. */
- ovs_be16 length; /* Length in bytes of this property. */
- /* Followed by:
- * - Exactly (length - 4) bytes containing the instruction ids, then
- * - Exactly (length + 7)/8*8 - (length) (between 0 and 7)
- * bytes of all-zero bytes */
- /* struct ofp11_instruction instruction_ids[0]; List of instructions
- without any data */
-};
-OFP_ASSERT(sizeof(struct ofp13_table_feature_prop_instructions) == 4);
-
-/* Next Tables property */
-struct ofp13_table_feature_prop_next_tables {
- ovs_be16 type; /* One of OFPTFPT13_NEXT_TABLES,
- OFPTFPT13_NEXT_TABLES_MISS. */
- ovs_be16 length; /* Length in bytes of this property. */
- /* Followed by:
- * - Exactly (length - 4) bytes containing the table_ids, then
- * - Exactly (length + 7)/8*8 - (length) (between 0 and 7)
- * bytes of all-zero bytes */
- /* uint8_t next_table_ids[0]; */
-};
-OFP_ASSERT(sizeof(struct ofp13_table_feature_prop_next_tables) == 4);
-
-/* Actions property */
-struct ofp13_table_feature_prop_actions {
- ovs_be16 type; /* One of OFPTFPT13_WRITE_ACTIONS,
- OFPTFPT13_WRITE_ACTIONS_MISS,
- OFPTFPT13_APPLY_ACTIONS,
- OFPTFPT13_APPLY_ACTIONS_MISS. */
- ovs_be16 length; /* Length in bytes of this property. */
- /* Followed by:
- * - Exactly (length - 4) bytes containing the action_ids, then
- * - Exactly (length + 7)/8*8 - (length) (between 0 and 7)
- * bytes of all-zero bytes */
- /* struct ofp_action_header action_ids[0]; List of actions
- without any data */
-};
-OFP_ASSERT(sizeof(struct ofp13_table_feature_prop_actions) == 4);
-
-
-/* Match, Wildcard or Set-Field property */
-struct ofp13_table_feature_prop_oxm {
- ovs_be16 type; /* One of OFPTFPT13_MATCH, OFPTFPT13_WILDCARDS,
- OFPTFPT13_WRITE_SETFIELD,
- OFPTFPT13_WRITE_SETFIELD_MISS,
- OFPTFPT13_APPLY_SETFIELD,
- OFPTFPT13_APPLY_SETFIELD_MISS. */
- ovs_be16 length; /* Length in bytes of this property. */
- /* Followed by:
- * - Exactly (length - 4) bytes containing the oxm_ids, then
- * - Exactly (length + 7)/8*8 - (length) (between 0 and 7)
- * bytes of all-zero bytes */
- /* ovs_be32 oxm_ids[0]; Array of OXM headers */
-};
-OFP_ASSERT(sizeof(struct ofp13_table_feature_prop_oxm) == 4);
-
-/* Experimenter table feature property */
-struct ofp13_table_feature_prop_experimenter {
- ovs_be16 type; /* One of OFPTFPT13_EXPERIMENTER,
- OFPTFPT13_EXPERIMENTER_MISS. */
- ovs_be16 length; /* Length in bytes of this property. */
- ovs_be32 experimenter; /* Experimenter ID which takes the same form
- as in struct ofp_experimenter_header. */
- ovs_be32 exp_type; /* Experimenter defined. */
- /* Followed by:
- * - Exactly (length - 12) bytes containing the experimenter data, then
- * - Exactly (length + 7)/8*8 - (length) (between 0 and 7)
- * bytes of all-zero bytes */
- /* ovs_be32 experimenter_data[0]; */
-};
-OFP_ASSERT(sizeof(struct ofp13_table_feature_prop_experimenter) == 12);
-
/* Body of reply to OFPMP13_PORT request. If a counter is unsupported, set
* the field to all ones. */
struct ofp13_port_stats {
ovs_be32 duration_sec; /* Time group has been alive in seconds. */
ovs_be32 duration_nsec; /* Time group has been alive in nanoseconds
beyond duration_sec. */
- struct ofp11_bucket_counter bucket_stats[0];
+ /* struct ofp11_bucket_counter bucket_stats[]; */
};
OFP_ASSERT(sizeof(struct ofp13_group_stats) == 40);
};
OFP_ASSERT(sizeof(struct ofp13_async_config) == 24);
-
-/* Packet received on port (datapath -> controller). */
-struct ofp13_packet_in {
- struct ofp12_packet_in pi;
- ovs_be64 cookie; /* Cookie of the flow entry that was looked up */
- /* Followed by:
- * - Match
- * - Exactly 2 all-zero padding bytes, then
- * - An Ethernet frame whose length is inferred from header.length.
- * The padding bytes preceding the Ethernet frame ensure that the IP
- * header (if any) following the Ethernet header is 32-bit aligned.
- */
- /* struct ofp12_match match; */
- /* uint8_t pad[2]; Align to 64 bit + 16 bit */
- /* uint8_t data[0]; Ethernet frame */
-};
-OFP_ASSERT(sizeof(struct ofp13_packet_in) == 16);
-
-
#endif /* openflow/openflow-1.3.h */