+ const struct netdev_class *class = netdev_get_class(netdev);
+ const char *dpif_port = netdev_vport_class_get_dpif_port(class);
+ return dpif_port ? dpif_port : netdev_get_name(netdev);
+ }
+}
+
+char *
+netdev_vport_get_dpif_port_strdup(const struct netdev *netdev)
+{
+ char namebuf[NETDEV_VPORT_NAME_BUFSIZE];
+
+ return xstrdup(netdev_vport_get_dpif_port(netdev, namebuf,
+ sizeof namebuf));
+}
+
+/* Whenever the route-table change number is incremented,
+ * netdev_vport_route_changed() should be called to update
+ * the corresponding tunnel interface status. */
+static void
+netdev_vport_route_changed(void)
+{
+ struct netdev **vports;
+ size_t i, n_vports;
+
+ vports = netdev_get_vports(&n_vports);
+ for (i = 0; i < n_vports; i++) {
+ struct netdev *netdev_ = vports[i];
+ struct netdev_vport *netdev = netdev_vport_cast(netdev_);
+
+ ovs_mutex_lock(&netdev->mutex);
+ /* Finds all tunnel vports. */
+ if (netdev->tnl_cfg.ip_dst) {
+ if (tunnel_check_status_change__(netdev)) {
+ netdev_change_seq_changed(netdev_);
+ }
+ }
+ netdev_close(netdev_);
+ ovs_mutex_unlock(&netdev->mutex);