qos: api clenup
[vpp.git] / src / vnet / qos / qos.api
index 11c9163..d655165 100644 (file)
  * limitations under the License.
  */
 
-/** \file
-
-    This file defines QoS record and mark API messages which are generally
-    called through a shared memory interface.
-*/
+/**
+ * @file
+ * This file defines QoS record, store and mark API messages which are generally
+ *    called through a shared memory interface.
+ *
+ * Definitions of verbs:
+ *  store: write a QoS value into the buffer meta-data
+ *  record: Extract a QoS value from a packet header and store it.
+ *  mark: Make a change to the content of a packet header by writing a stored
+ *        QoS value
+ */
+option version = "1.1.1";
 
-option version = "1.0.0";
+import "vnet/ip/ip_types.api";
+import "vnet/interface_types.api";
 
 enum qos_source : u8
 {
@@ -30,6 +38,55 @@ enum qos_source : u8
   QOS_API_SOURCE_IP = 3,
 };
 
+/**
+ * QoS store.
+ * @param sw_if_index - The interface on which store is enabled.
+ * @param input_source - The input source/layer at which the QoS bits are stored
+ *                       See qos_source_t. This determines what packets have a
+ *                       value stored. i.e. If IP is seleted this affects on IP
+ *                       packets.
+ * @param value - The value to store.
+ */
+typedef qos_store
+{
+  vl_api_interface_index_t sw_if_index;
+  vl_api_qos_source_t input_source;
+  u8 value;
+};
+
+/**
+ * Enable/Disable QoS storing
+ * The QoS bits from the packet at the specified input layer are copied
+ * into the packet. Storeing should be used in conjunction with marking
+ * @param enable - enable=1 or disable the feature
+ * @param store - Store configuration
+ */
+autoreply define qos_store_enable_disable
+{
+  u32 client_index;
+  u32 context;
+  bool enable [default=true];
+  vl_api_qos_store_t store;
+};
+
+/**
+ * Dump the QoS store configs
+ */
+define qos_store_dump
+{
+  u32 client_index;
+  u32 context;
+};
+
+/**
+ * Details of QoS recording configs
+ */
+define qos_store_details
+{
+  u32 context;
+  vl_api_qos_store_t store;
+};
+
 /**
  * QoS recording.
  * @param sw_if_index - The interface on which recording is enabled.
@@ -38,7 +95,7 @@ enum qos_source : u8
  */
 typedef qos_record
 {
-  u32 sw_if_index;
+  vl_api_interface_index_t sw_if_index;
   vl_api_qos_source_t input_source;
 };
 
@@ -53,7 +110,7 @@ autoreply define qos_record_enable_disable
 {
   u32 client_index;
   u32 context;
-  u8 enable;
+  bool enable [default=true];
   vl_api_qos_record_t record;
 };
 
@@ -167,7 +224,7 @@ autoreply define qos_mark_enable_disable
 {
   u32 client_index;
   u32 context;
-  u8 enable;
+  bool enable [default=true];
   vl_api_qos_mark_t mark;
 };
 
@@ -178,7 +235,7 @@ define qos_mark_dump
 {
   u32 client_index;
   u32 context;
-  u32 sw_if_index;
+  vl_api_interface_index_t sw_if_index;
 };
 
 /**