 +int ovs_vale_ctl(const char *, int, int);
 +int ovs_vale_send(struct net_device *, struct sk_buff *skb);
 diff --git a/datapath/linux/Kbuild.in b/datapath/linux/Kbuild.in
-index 9e3259f..19e5933 100644
+index 9e3259f19..a88c33ade 100644
 --- a/datapath/linux/Kbuild.in
 +++ b/datapath/linux/Kbuild.in
-@@ -13,6 +13,13 @@ ccflags-y += -I$(builddir)/..
+@@ -13,6 +13,12 @@ ccflags-y += -I$(builddir)/..
  ccflags-y += -g
  ccflags-y += -include $(builddir)/kcompat.h
  
 +ifneq (@NETMAP_DIR@,)
 +NETMAP_DIR := @NETMAP_DIR@
 +EXTRA_CFLAGS += -I$(NETMAP_DIR) -I$(NETMAP_DIR)/LINUX -I$(NETMAP_DIR)/sys -I$(NETMAP_DIR)/sys/dev -DDEV_NETMAP -DWITH_VALE
-+#EXTRA_CFLAGS += -I$(NETMAP_DIR) -I$(NETMAP_DIR)/sys -I$(NETMAP_DIR)/sys/dev -DDEV_NETMAP -DNETMAP_API_4
 +KBUILD_EXTRA_SYMBOLS = $(NETMAP_DIR)/Module.symvers
 +endif
 +

+		strncpy(nmr.nr_name, OVS_VALE_PREFIX, sizeof(nmr.nr_name));
+		if (netmap_bdg_ctl(&nmr, NULL) == ENOENT) {
+			vale_dp_initialized = 0;
+			D("%s is destroyed", OVS_VALE_PREFIX);
+		}
+	}
+	return error;

 	if (vport->dev->flags & IFF_LOOPBACK ||
 	    vport->dev->type != ARPHRD_ETHER ||
 	    ovs_is_internal_dev(vport->dev)) {
@@ -175,6 +194,9 @@ static void netdev_destroy(struct vport *vport)
 	if (vport->dev->priv_flags & IFF_OVS_DATAPATH)
 		ovs_netdev_detach_dev(vport);
 	rtnl_unlock();
