2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

netdev-dpdk: Indicate the change of etheraddr and mtu.

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>
This commit is contained in:
Alex Wang
2014-04-03 09:46:31 -07:00
parent 3e912ffcbb
commit 045c0d1a77

View 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);