ovn-northd: Allow lport 'addresses' to store multiple ips in each set
[cascardo/ovs.git] / ovn / ovn-nb.xml
index c119a27..dbd7bbb 100644 (file)
       </p>
     </column>
 
-    <column name="router_port">
-      <p>
-        The router port to which this logical switch is connected, or empty if
-        this logical switch is not connected to any router.  A switch may be
-        connected to at most one logical router, but this is not a significant
-        restriction because logical routers may be connected into arbitrary
-        topologies.
-      </p>
-
-      <p>
-        It is an error for multiple logical switches to refer to the same
-        router port.
-      </p>
-    </column>
-
     <column name="acls">
       Access control rules that apply to packets within the logical switch.
     </column>
             A VM (or VIF) interface.
           </dd>
 
+          <dt><code>router</code></dt>
+          <dd>
+            A connection to a logical router.
+          </dd>
+
           <dt><code>localnet</code></dt>
           <dd>
             A connection to a locally accessible network from each
         individually below.
       </column>
 
+      <group title="Options for router ports">
+        <p>
+          These options apply when <ref column="type"/> is <code>router</code>.
+        </p>
+
+        <p>
+          If a given logical switch has multiple <code>router</code> ports, the
+          <ref table="Logical_Router_Port"/> rows that they reference must be
+          all on the same <ref table="Logical_Router"/> (for different
+          subnets).
+        </p>
+
+        <column name="options" key="router-port">
+          Required.  The <ref column="name"/> of the <ref
+          table="Logical_Router_Port"/> to which this logical switch port is
+          connected.
+        </column>
+      </group>
+
       <group title="Options for localnet ports">
         <p>
           These options apply when <ref column="type"/> is
           Required.  A logical switch name connected by the VTEP gateway.
         </column>
       </group>
+
+      <group title="VMI (or VIF) Options">
+        <p>
+          These options apply to logical ports with <ref column="type"/> having
+          (empty string)
+        </p>
+
+        <column name="options" key="policing_rate">
+          If set, indicates the maximum rate for data sent from this interface,
+          in kbps. Data exceeding this rate is dropped.
+        </column>
+
+        <column name="options" key="policing_burst">
+          If set, indicates the maximum burst size for data sent from this
+          interface, in kb.
+        </column>
+      </group>
     </group>
 
     <group title="Containers">
         </p>
 
         <dl>
-          <dt><code><var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var></code></dt>
+          <dt><code>Ethernet address followed by zero or more IPv4 or IPv6 addresses (or both)</code></dt>
           <dd>
             <p>
-              An Ethernet address owned by the logical port.  Like a physical
-              Ethernet NIC, a logical port ordinarily has a single fixed
-              Ethernet address.
+              An Ethernet address defined is owned by the logical port.
+              Like a physical Ethernet NIC, a logical port ordinarily has
+              a single fixed Ethernet address.
             </p>
 
             <p>
               if a MAC learning process had learned that MAC address on the
               port.
             </p>
-          </dd>
 
-          <dt><code><var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var> <var>a</var>.<var>b</var>.<var>c</var>.<var>d</var></code></dt>
-          <dd>
             <p>
-              This form has all the effects of the previous form.  It also
-              indicates that the logical port owns the given IPv4 address.
+              If IPv4 or IPv6 address(es) (or both) are defined, it indicates
+              that the logical port owns the given IP addresses.
             </p>
 
             <p>
-              The OVN logical switch uses this information to synthesize
-              responses to ARP requests without traversing the physical
-              network.  The OVN logical router connected to the logical switch,
-              if any, uses this information to avoid issuing ARP requests for
-              logical switch ports.
+              If IPv4 address(es) are defined, the OVN logical switch uses this
+              information to synthesize responses to ARP requests without
+              traversing the physical network. The OVN logical router connected
+              to the logical switch, if any, uses this information to avoid
+              issuing ARP requests for logical switch ports.
             </p>
+
+            <p>
+              Note that the order here is important. The Ethernet address must
+              be listed before the IP address(es) if defined.
+            </p>
+
+            <p>
+              Examples:
+            </p>
+
+            <dl>
+              <dt><code>80:fa:5b:06:72:b7</code></dt>
+              <dd>
+                This indicates that the logical port owns the above mac address.
+              </dd>
+
+              <dt><code>80:fa:5b:06:72:b7 10.0.0.4 20.0.0.4</code></dt>
+              <dd>
+                This indicates that the logical port owns the mac address and two
+                IPv4 addresses.
+              </dd>
+
+              <dt><code>80:fa:5b:06:72:b7 fdaa:15f2:72cf:0:f816:3eff:fe20:3f41</code></dt>
+              <dd>
+                This indicates that the logical port owns the mac address and
+                1 IPv6 address.
+              </dd>
+
+              <dt><code>80:fa:5b:06:72:b7 10.0.0.4 fdaa:15f2:72cf:0:f816:3eff:fe20:3f41</code></dt>
+              <dd>
+                This indicates that the logical port owns the mac address and
+                1 IPv4 address and 1 IPv6 address.
+              </dd>
+            </dl>
           </dd>
 
           <dt><code>unknown</code></dt>
       column="action"/> column for the highest-<ref column="priority"/>
       matching row in this table determines a packet's treatment.  If no row
       matches, packets are allowed by default.  (Default-deny treatment is
-      possible: add a rule with <ref column="priority"/> 1, <code>1</code> as
+      possible: add a rule with <ref column="priority"/> 0, <code>0</code> as
       <ref column="match"/>, and <code>deny</code> as <ref column="action"/>.)
     </p>
 
       </p>
 
       <p>
-        In logical switches connected to logical routers, the special
-        port name <code>ROUTER</code> refers to the logical router port.
+        Note that you can not create an ACL matching on a port with
+        type=router.
       </p>
     </column>
 
 
     <column name="name">
       <p>
-        A name for the logical router port.  This name has no special meaning or purpose
-        other than to provide convenience for human interaction with the ovn-nb
-        database.  There is no requirement for the name to be unique.  The
-        logical router port's UUID should be used as the unique identifier.
+        A name for the logical router port.
+      </p>
+
+      <p>
+        In addition to provide convenience for human interaction with the
+        ovn-nb database, this column is used as reference by its patch port in
+        <ref table="Logical_Port"/> or another logical router port in <ref
+        table="Logical_Router_Port"/>.
       </p>
     </column>
 
       The Ethernet address that belongs to this router port.
     </column>
 
+    <column name="enabled">
+      This column is used to administratively set port state.  If this column
+      is empty or is set to <code>true</code>, the port is enabled.  If this
+      column is set to <code>false</code>, the port is disabled.  A disabled
+      port has all ingress and egress traffic dropped.
+    </column>
+
     <group title="Attachment">
       <p>
         A given router port serves one of two purposes:
       <ul>
         <li>
           To attach a logical switch to a logical router.  A logical router
-          port of this type is referenced by exactly the <ref
-          column="router_port" table="Logical_Switch"/> column in exactly one
-          <ref table="Logical_Switch"/> row.  The <ref column="peer"/> column
-          is empty.
+          port of this type is referenced by exactly one <ref
+          table="Logical_Port"/> of type <code>router</code>.  The value of
+          <ref column="name"/> is set as <code>router-port</code> in column
+          <ref column="options"/> of <ref table="Logical_Port"/>.
+          In this case <ref column="peer"/> column is empty.
         </li>
 
         <li>
       <column name="peer">
         <p>
           For a router port used to connect two logical routers, this
-          identifies the other router port in the pair.
+          identifies the other router port in the pair by <ref column="name"/>.
         </p>
 
         <p>