[ovs-dev] [PATCH 2/5] Add some missing common Open Flow definitions

Simon Horman horms at verge.net.au
Mon Mar 26 05:30:24 UTC 2012


Signed-off-by: Simon Horman <horms at verge.net.au>
---
 include/openflow/openflow-common.h |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/include/openflow/openflow-common.h b/include/openflow/openflow-common.h
index 89c191b..43414f4 100644
--- a/include/openflow/openflow-common.h
+++ b/include/openflow/openflow-common.h
@@ -145,6 +145,37 @@ enum ofp_port_features {
     OFPPF_10GB_FD    = 1 << 6,  /* 10 Gb full-duplex rate support. */
 };
 
+struct ofp_packet_queue {
+    ovs_be32 queue_id;          /* id for the specific queue. */
+    ovs_be16 len;               /* Length in bytes of this queue desc. */
+    uint8_t pad[2];             /* 64-bit alignment. */
+    /* struct ofp_queue_prop_header properties[0]; List of properties.  */
+};
+OFP_ASSERT(sizeof(struct ofp_packet_queue) == 8);
+
+enum ofp_queue_properties {
+    OFPQT_NONE = 0,       /* No property defined for queue (default). */
+    OFPQT_MIN_RATE,       /* Minimum datarate guaranteed. */
+                          /* Other types should be added here
+                           * (i.e. max rate, precedence, etc). */
+};
+
+/* Common description for a queue. */
+struct ofp_queue_prop_header {
+    ovs_be16 property; /* One of OFPQT_. */
+    ovs_be16 len;      /* Length of property, including this header. */
+    uint8_t pad[4];    /* 64-bit alignemnt. */
+};
+OFP_ASSERT(sizeof(struct ofp_queue_prop_header) == 8);
+
+/* Min-Rate queue property description. */
+struct ofp_queue_prop_min_rate {
+    struct ofp_queue_prop_header prop_header; /* prop: OFPQT_MIN, len: 16. */
+    uint16_t rate;        /* In 1/10 of a percent; >1000 -> disabled. */
+    uint8_t pad[6];       /* 64-bit alignment */
+};
+OFP_ASSERT(sizeof(struct ofp_queue_prop_min_rate) == 16);
+
 /* Switch features. */
 struct ofp_switch_features {
     struct ofp_header header;
-- 
1.7.6.3




More information about the dev mailing list