Add QoS profile and QoS rule tables and explanations
to the NB schema.
Add specific bandwidth limit rule configurations
in the document

Signed-off-by: Gal Sagie <gal.sa...@huawei.com>
---
 ovn/ovn-nb.ovsschema | 25 ++++++++++++++++++
 ovn/ovn-nb.xml       | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+)

diff --git a/ovn/ovn-nb.ovsschema b/ovn/ovn-nb.ovsschema
index 782e0f2..cc302f9 100644
--- a/ovn/ovn-nb.ovsschema
+++ b/ovn/ovn-nb.ovsschema
@@ -39,6 +39,9 @@
                                            "max": "unlimited"}},
                 "up": {"type": {"key": "boolean", "min": 0, "max": 1}},
                 "enabled": {"type": {"key": "boolean", "min": 0, "max": 1}},
+                "qos_profile": {"type": {"key": {"type": "uuid",
+                                                 "refTable": "QoS_Profile"},
+                                         "min": 0, "max": 1}},
                 "external_ids": {
                     "type": {"key": "string", "value": "string",
                              "min": 0, "max": "unlimited"}}},
@@ -77,5 +80,27 @@
                 "external_ids": {
                     "type": {"key": "string", "value": "string",
                              "min": 0, "max": "unlimited"}}},
+            "isRoot": false},
+        "QoS_Profile": {
+            "columns": {
+                "name": {"type": "string"},
+                "qos_rules": {"type": {"key": {"type": "uuid",
+                                               "refTable": "QoS_Rules",
+                                               "refType": "strong"},
+                                       "min": 0,
+                                       "max": "unlimited"}},
+                "external_ids": {
+                    "type": {"key": "string", "value": "string",
+                             "min": 0, "max": "unlimited"}}},
+            "isRoot": true},
+        "QoS_Rules": {
+            "columns": {
+                "name": {"type": "string"},
+                "type": {"type": "string"},
+                "other_config": {"type": {"key": "string", "value": "string",
+                                 "min": 0, "max": "unlimited"}},
+                "external_ids": {
+                    "type": {"key": "string", "value": "string",
+                             "min": 0, "max": "unlimited"}}},
             "isRoot": false}},
     "version": "1.0.0"}
diff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml
index cafba14..9afb4cb 100644
--- a/ovn/ovn-nb.xml
+++ b/ovn/ovn-nb.xml
@@ -147,6 +147,12 @@
       ingress and egress traffic dropped.
     </column>
 
+    <column name="qos_profile">
+      Reference to the <ref table="QoS_Profile"/> table entry for this
+      logical port. This entry is currently ignored for child logical ports
+      (parent name is set).
+    </column>
+
     <column name="macs">
       The logical port's own Ethernet address or addresses, each in the form
       
<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
@@ -321,4 +327,70 @@
       </column>
     </group>
   </table>
+
+  <table name="QoS_Profile" title="QoS Profiles">
+    <p>
+      A QoS profile attached to a logical port
+    </p>
+
+    <column name="name">
+      Name identifier for this profile, not required to be unique.
+    </column>
+
+    <column name="qos_rules">
+      List of <ref table="QoS_Rules"/> rows that construct this QoS Profile
+    </column>
+
+    <group title="Common Columns">
+      <column name="external_ids">
+        See <em>External IDs</em> at the beginning of this document.
+      </column>
+    </group>
+  </table>
+
+  <table name="QoS_Rules" title="QoS Rules">
+    <p>
+      Generic QoS rule which is attached to a QoS profile
+    </p>
+
+    <column name="name">
+      Name identifier for this rule, not required to be unique.
+    </column>
+
+    <column name="type">
+      <p>QoS rule type, each has its own unique configuration options</p>
+      <dl>
+        <dt><code>bandwidth-limit</code></dt>
+        <dd>
+          Bandwidth limiting on the logical port
+        </dd>
+      </dl>
+    </column>
+
+    <group title="Configuration for bandwidth-limit rule">
+      <p>
+        The <code>bandwidth-limit</code> rule support
+        the following key-value pairs:
+      </p>
+
+      <column name="other_config" key="max-kbps" type='{"type": "integer"}'>
+        Maximum rate of bandwidth for the logical port to the OVS
+      </column>
+      <column name="other_config" key="max-burst-kbps" type='{"type": 
"integer"}'>
+        Maximum burst for the logical port to the OVS
+      </column>
+    </group>
+
+    <column name="other_config">
+      <p>
+        Specific key-value configuration pairs depending on the rule type
+      </p>
+    </column>
+
+    <group title="Common Columns">
+      <column name="external_ids">
+        See <em>External IDs</em> at the beginning of this document.
+      </column>
+    </group>
+  </table>
 </database>
-- 
2.1.0

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to