[ovs-dev,12/23] ovn-controller: Rename "ovn-patch-port" to "ovn-localnet-port".
diff mbox

Message ID 1444450838-12150-1-git-send-email-blp@nicira.com
State Accepted
Headers show

Commit Message

Ben Pfaff Oct. 10, 2015, 4:20 a.m. UTC
An upcoming patch will introduce a different use for patch ports, so
ovn-patch-port would become an ambiguous name.

Signed-off-by: Ben Pfaff <blp@nicira.com>
---
 ovn/controller/ovn-controller.8.xml | 6 ++++--
 ovn/controller/patch.c              | 4 ++--
 ovn/controller/physical.c           | 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

Comments

Justin Pettit Oct. 16, 2015, 12:18 a.m. UTC | #1
> On Oct 9, 2015, at 9:20 PM, Ben Pfaff <blp@nicira.com> wrote:
> 
> An upcoming patch will introduce a different use for patch ports, so
> ovn-patch-port would become an ambiguous name.
> 
> Signed-off-by: Ben Pfaff <blp@nicira.com>

Acked-by: Justin Pettit <jpettit@nicira.com>

--Justin

Patch
diff mbox

diff --git a/ovn/controller/ovn-controller.8.xml b/ovn/controller/ovn-controller.8.xml
index 508ad26..189ee70 100644
--- a/ovn/controller/ovn-controller.8.xml
+++ b/ovn/controller/ovn-controller.8.xml
@@ -143,7 +143,8 @@ 
       </dd>
 
       <dt>
-        <code>external-ids:ovn-patch-port</code> in the <code>Port</code> table
+        <code>external-ids:ovn-localnet-port</code> in the <code>Port</code>
+        table
       </dt>
       <dd>
         <p>
@@ -158,7 +159,8 @@ 
         <p>
           Each <code>localnet</code> logical port is implemented as a pair of
           patch ports, one in the integration bridge, one in a different
-          bridge, with the same <code>external-ids:ovn-patch-port</code> value.
+          bridge, with the same <code>external-ids:ovn-localnet-port</code>
+          value.
         </p>
       </dd>
     </dl>
diff --git a/ovn/controller/patch.c b/ovn/controller/patch.c
index 83a3739..90c72ff 100644
--- a/ovn/controller/patch.c
+++ b/ovn/controller/patch.c
@@ -78,7 +78,7 @@  create_patch_port(struct controller_ctx *ctx,
     port = ovsrec_port_insert(ctx->ovs_idl_txn);
     ovsrec_port_set_name(port, src_name);
     ovsrec_port_set_interfaces(port, &iface, 1);
-    const struct smap ids = SMAP_CONST1(&ids, "ovn-patch-port", network);
+    const struct smap ids = SMAP_CONST1(&ids, "ovn-localnet-port", network);
     ovsrec_port_set_external_ids(port, &ids);
 
     struct ovsrec_port **ports;
@@ -193,7 +193,7 @@  patch_run(struct controller_ctx *ctx, const struct ovsrec_bridge *br_int)
     struct shash existing_ports = SHASH_INITIALIZER(&existing_ports);
     const struct ovsrec_port *port;
     OVSREC_PORT_FOR_EACH (port, ctx->ovs_idl) {
-        if (smap_get(&port->external_ids, "ovn-patch-port")) {
+        if (smap_get(&port->external_ids, "ovn-localnet-port")) {
             shash_add(&existing_ports, port->name, port);
         }
     }
diff --git a/ovn/controller/physical.c b/ovn/controller/physical.c
index 0c239df..a1f7fe5 100644
--- a/ovn/controller/physical.c
+++ b/ovn/controller/physical.c
@@ -155,7 +155,7 @@  physical_run(struct controller_ctx *ctx, enum mf_field_id mff_ovn_geneve,
         }
 
         const char *localnet = smap_get(&port_rec->external_ids,
-                                        "ovn-patch-port");
+                                        "ovn-localnet-port");
 
         for (int j = 0; j < port_rec->n_interfaces; j++) {
             const struct ovsrec_interface *iface_rec = port_rec->interfaces[j];