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 <[email protected]>
---

This patch makes the function names more consistent. BSD only increments
change_seq, just like dummy and vport. The next patch will make the parameter
unused; Is it better to remain consistent with the linux signature (with
OVS_UNUSED), or drop the parameter in that patch? Should these functions
ultimately still require the netdev mutex when they no longer change local
state?

Currently, I've gone with overall consistency---OVS_UNUSED and mutex remaining
in the prototype. I can change this if necessary.

---
 lib/netdev-dummy.c |    8 ++++----
 lib/netdev-vport.c |   10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c
index fe54576..fd30454 100644
--- a/lib/netdev-dummy.c
+++ b/lib/netdev-dummy.c
@@ -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) {
diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
index 0374ae3..ae4f626 100644
--- a/lib/netdev-vport.c
+++ b/lib/netdev-vport.c
@@ -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;
-- 
1.7.9.5

_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to