[ovs-dev,16/23] ovn-nb: Rename Port_Bindings 'macs' column to 'addresses'.
diff mbox

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

Commit Message

Ben Pfaff Oct. 10, 2015, 4:20 a.m. UTC
In an upcoming commit this column will also support IP+MAC pairs.

Signed-off-by: Ben Pfaff <blp@nicira.com>
---
 ovn/northd/ovn-northd.c             | 17 +++++-----
 ovn/ovn-nb.ovsschema                |  8 ++---
 ovn/ovn-nb.xml                      |  2 +-
 ovn/utilities/ovn-nbctl.8.xml       | 14 ++++----
 ovn/utilities/ovn-nbctl.c           | 41 +++++++++++-----------
 tests/ovn-controller-vtep.at        | 18 +++++-----
 tests/ovn-nbctl.at                  | 14 ++++----
 tests/ovn-sbctl.at                  |  4 +--
 tests/ovn.at                        |  4 +--
 tutorial/OVN-Tutorial.md            | 68 ++++++++++++++++++-------------------
 tutorial/ovn/env1/add-third-port.sh |  2 +-
 tutorial/ovn/env1/setup.sh          |  4 +--
 tutorial/ovn/env2/setup.sh          |  8 ++---
 tutorial/ovn/env3/setup.sh          |  8 ++---
 tutorial/ovn/env4/setup2.sh         |  4 +--
 tutorial/ovn/env5/setup.sh          |  4 +--
 utilities/ovs-sim.1.xml             |  4 +--
 17 files changed, 113 insertions(+), 111 deletions(-)

Comments

Justin Pettit Oct. 16, 2015, 1:04 a.m. UTC | #1
> On Oct 9, 2015, at 9:20 PM, Ben Pfaff <blp@nicira.com> wrote:
> 
> In an upcoming commit this column will also support IP+MAC pairs.
> 
> Signed-off-by: Ben Pfaff <blp@nicira.com>

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

--Justin

Patch
diff mbox

diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index 089bf75..647ed49 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -430,8 +430,8 @@  ovn_port_update_sbrec(const struct ovn_port *op)
     sbrec_port_binding_set_datapath(op->sb, op->od->sb);
     sbrec_port_binding_set_parent_port(op->sb, op->nb->parent_name);
     sbrec_port_binding_set_tag(op->sb, op->nb->tag, op->nb->n_tag);
-    sbrec_port_binding_set_mac(op->sb, (const char **) op->nb->macs,
-                               op->nb->n_macs);
+    sbrec_port_binding_set_mac(op->sb, (const char **) op->nb->addresses,
+                               op->nb->n_addresses);
 }
 
 static void
