openflow-common: Describe length and padding rules for OpenFlow properties.
[cascardo/ovs.git] / include / openflow / openflow-common.h
index 3985705..8859400 100644 (file)
@@ -221,6 +221,9 @@ enum ofp_port_features {
 struct ofp_prop_header {
     ovs_be16 type;
     ovs_be16 len;
+    /* Followed by:
+     *     - 'len - 4' bytes of payload.
+     *     - PAD_SIZE(len, 8) bytes of zeros. */
 };
 OFP_ASSERT(sizeof(struct ofp_prop_header) == 4);
 
@@ -234,6 +237,9 @@ struct ofp_prop_experimenter {
     ovs_be32 experimenter;  /* Experimenter ID which takes the same form as
                              * in struct ofp_experimenter_header. */
     ovs_be32 exp_type;      /* Experimenter defined. */
+    /* Followed by:
+     *     - 'len - 12' bytes of payload.
+     *     - PAD_SIZE(len, 8) bytes of zeros. */
 };
 OFP_ASSERT(sizeof(struct ofp_prop_experimenter) == 12);
 
@@ -274,6 +280,7 @@ enum ofp_capabilities {
 
 /* Why is this packet being sent to the controller? */
 enum ofp_packet_in_reason {
+    /* Standard reasons. */
     OFPR_NO_MATCH,          /* No matching flow. */
     OFPR_ACTION,            /* Action explicitly output to controller. */
     OFPR_INVALID_TTL,       /* Packet has invalid TTL. */
@@ -287,6 +294,10 @@ enum ofp_packet_in_reason {
     (OFPR10_BITS |                                                      \
      (1u << OFPR_ACTION_SET) | (1u << OFPR_GROUP) | (1u << OFPR_PACKET_OUT))
 
+    /* Nonstandard reason--not exposed via OpenFlow. */
+    OFPR_EXPLICIT_MISS,
+    OFPR_IMPLICIT_MISS,
+
     OFPR_N_REASONS
 };