netdev: Make naming more consistent
authorJoe Stringer <joestringer@nicira.com>
Fri, 8 Nov 2013 17:41:19 +0000 (09:41 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 11 Nov 2013 16:00:12 +0000 (08:00 -0800)
netdev-dummy and netdev-vport use the function name netdev_poll_notify()
for the same purpose as netdev-linux/bsd's netdev_*_changed(). This patch
changes the former two to be more consistent with the linux/bsd naming
scheme.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/netdev-dummy.c
lib/netdev-vport.c

index fe54576..fd30454 100644 (file)
@@ -91,7 +91,7 @@ struct netdev_rx_dummy {
 
 static unixctl_cb_func netdev_dummy_set_admin_state;
 static int netdev_dummy_construct(struct netdev *);
-static void netdev_dummy_poll_notify(struct netdev_dummy *netdev)
+static void netdev_dummy_changed(struct netdev_dummy *netdev)
     OVS_REQUIRES(netdev->mutex);
 static void netdev_dummy_queue_packet(struct netdev_dummy *, struct ofpbuf *);
 
@@ -571,7 +571,7 @@ netdev_dummy_set_etheraddr(struct netdev *netdev,
     ovs_mutex_lock(&dev->mutex);
     if (!eth_addr_equals(dev->hwaddr, mac)) {
         memcpy(dev->hwaddr, mac, ETH_ADDR_LEN);
-        netdev_dummy_poll_notify(dev);
+        netdev_dummy_changed(dev);
     }
     ovs_mutex_unlock(&dev->mutex);
 
@@ -666,7 +666,7 @@ netdev_dummy_update_flags__(struct netdev_dummy *netdev,
     netdev->flags |= on;
     netdev->flags &= ~off;
     if (*old_flagsp != netdev->flags) {
-        netdev_dummy_poll_notify(netdev);
+        netdev_dummy_changed(netdev);
     }
 
     return 0;
@@ -703,7 +703,7 @@ netdev_dummy_change_seq(const struct netdev *netdev_)
 /* Helper functions. */
 
 static void
-netdev_dummy_poll_notify(struct netdev_dummy *dev)
+netdev_dummy_changed(struct netdev_dummy *dev)
 {
     dev->change_seq++;
     if (!dev->change_seq) {
index 0374ae3..ae4f626 100644 (file)
@@ -71,7 +71,7 @@ struct vport_class {
 static int netdev_vport_construct(struct netdev *);
 static int get_patch_config(const struct netdev *netdev, struct smap *args);
 static int get_tunnel_config(const struct netdev *, struct smap *args);
-static void netdev_vport_poll_notify(struct netdev_vport *netdev)
+static void netdev_vport_changed(struct netdev_vport *netdev)
     OVS_REQUIRES(netdev->mutex);
 
 static bool
@@ -205,7 +205,7 @@ netdev_vport_set_etheraddr(struct netdev *netdev_,
 
     ovs_mutex_lock(&netdev->mutex);
     memcpy(netdev->etheraddr, mac, ETH_ADDR_LEN);
-    netdev_vport_poll_notify(netdev);
+    netdev_vport_changed(netdev);
     ovs_mutex_unlock(&netdev->mutex);
 
     return 0;
@@ -285,7 +285,7 @@ netdev_vport_wait(void)
 /* Helper functions. */
 
 static void
-netdev_vport_poll_notify(struct netdev_vport *ndv)
+netdev_vport_changed(struct netdev_vport *ndv)
 {
     ndv->change_seq++;
     if (!ndv->change_seq) {
@@ -495,7 +495,7 @@ set_tunnel_config(struct netdev *dev_, const struct smap *args)
 
     ovs_mutex_lock(&dev->mutex);
     dev->tnl_cfg = tnl_cfg;
-    netdev_vport_poll_notify(dev);
+    netdev_vport_changed(dev);
     ovs_mutex_unlock(&dev->mutex);
 
     return 0;
@@ -669,7 +669,7 @@ set_patch_config(struct netdev *dev_, const struct smap *args)
     ovs_mutex_lock(&dev->mutex);
     free(dev->peer);
     dev->peer = xstrdup(peer);
-    netdev_vport_poll_notify(dev);
+    netdev_vport_changed(dev);
     ovs_mutex_unlock(&dev->mutex);
 
     return 0;