netdev-dpdk: Indicate the change of etheraddr and mtu.
authorAlex Wang <alexw@nicira.com>
Thu, 3 Apr 2014 16:46:31 +0000 (09:46 -0700)
committerAlex Wang <alexw@nicira.com>
Thu, 10 Apr 2014 19:55:28 +0000 (12:55 -0700)
This commit makes the netdev-dpdk module signal the change of
etheraddr and mtu by changing the global sequence number and
incrementing its 'change_seq'.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/netdev-dpdk.c

index 3e47c5b..d9676ed 100644 (file)
@@ -716,6 +716,7 @@ netdev_dpdk_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_change_seq_changed(netdev);
     }
     ovs_mutex_unlock(&dev->mutex);
 
@@ -788,6 +789,7 @@ netdev_dpdk_set_mtu(const struct netdev *netdev, int mtu)
     }
 
     dpdk_mp_put(old_mp);
+    netdev_change_seq_changed(netdev);
 out:
     ovs_mutex_unlock(&dev->mutex);
     ovs_mutex_unlock(&dpdk_mutex);