@@ -804,14 +804,14 @@  build_lflows(struct northd_context *ctx, struct hmap *datapaths,
 
     /* Ingress table 2: Destination lookup, unicast handling (priority 50), */
     HMAP_FOR_EACH (op, key_node, ports) {
-        for (size_t i = 0; i < op->nb->n_macs; i++) {
+        for (size_t i = 0; i < op->nb->n_addresses; i++) {
             struct eth_addr mac;
 
-            if (eth_addr_from_string(op->nb->macs[i], &mac)) {
+            if (eth_addr_from_string(op->nb->addresses[i], &mac)) {
                 struct ds match, actions;
 
                 ds_init(&match);
-                ds_put_format(&match, "eth.dst == %s", op->nb->macs[i]);
+                ds_put_format(&match, "eth.dst == %s", op->nb->addresses[i]);
 
                 ds_init(&actions);
                 ds_put_cstr(&actions, "outport = ");
@@ -821,7 +821,7 @@  build_lflows(struct northd_context *ctx, struct hmap *datapaths,
                               ds_cstr(&match), ds_cstr(&actions));
                 ds_destroy(&actions);
                 ds_destroy(&match);
-            } else if (!strcmp(op->nb->macs[i], "unknown")) {
+            } else if (!strcmp(op->nb->addresses[i], "unknown")) {
                 if (lport_is_enabled(op->nb)) {
                     ovn_multicast_add(&mcgroups, &mc_unknown, op);
                     op->od->has_unknown = true;
@@ -829,8 +829,9 @@  build_lflows(struct northd_context *ctx, struct hmap *datapaths,
             } else {
                 static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1);
 
-                VLOG_INFO_RL(&rl, "%s: invalid syntax '%s' in macs column",
-                             op->nb->name, op->nb->macs[i]);
+                VLOG_INFO_RL(&rl,
+                             "%s: invalid syntax '%s' in addresses column",
+                             op->nb->name, op->nb->addresses[i]);
             }
         }
     }
diff --git a/ovn/ovn-nb.ovsschema b/ovn/ovn-nb.ovsschema
index 985a0cd..50930b7 100644
--- a/ovn/ovn-nb.ovsschema
+++ b/ovn/ovn-nb.ovsschema
@@ -1,7 +1,7 @@ 
 {
     "name": "OVN_Northbound",
     "version": "1.0.0",
-    "cksum": "3156743511 4790",
+    "cksum": "1432579799 4805",
     "tables": {
         "Logical_Switch": {
             "columns": {
@@ -39,9 +39,9 @@ 
                                       "minInteger": 1,
                                       "maxInteger": 4095},
                               "min": 0, "max": 1}},
-                "macs": {"type": {"key": "string",
-                                  "min": 0,
-                                  "max": "unlimited"}},
+                "addresses": {"type": {"key": "string",
+                                       "min": 0,
+                                       "max": "unlimited"}},
                 "port_security": {"type": {"key": "string",
                                            "min": 0,
                                            "max": "unlimited"}},
diff --git a/ovn/ovn-nb.xml b/ovn/ovn-nb.xml
index 0b93709..e565cda 100644
--- a/ovn/ovn-nb.xml
+++ b/ovn/ovn-nb.xml
@@ -216,7 +216,7 @@ 
       ingress and egress traffic dropped.
     </column>
 
-    <column name="macs">
+    <column name="addresses">
       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>.
       Like a physical Ethernet NIC, a logical port ordinarily has a single
diff --git a/ovn/utilities/ovn-nbctl.8.xml b/ovn/utilities/ovn-nbctl.8.xml
index 1526e61..8d69835 100644
--- a/ovn/utilities/ovn-nbctl.8.xml
+++ b/ovn/utilities/ovn-nbctl.8.xml
@@ -109,17 +109,17 @@ 
         nothing.
       </dd>
 
-      <dt><code>lport-set-macs</code> <var>lport</var> [<var>mac</var>]...</dt>
+      <dt><code>lport-set-addresses</code> <var>lport</var> [<var>address</var>]...</dt>
       <dd>
-        Sets the MACs associated with <var>lport</var> to
-        <var>mac</var>.  Multiple MACs may be sets by using multiple
-        <var>mac</var> arguments.  If no <var>mac</var> argument is
-        given, <var>lport</var> will have no MACs associated with it.
+        Sets the addresses associated with <var>lport</var> to
+        <var>address</var>.  Multiple MACs may be sets by using multiple
+        <var>address</var> arguments.  If no <var>mac</var> argument is given,
+        <var>lport</var> will have no addresses associated with it.
       </dd>
 
-      <dt><code>lport-get-macs</code> <var>lport</var></dt>
+      <dt><code>lport-get-addresses</code> <var>lport</var></dt>
       <dd>
-        Lists all the MACs associated with <var>lport</var> on standard
+        Lists all the addresses associated with <var>lport</var> on standard
         output, one per line.
       </dd>
 
diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c
index 9a274fb..4c8f533 100644
--- a/ovn/utilities/ovn-nbctl.c
+++ b/ovn/utilities/ovn-nbctl.c
@@ -311,9 +311,9 @@  Logical port commands:\n\
   lport-list LSWITCH        print the names of all logical ports on LSWITCH\n\
   lport-get-parent LPORT    get the parent of LPORT if set\n\
   lport-get-tag LPORT       get the LPORT's tag if set\n\
-  lport-set-macs LPORT [MAC]...\n\
-                            set MAC addresses for LPORT.\n\
-  lport-get-macs LPORT      get a list of MAC addresses on LPORT\n\
+  lport-set-addresses LPORT [ADDRESS]...\n\
+                            set addresses for LPORT.\n\
+  lport-get-addresses LPORT      get a list of MAC addresses on LPORT\n\
   lport-set-port-security LPORT [ADDRS]...\n\
                             set port security addresses for LPORT.\n\
   lport-get-port-security LPORT    get LPORT's port security addresses\n\
@@ -402,10 +402,10 @@  print_lswitch(const struct nbrec_logical_switch *lswitch, struct ds *s)
         if (lport->n_tag) {
             ds_put_format(s, "            tag: %"PRIu64"\n", lport->tag[0]);
         }
-        if (lport->n_macs) {
-            ds_put_cstr(s, "            macs:");
-            for (size_t j = 0; j < lport->n_macs; j++) {
-                ds_put_format(s, " %s", lport->macs[j]);
+        if (lport->n_addresses) {
+            ds_put_cstr(s, "            addresses:");
+            for (size_t j = 0; j < lport->n_addresses; j++) {
+                ds_put_format(s, " %s", lport->addresses[j]);
             }
             ds_put_char(s, '\n');
         }
@@ -652,7 +652,7 @@  nbctl_lport_get_tag(struct ctl_context *ctx)
 }
 
 static void
-nbctl_lport_set_macs(struct ctl_context *ctx)
+nbctl_lport_set_addresses(struct ctl_context *ctx)
 {
     const char *id = ctx->argv[1];
     const struct nbrec_logical_port *lport;
@@ -662,16 +662,16 @@  nbctl_lport_set_macs(struct ctl_context *ctx)
         return;
     }
 
-    nbrec_logical_port_set_macs(lport,
+    nbrec_logical_port_set_addresses(lport,
             (const char **) ctx->argv + 2, ctx->argc - 2);
 }
 
 static void
-nbctl_lport_get_macs(struct ctl_context *ctx)
+nbctl_lport_get_addresses(struct ctl_context *ctx)
 {
     const char *id = ctx->argv[1];
     const struct nbrec_logical_port *lport;
-    struct svec macs;
+    struct svec addresses;
     const char *mac;
     size_t i;
 
@@ -680,15 +680,15 @@  nbctl_lport_get_macs(struct ctl_context *ctx)
         return;
     }
 
-    svec_init(&macs);
-    for (i = 0; i < lport->n_macs; i++) {
-        svec_add(&macs, lport->macs[i]);
+    svec_init(&addresses);
+    for (i = 0; i < lport->n_addresses; i++) {
+        svec_add(&addresses, lport->addresses[i]);
     }
-    svec_sort(&macs);
-    SVEC_FOR_EACH(i, mac, &macs) {
+    svec_sort(&addresses);
+    SVEC_FOR_EACH(i, mac, &addresses) {
         ds_put_format(&ctx->output, "%s\n", mac);
     }
-    svec_destroy(&macs);
+    svec_destroy(&addresses);
 }
 
 static void
@@ -1308,9 +1308,10 @@  static const struct ctl_command_syntax nbctl_commands[] = {
       "", RO },
     { "lport-get-tag", 1, 1, "LPORT", NULL, nbctl_lport_get_tag, NULL, "",
       RO },
-    { "lport-set-macs", 1, INT_MAX, "LPORT [MAC]...", NULL,
-      nbctl_lport_set_macs, NULL, "", RW },
-    { "lport-get-macs", 1, 1, "LPORT", NULL, nbctl_lport_get_macs, NULL,
+    { "lport-set-addresses", 1, INT_MAX, "LPORT [ADDRESS]...", NULL,
+      nbctl_lport_set_addresses, NULL, "", RW },
+    { "lport-get-addresses", 1, 1, "LPORT", NULL,
+      nbctl_lport_get_addresses, NULL,
       "", RO },
     { "lport-set-port-security", 0, INT_MAX, "LPORT [ADDRS]...", NULL,
       nbctl_lport_set_port_security, NULL, "", RW },
diff --git a/tests/ovn-controller-vtep.at b/tests/ovn-controller-vtep.at
index 1fbedf5..497386c 100644
--- a/tests/ovn-controller-vtep.at
+++ b/tests/ovn-controller-vtep.at
@@ -336,7 +336,7 @@  OVN_CONTROLLER_VTEP_START
 # creates a simple logical network with the vtep device and a fake hv chassis
 # 'ch0'.
 AT_CHECK([ovn-nbctl lport-add br-test vif0])
-AT_CHECK([ovn-nbctl lport-set-macs vif0 f0:ab:cd:ef:01:02])
+AT_CHECK([ovn-nbctl lport-set-addresses vif0 f0:ab:cd:ef:01:02])
 AT_CHECK([ovn-sbctl chassis-add ch0 vxlan 1.2.3.5])
 AT_CHECK([ovn-sbctl lport-bind vif0 ch0])
 
@@ -350,7 +350,7 @@  OVS_WAIT_UNTIL([test -n "`ovn-sbctl list Port_Binding  | grep br-vtep_lswitch0`"
 AT_CHECK([ovn-nbctl lswitch-add br-void])
 # adds fake hv chassis 'ch1'.
 AT_CHECK([ovn-nbctl lport-add br-void vif1])
-AT_CHECK([ovn-nbctl lport-set-macs vif1 f0:ab:cd:ef:01:02])
+AT_CHECK([ovn-nbctl lport-set-addresses vif1 f0:ab:cd:ef:01:02])
 AT_CHECK([ovn-sbctl chassis-add ch1 vxlan 1.2.3.6])
 AT_CHECK([ovn-sbctl lport-bind vif1 ch1])
 OVS_WAIT_UNTIL([test -n "`ovn-sbctl list Port_Binding | grep vif1`"])
@@ -374,7 +374,7 @@  AT_CHECK([ovs-vsctl --columns=options list Interface bfd1.2.3.5 | cut -d ':' -f2
 ])
 
 # adds another mac to lport.
-AT_CHECK([ovn-nbctl lport-set-macs vif0 f0:ab:cd:ef:01:02 f0:ab:cd:ef:01:03])
+AT_CHECK([ovn-nbctl lport-set-addresses vif0 f0:ab:cd:ef:01:02 f0:ab:cd:ef:01:03])
 OVS_WAIT_UNTIL([test -n "`vtep-ctl list Ucast_Macs_Remote | grep 03`"])
 AT_CHECK([vtep-ctl --columns=MAC list Ucast_Macs_Remote | cut -d ':' -f2- | tr -d ' ' | sort], [0], [dnl
 
@@ -383,15 +383,15 @@  AT_CHECK([vtep-ctl --columns=MAC list Ucast_Macs_Remote | cut -d ':' -f2- | tr -
 ])
 
 # removes one mac to lport.
-AT_CHECK([ovn-nbctl lport-set-macs vif0 f0:ab:cd:ef:01:03])
+AT_CHECK([ovn-nbctl lport-set-addresses vif0 f0:ab:cd:ef:01:03])
 OVS_WAIT_UNTIL([test -z "`vtep-ctl --columns=MAC list Ucast_Macs_Remote | grep 02`"])
 AT_CHECK([vtep-ctl --columns=MAC list Ucast_Macs_Remote | cut -d ':' -f2- | tr -d ' ' | sort], [0], [dnl
 "f0:ab:cd:ef:01:03"
 ])
 
 # migrates mac to lport vif1 on 'br-void'.
-AT_CHECK([ovn-nbctl lport-set-macs vif0])
-AT_CHECK([ovn-nbctl lport-set-macs vif1 f0:ab:cd:ef:01:03])
+AT_CHECK([ovn-nbctl lport-set-addresses vif0])
+AT_CHECK([ovn-nbctl lport-set-addresses vif1 f0:ab:cd:ef:01:03])
 OVS_WAIT_UNTIL([test -z "`vtep-ctl --columns=MAC list Ucast_Macs_Remote | grep 03`"])
 AT_CHECK([vtep-ctl --columns=MAC list Ucast_Macs_Remote | cut -d ':' -f2- | tr -d ' ' | sort], [0], [dnl
 ])
@@ -407,13 +407,13 @@  OVN_CONTROLLER_VTEP_START
 # creates a simple logical network with the vtep device and a fake hv chassis
 # 'ch0'.
 AT_CHECK([ovn-nbctl lport-add br-test vif0])
-AT_CHECK([ovn-nbctl lport-set-macs vif0 f0:ab:cd:ef:01:02])
+AT_CHECK([ovn-nbctl lport-set-addresses vif0 f0:ab:cd:ef:01:02])
 AT_CHECK([ovn-sbctl chassis-add ch0 vxlan 1.2.3.5])
 AT_CHECK([ovn-sbctl lport-bind vif0 ch0])
 
 # creates another vif in the same logical switch with duplicate mac.
 AT_CHECK([ovn-nbctl lport-add br-test vif1])
-AT_CHECK([ovn-nbctl lport-set-macs vif1 f0:ab:cd:ef:01:02])
+AT_CHECK([ovn-nbctl lport-set-addresses vif1 f0:ab:cd:ef:01:02])
 AT_CHECK([ovn-sbctl lport-bind vif1 ch0])
 
 # creates the logical switch in vtep and adds the corresponding logical
@@ -441,7 +441,7 @@  AT_CHECK([ovn-nbctl lport-del vif1])
 AT_CHECK([ovn-nbctl lswitch-add br-void])
 # adds fake hv chassis 'ch1' and vif1 with same mac address as vif0.
 AT_CHECK([ovn-nbctl lport-add br-void vif1])
-AT_CHECK([ovn-nbctl lport-set-macs vif1 f0:ab:cd:ef:01:02])
+AT_CHECK([ovn-nbctl lport-set-addresses vif1 f0:ab:cd:ef:01:02])
 AT_CHECK([ovn-sbctl chassis-add ch1 vxlan 1.2.3.6])
 AT_CHECK([ovn-sbctl lport-bind vif1 ch1])
 OVS_WAIT_UNTIL([test -n "`ovn-sbctl list Port_Binding | grep vif1`"])
diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at
index d55732f..5358f1e 100644
--- a/tests/ovn-nbctl.at
+++ b/tests/ovn-nbctl.at
@@ -69,22 +69,22 @@  AT_CLEANUP
 
 dnl ---------------------------------------------------------------------
 
-AT_SETUP([ovn-nbctl - macs])
+AT_SETUP([ovn-nbctl - addresses])
 OVN_NBCTL_TEST_START
 
 AT_CHECK([ovn-nbctl lswitch-add ls0])
 AT_CHECK([ovn-nbctl lport-add ls0 lp0])
-AT_CHECK([ovn-nbctl lport-get-macs lp0], [0], [dnl
+AT_CHECK([ovn-nbctl lport-get-addresses lp0], [0], [dnl
 ])
 
-AT_CHECK([ovn-nbctl lport-set-macs lp0 00:11:22:33:44:55 unknown])
-AT_CHECK([ovn-nbctl lport-get-macs lp0], [0], [dnl
+AT_CHECK([ovn-nbctl lport-set-addresses lp0 00:11:22:33:44:55 unknown])
+AT_CHECK([ovn-nbctl lport-get-addresses lp0], [0], [dnl
 00:11:22:33:44:55
 unknown
 ])
 
-AT_CHECK([ovn-nbctl lport-set-macs lp0])
-AT_CHECK([ovn-nbctl lport-get-macs lp0], [0], [dnl
+AT_CHECK([ovn-nbctl lport-set-addresses lp0])
+AT_CHECK([ovn-nbctl lport-get-addresses lp0], [0], [dnl
 ])
 
 OVN_NBCTL_TEST_STOP
@@ -97,7 +97,7 @@  OVN_NBCTL_TEST_START
 
 AT_CHECK([ovn-nbctl lswitch-add ls0])
 AT_CHECK([ovn-nbctl lport-add ls0 lp0])
-AT_CHECK([ovn-nbctl lport-get-macs lp0], [0], [dnl
+AT_CHECK([ovn-nbctl lport-get-addresses lp0], [0], [dnl
 ])
 
 AT_CHECK([ovn-nbctl lport-set-port-security lp0 aa:bb:cc:dd:ee:ff 00:11:22:33:44:55])
diff --git a/tests/ovn-sbctl.at b/tests/ovn-sbctl.at
index 674e1e8..523d346 100644
--- a/tests/ovn-sbctl.at
+++ b/tests/ovn-sbctl.at
@@ -35,7 +35,7 @@  OVN_SBCTL_TEST_START
 
 AT_CHECK([ovn-nbctl lswitch-add br-test])
 AT_CHECK([ovn-nbctl lport-add br-test vif0])
-AT_CHECK([ovn-nbctl lport-set-macs vif0 f0:ab:cd:ef:01:02])
+AT_CHECK([ovn-nbctl lport-set-addresses vif0 f0:ab:cd:ef:01:02])
 AT_CHECK([ovn-sbctl chassis-add ch0 stt 1.2.3.5])
 AT_CHECK([ovn-sbctl lport-bind vif0 ch0])
 
@@ -48,7 +48,7 @@  Chassis "ch0"
 
 # adds another 'vif1'
 AT_CHECK([ovn-nbctl lport-add br-test vif1])
-AT_CHECK([ovn-nbctl lport-set-macs vif1 f0:ab:cd:ef:01:03])
+AT_CHECK([ovn-nbctl lport-set-addresses vif1 f0:ab:cd:ef:01:03])
 AT_CHECK([ovn-sbctl lport-bind vif1 ch0])
 
 AT_CHECK([ovn-sbctl show | sed 's/vif[[0-9]]/vif/'], [0], [dnl
diff --git a/tests/ovn.at b/tests/ovn.at
index 095b0d9..a42a319 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -532,9 +532,9 @@  for i in 1 2 3; do
         ovs-vsctl add-port br-int vif$i$j -- set Interface vif$i$j external-ids:iface-id=lp$i$j options:tx_pcap=hv$i/vif$i$j-tx.pcap options:rxq_pcap=hv$i/vif$i$j-rx.pcap ofport-request=$i$j
         ovn-nbctl lport-add lsw0 lp$i$j
 	if test $j = 1; then
-            ovn-nbctl lport-set-macs lp$i$j f0:00:00:00:00:$i$j unknown
+            ovn-nbctl lport-set-addresses lp$i$j f0:00:00:00:00:$i$j unknown
         else
-            ovn-nbctl lport-set-macs lp$i$j f0:00:00:00:00:$i$j
+            ovn-nbctl lport-set-addresses lp$i$j f0:00:00:00:00:$i$j
             ovn-nbctl lport-set-port-security lp$i$j f0:00:00:00:00:$i$j
         fi
     done
diff --git a/tutorial/OVN-Tutorial.md b/tutorial/OVN-Tutorial.md
index e8199a2..ebe424b 100644
--- a/tutorial/OVN-Tutorial.md
+++ b/tutorial/OVN-Tutorial.md
@@ -53,9 +53,9 @@  You can use the `ovn-nbctl` utility to see an overview of the logical topology.
     $ ovn-nbctl show
     lswitch 78687d53-e037-4555-bcd3-f4f8eaf3f2aa (sw0)
         lport sw0-port1
-            macs: 00:00:00:00:00:01
+            addresses: 00:00:00:00:00:01
         lport sw0-port2
-            macs: 00:00:00:00:00:02
+            addresses: 00:00:00:00:00:02
 
 The `ovn-sbctl` utility can be used to see into the state stored in the
 `OVN_Southbound` database.  The `show` command shows that there is a single
@@ -192,14 +192,14 @@  View the logical topology with `ovn-nbctl`.
     $ ovn-nbctl show
     lswitch e3190dc2-89d1-44ed-9308-e7077de782b3 (sw0)
         lport sw0-port1
-            macs: 00:00:00:00:00:01
+            addresses: 00:00:00:00:00:01
         lport sw0-port2
-            macs: 00:00:00:00:00:02
+            addresses: 00:00:00:00:00:02
     lswitch c8ed4c5f-9733-43f6-93da-795b1aabacb1 (sw1)
         lport sw1-port1
-            macs: 00:00:00:00:00:03
+            addresses: 00:00:00:00:00:03
         lport sw1-port2
-            macs: 00:00:00:00:00:04
+            addresses: 00:00:00:00:00:04
 
 Physically, all ports reside on the same chassis.
 
@@ -278,13 +278,13 @@  You can start by viewing the logical topology with `ovn-nbctl`.
     $ ovn-nbctl show
     lswitch b977dc03-79a5-41ba-9665-341a80e1abfd (sw0)
         lport sw0-port1
-            macs: 00:00:00:00:00:01
+            addresses: 00:00:00:00:00:01
         lport sw0-port2
-            macs: 00:00:00:00:00:02
+            addresses: 00:00:00:00:00:02
         lport sw0-port4
-            macs: 00:00:00:00:00:04
+            addresses: 00:00:00:00:00:04
         lport sw0-port3
-            macs: 00:00:00:00:00:03
+            addresses: 00:00:00:00:00:03
 
 Using `ovn-sbctl` to view the state of the system, we can see that there are two
 chassis: one local that we can interact with, and a fake remote chassis. Two
@@ -393,24 +393,24 @@  The logical topology from `ovn-nbctl` should look like this.
     $ ovn-nbctl show
         lswitch 5a652488-cfba-4f3e-929d-00010cdfde40 (provnet1-2)
             lport provnet1-2-physnet1
-                macs: unknown
+                addresses: unknown
             lport provnet1-2-port1
-                macs: 00:00:00:00:00:02
+                addresses: 00:00:00:00:00:02
         lswitch 5829b60a-eda8-4d78-94f6-7017ff9efcf0 (provnet1-4)
             lport provnet1-4-port1
-                macs: 00:00:00:00:00:04
+                addresses: 00:00:00:00:00:04
             lport provnet1-4-physnet1
-                macs: unknown
+                addresses: unknown
         lswitch 06cbbcb6-38e3-418d-a81e-634ec9b54ad6 (provnet1-1)
             lport provnet1-1-port1
-                macs: 00:00:00:00:00:01
+                addresses: 00:00:00:00:00:01
             lport provnet1-1-physnet1
-                macs: unknown
+                addresses: unknown
         lswitch 9cba3b3b-59ae-4175-95f5-b6f1cd9c2afb (provnet1-3)
             lport provnet1-3-physnet1
-                macs: unknown
+                addresses: unknown
             lport provnet1-3-port1
-                macs: 00:00:00:00:00:03
+                addresses: 00:00:00:00:00:03
 
 `port1` on each logical switch represents a regular logical port for a VIF on a
 hypervisor.  `physnet1` on each logical switch is the special `localnet` port.
@@ -547,47 +547,47 @@  set to `101`.
         lswitch 12ea93d0-694b-48e9-adef-d0ddd3ec4ac9 (provnet1-7-101)
             lport provnet1-7-physnet1-101
                 parent: , tag:101
-                macs: unknown
+                addresses: unknown
             lport provnet1-7-101-port1
-                macs: 00:00:00:00:00:07
+                addresses: 00:00:00:00:00:07
         lswitch c9a5ce3a-15ec-48ea-a898-416013463589 (provnet1-4)
             lport provnet1-4-port1
-                macs: 00:00:00:00:00:04
+                addresses: 00:00:00:00:00:04
             lport provnet1-4-physnet1
-                macs: unknown
+                addresses: unknown
         lswitch e07d4f7a-2085-4fbb-9937-d6192b79a397 (provnet1-1)
             lport provnet1-1-physnet1
-                macs: unknown
+                addresses: unknown
             lport provnet1-1-port1
-                macs: 00:00:00:00:00:01
+                addresses: 00:00:00:00:00:01
         lswitch 6c098474-0509-4219-bc9b-eb4e28dd1aeb (provnet1-2)
             lport provnet1-2-physnet1
-                macs: unknown
+                addresses: unknown
             lport provnet1-2-port1
-                macs: 00:00:00:00:00:02
+                addresses: 00:00:00:00:00:02
         lswitch 723c4684-5d58-4202-b8e3-4ba99ad5ed9e (provnet1-8-101)
             lport provnet1-8-101-port1
-                macs: 00:00:00:00:00:08
+                addresses: 00:00:00:00:00:08
             lport provnet1-8-physnet1-101
                 parent: , tag:101
-                macs: unknown
+                addresses: unknown
         lswitch 8444e925-ceb2-4b02-ac20-eb2e4cfb954d (provnet1-6-101)
             lport provnet1-6-physnet1-101
                 parent: , tag:101
-                macs: unknown
+                addresses: unknown
             lport provnet1-6-101-port1
-                macs: 00:00:00:00:00:06
+                addresses: 00:00:00:00:00:06
         lswitch e11e5605-7c46-4395-b28d-cff57451fc7e (provnet1-3)
             lport provnet1-3-port1
-                macs: 00:00:00:00:00:03
+                addresses: 00:00:00:00:00:03
             lport provnet1-3-physnet1
-                macs: unknown
+                addresses: unknown
         lswitch 0706b697-6c92-4d54-bc0a-db5bababb74a (provnet1-5-101)
             lport provnet1-5-101-port1
-                macs: 00:00:00:00:00:05
+                addresses: 00:00:00:00:00:05
             lport provnet1-5-physnet1-101
                 parent: , tag:101
-                macs: unknown
+                addresses: unknown
 
 The physical topology shows that we have 4 regular VIF ports on each simulated
 hypervisor.
diff --git a/tutorial/ovn/env1/add-third-port.sh b/tutorial/ovn/env1/add-third-port.sh
index 51c6190..e2faab2 100755
--- a/tutorial/ovn/env1/add-third-port.sh
+++ b/tutorial/ovn/env1/add-third-port.sh
@@ -16,6 +16,6 @@ 
 set -o xtrace
 
 ovn-nbctl lport-add sw0 sw0-port3
-ovn-nbctl lport-set-macs sw0-port3 00:00:00:00:00:03
+ovn-nbctl lport-set-addresses sw0-port3 00:00:00:00:00:03
 ovn-nbctl lport-set-port-security sw0-port3 00:00:00:00:00:03
 ovs-vsctl add-port br-int lport3 -- set Interface lport3 external_ids:iface-id=sw0-port3
diff --git a/tutorial/ovn/env1/setup.sh b/tutorial/ovn/env1/setup.sh
index 543cde3..78657e9 100755
--- a/tutorial/ovn/env1/setup.sh
+++ b/tutorial/ovn/env1/setup.sh
@@ -27,8 +27,8 @@  ovn-nbctl lport-add sw0 sw0-port1
 ovn-nbctl lport-add sw0 sw0-port2
 
 # Set a MAC address for each of the two logical ports.
-ovn-nbctl lport-set-macs sw0-port1 00:00:00:00:00:01
-ovn-nbctl lport-set-macs sw0-port2 00:00:00:00:00:02
+ovn-nbctl lport-set-addresses sw0-port1 00:00:00:00:00:01
+ovn-nbctl lport-set-addresses sw0-port2 00:00:00:00:00:02
 
 # Set up port security for the two logical ports.  This ensures that
 # the logical port mac address we have configured is the only allowed
diff --git a/tutorial/ovn/env2/setup.sh b/tutorial/ovn/env2/setup.sh
index 9b8a95c..4b8df76 100755
--- a/tutorial/ovn/env2/setup.sh
+++ b/tutorial/ovn/env2/setup.sh
@@ -21,10 +21,10 @@  ovn-nbctl lport-add sw0 sw0-port1
 ovn-nbctl lport-add sw0 sw0-port2 
 ovn-nbctl lport-add sw1 sw1-port1 
 ovn-nbctl lport-add sw1 sw1-port2 
-ovn-nbctl lport-set-macs sw0-port1 00:00:00:00:00:01
-ovn-nbctl lport-set-macs sw0-port2 00:00:00:00:00:02
-ovn-nbctl lport-set-macs sw1-port1 00:00:00:00:00:03
-ovn-nbctl lport-set-macs sw1-port2 00:00:00:00:00:04
+ovn-nbctl lport-set-addresses sw0-port1 00:00:00:00:00:01
+ovn-nbctl lport-set-addresses sw0-port2 00:00:00:00:00:02
+ovn-nbctl lport-set-addresses sw1-port1 00:00:00:00:00:03
+ovn-nbctl lport-set-addresses sw1-port2 00:00:00:00:00:04
 ovn-nbctl lport-set-port-security sw0-port1 00:00:00:00:00:01
 ovn-nbctl lport-set-port-security sw0-port2 00:00:00:00:00:02
 ovn-nbctl lport-set-port-security sw1-port1 00:00:00:00:00:03
diff --git a/tutorial/ovn/env3/setup.sh b/tutorial/ovn/env3/setup.sh
index b554d25..7a7f0a6 100755
--- a/tutorial/ovn/env3/setup.sh
+++ b/tutorial/ovn/env3/setup.sh
@@ -22,10 +22,10 @@  ovn-nbctl lport-add sw0 sw0-port2
 ovn-nbctl lport-add sw0 sw0-port3
 ovn-nbctl lport-add sw0 sw0-port4
 
-ovn-nbctl lport-set-macs sw0-port1 00:00:00:00:00:01
-ovn-nbctl lport-set-macs sw0-port2 00:00:00:00:00:02
-ovn-nbctl lport-set-macs sw0-port3 00:00:00:00:00:03
-ovn-nbctl lport-set-macs sw0-port4 00:00:00:00:00:04
+ovn-nbctl lport-set-addresses sw0-port1 00:00:00:00:00:01
+ovn-nbctl lport-set-addresses sw0-port2 00:00:00:00:00:02
+ovn-nbctl lport-set-addresses sw0-port3 00:00:00:00:00:03
+ovn-nbctl lport-set-addresses sw0-port4 00:00:00:00:00:04
 
 ovn-nbctl lport-set-port-security sw0-port1 00:00:00:00:00:01
 ovn-nbctl lport-set-port-security sw0-port2 00:00:00:00:00:02
diff --git a/tutorial/ovn/env4/setup2.sh b/tutorial/ovn/env4/setup2.sh
index 5eae1d7..361ec99 100755
--- a/tutorial/ovn/env4/setup2.sh
+++ b/tutorial/ovn/env4/setup2.sh
@@ -31,11 +31,11 @@  for n in 1 2 3 4; do
     ovn-nbctl lswitch-add provnet1-$n
 
     ovn-nbctl lport-add provnet1-$n provnet1-$n-port1
-    ovn-nbctl lport-set-macs provnet1-$n-port1 00:00:00:00:00:0$n
+    ovn-nbctl lport-set-addresses provnet1-$n-port1 00:00:00:00:00:0$n
     ovn-nbctl lport-set-port-security provnet1-$n-port1 00:00:00:00:00:0$n
 
     ovn-nbctl lport-add provnet1-$n provnet1-$n-physnet1
-    ovn-nbctl lport-set-macs provnet1-$n-physnet1 unknown
+    ovn-nbctl lport-set-addresses provnet1-$n-physnet1 unknown
     ovn-nbctl lport-set-type provnet1-$n-physnet1 localnet
     ovn-nbctl lport-set-options provnet1-$n-physnet1 network_name=physnet1
 done
diff --git a/tutorial/ovn/env5/setup.sh b/tutorial/ovn/env5/setup.sh
index c637aa2..f73a52d 100755
--- a/tutorial/ovn/env5/setup.sh
+++ b/tutorial/ovn/env5/setup.sh
@@ -41,7 +41,7 @@  for n in 1 2 3 4 5 6 7 8; do
 
     lport_name="$lswitch_name-port1"
     ovn-nbctl lport-add $lswitch_name $lport_name
-    ovn-nbctl lport-set-macs $lport_name 00:00:00:00:00:0$n
+    ovn-nbctl lport-set-addresses $lport_name 00:00:00:00:00:0$n
     ovn-nbctl lport-set-port-security $lport_name 00:00:00:00:00:0$n
 
     if [ $n -gt 4 ] ; then
@@ -51,7 +51,7 @@  for n in 1 2 3 4 5 6 7 8; do
         lport_name="provnet1-$n-physnet1"
         ovn-nbctl lport-add $lswitch_name $lport_name
     fi
-    ovn-nbctl lport-set-macs $lport_name unknown
+    ovn-nbctl lport-set-addresses $lport_name unknown
     ovn-nbctl lport-set-type $lport_name localnet
     ovn-nbctl lport-set-options $lport_name network_name=physnet1
 done
diff --git a/utilities/ovs-sim.1.xml b/utilities/ovs-sim.1.xml
index cedf661..bb63453 100644
--- a/utilities/ovs-sim.1.xml
+++ b/utilities/ovs-sim.1.xml
@@ -276,7 +276,7 @@  for i in 0 1; do
     ovn_attach n1 br-phys 192.168.0.`expr $i + 1`
     ovs-vsctl add-port br-int vif$i -- set Interface vif$i external-ids:iface-id=lp$i
     ovn-nbctl lport-add lsw0 lp$i
-    ovn-nbctl lport-set-macs lp$i f0:00:00:00:00:0$i
+    ovn-nbctl lport-set-addresses lp$i f0:00:00:00:00:0$i
 done
     </pre>
     
@@ -307,7 +307,7 @@  for i in `seq $n`; do
     yy=$(printf %02x $(expr $i / 256))
     xx=$(printf $02x $(expr $i % 256))
     ovn-nbctl lport-add br0 lp$i
-    ovn-nbctl lport-set-macs lp$i f0:00:00:00:$yy:$xx
+    ovn-nbctl lport-set-addresses lp$i f0:00:00:00:$yy:$xx
 done
     </pre>