diff --git a/vnet/vnet/devices/dpdk/cli.c b/vnet/vnet/devices/dpdk/cli.c
index f257a8b..2ffb958 100644
--- a/vnet/vnet/devices/dpdk/cli.c
+++ b/vnet/vnet/devices/dpdk/cli.c
@@ -713,7 +713,7 @@
   hw = vnet_get_hw_interface (dm->vnet_main, hw_if_index);
   xd = vec_elt_at_index (dm->devices, hw->dev_instance);
 
-  if (xd->dev_type != VNET_DPDK_DEV_ETH)
+  if ((xd->flags & DPDK_DEVICE_FLAG_PMD) == 0)
     return clib_error_return (0, "number of descriptors can be set only for "
 			      "physical devices");
 
diff --git a/vnet/vnet/devices/dpdk/device.c b/vnet/vnet/devices/dpdk/device.c
index 2ccfcda..be54bd2 100644
--- a/vnet/vnet/devices/dpdk/device.c
+++ b/vnet/vnet/devices/dpdk/device.c
@@ -323,7 +323,7 @@
        * This device only supports one TX queue,
        * and we're running multi-threaded...
        */
-      if (PREDICT_FALSE (xd->dev_type != VNET_DPDK_DEV_VHOST_USER &&
+      if (PREDICT_FALSE ((xd->flags & DPDK_DEVICE_FLAG_VHOST_USER) == 0 &&
 			 xd->lockp != 0))
 	{
 	  queue_id = queue_id % xd->tx_q_used;
@@ -332,7 +332,7 @@
 	    queue_id = (queue_id + 1) % xd->tx_q_used;
 	}
 
-      if (PREDICT_TRUE (xd->dev_type == VNET_DPDK_DEV_ETH))
+      if (PREDICT_TRUE (xd->flags & DPDK_DEVICE_FLAG_PMD))
 	{
 	  if (PREDICT_TRUE (tx_head > tx_tail))
 	    {
@@ -366,7 +366,7 @@
 	    }
 	}
 #if DPDK_VHOST_USER
-      else if (xd->dev_type == VNET_DPDK_DEV_VHOST_USER)
+      else if (xd->flags & DPDK_DEVICE_FLAG_VHOST_USER)
 	{
 	  u32 offset = 0;
 	  if (xd->need_txlock)
@@ -484,7 +484,7 @@
 	}
 #endif
 #if RTE_LIBRTE_KNI
-      else if (xd->dev_type == VNET_DPDK_DEV_KNI)
+      else if (xd->flags & DPDK_DEVICE_FLAG_KNI)
 	{
 	  if (PREDICT_TRUE (tx_head > tx_tail))
 	    {
@@ -522,7 +522,7 @@
 	  rv = 0;
 	}
 
-      if (PREDICT_FALSE (xd->dev_type != VNET_DPDK_DEV_VHOST_USER &&
+      if (PREDICT_FALSE ((xd->flags & DPDK_DEVICE_FLAG_VHOST_USER) == 0 &&
 			 xd->lockp != 0))
 	*xd->lockp[queue_id] = 0;
 
@@ -919,7 +919,7 @@
   dpdk_main_t *dm = &dpdk_main;
   dpdk_device_t *xd = vec_elt_at_index (dm->devices, hi->dev_instance);
 
-  if (!xd || xd->dev_type != VNET_DPDK_DEV_VHOST_USER)
+  if (!xd || (xd->flags & DPDK_DEVICE_FLAG_VHOST_USER) == 0)
     {
       clib_warning
 	("cannot renumber non-vhost-user interface (sw_if_index: %d)",
@@ -950,7 +950,7 @@
 	       sizeof (xd->last_cleared_xstats[0]));
 
 #if DPDK_VHOST_USER
-  if (PREDICT_FALSE (xd->dev_type == VNET_DPDK_DEV_VHOST_USER))
+  if (PREDICT_FALSE (xd->flags & DPDK_DEVICE_FLAG_VHOST_USER))
     {
       int i;
       for (i = 0; i < xd->rx_q_used * VIRTIO_QNUM; i++)
@@ -1025,7 +1025,7 @@
   int rv = 0;
 
 #ifdef RTE_LIBRTE_KNI
-  if (xd->dev_type == VNET_DPDK_DEV_KNI)
+  if (xd->flags & DPDK_DEVICE_FLAG_KNI)
     {
       if (is_up)
 	{
@@ -1066,7 +1066,7 @@
     }
 #endif
 #if DPDK_VHOST_USER
-  if (xd->dev_type == VNET_DPDK_DEV_VHOST_USER)
+  if (xd->flags & DPDK_DEVICE_FLAG_VHOST_USER)
     {
       if (is_up)
 	{
@@ -1172,7 +1172,7 @@
   else if (xd->vlan_subifs)
     xd->vlan_subifs--;
 
-  if (xd->dev_type != VNET_DPDK_DEV_ETH)
+  if ((xd->flags & DPDK_DEVICE_FLAG_PMD) == 0)
     return 0;
 
   /* currently we program VLANS only for IXGBE VF and I40E VF */
diff --git a/vnet/vnet/devices/dpdk/dpdk.h b/vnet/vnet/devices/dpdk/dpdk.h
index e7c177b..025ebf4 100644
--- a/vnet/vnet/devices/dpdk/dpdk.h
+++ b/vnet/vnet/devices/dpdk/dpdk.h
@@ -75,14 +75,6 @@
 extern vlib_node_registration_t dpdk_input_node;
 extern vlib_node_registration_t handoff_dispatch_node;
 
-typedef enum
-{
-  VNET_DPDK_DEV_ETH = 1,	/* Standard DPDK PMD driver */
-  VNET_DPDK_DEV_KNI,		/* Kernel NIC Interface */
-  VNET_DPDK_DEV_VHOST_USER,
-  VNET_DPDK_DEV_UNKNOWN,	/* must be last */
-} dpdk_device_type_t;
-
 #define foreach_dpdk_pmd          \
   _ ("rte_nicvf_pmd", THUNDERX)	  \
   _ ("rte_em_pmd", E1000EM)       \
@@ -214,13 +206,15 @@
   /* number of sub-interfaces */
   u16 vlan_subifs;
 
-  dpdk_device_type_t dev_type:8;
   dpdk_pmd_t pmd:8;
   i8 cpu_socket;
 
   u16 flags;
-#define DPDK_DEVICE_FLAG_ADMIN_UP (1 << 0)
-#define DPDK_DEVICE_FLAG_PROMISC  (1 << 1)
+#define DPDK_DEVICE_FLAG_ADMIN_UP       (1 << 0)
+#define DPDK_DEVICE_FLAG_PROMISC        (1 << 1)
+#define DPDK_DEVICE_FLAG_PMD            (1 << 2)
+#define DPDK_DEVICE_FLAG_KNI            (1 << 3)
+#define DPDK_DEVICE_FLAG_VHOST_USER     (1 << 4)
 
     CLIB_CACHE_LINE_ALIGN_MARK (cacheline1);
 
diff --git a/vnet/vnet/devices/dpdk/dpdk_priv.h b/vnet/vnet/devices/dpdk/dpdk_priv.h
index 0abe630..fd4f2d7 100644
--- a/vnet/vnet/devices/dpdk/dpdk_priv.h
+++ b/vnet/vnet/devices/dpdk/dpdk_priv.h
@@ -88,7 +88,7 @@
   u64 rxerrors, last_rxerrors;
 
   /* only update counters for PMD interfaces */
-  if (xd->dev_type != VNET_DPDK_DEV_ETH)
+  if ((xd->flags & DPDK_DEVICE_FLAG_PMD) == 0)
     return;
 
   xd->time_last_stats_update = now ? now : xd->time_last_stats_update;
diff --git a/vnet/vnet/devices/dpdk/format.c b/vnet/vnet/devices/dpdk/format.c
index 1f401a9..ef7ee0e 100644
--- a/vnet/vnet/devices/dpdk/format.c
+++ b/vnet/vnet/devices/dpdk/format.c
@@ -166,14 +166,14 @@
     devname_format = "%s%x/%x/%x";
 
 #ifdef RTE_LIBRTE_KNI
-  if (dm->devices[i].dev_type == VNET_DPDK_DEV_KNI)
+  if (dm->devices[i].flags & DPDK_DEVICE_FLAG_KNI)
     {
       return format (s, "kni%d", dm->devices[i].kni_port_id);
     }
   else
 #endif
 #if DPDK_VHOST_USER
-  if (dm->devices[i].dev_type == VNET_DPDK_DEV_VHOST_USER)
+  if (dm->devices[i].flags & DPDK_DEVICE_FLAG_VHOST_USER)
     {
       return format (s, "VirtualEthernet0/0/%d", dm->devices[i].vu_if_id);
     }
@@ -226,11 +226,11 @@
   char *dev_type;
   u32 i = va_arg (*args, u32);
 
-  if (dm->devices[i].dev_type == VNET_DPDK_DEV_KNI)
+  if (dm->devices[i].flags & DPDK_DEVICE_FLAG_KNI)
     {
       return format (s, "Kernel NIC Interface");
     }
-  else if (dm->devices[i].dev_type == VNET_DPDK_DEV_VHOST_USER)
+  else if (dm->devices[i].flags & DPDK_DEVICE_FLAG_VHOST_USER)
     {
       return format (s, "vhost-user interface");
     }
@@ -401,7 +401,7 @@
 
   rte_eth_dev_info_get (xd->device_index, &di);
 
-  if (verbose > 1 && xd->dev_type == VNET_DPDK_DEV_ETH)
+  if (verbose > 1 && xd->flags & DPDK_DEVICE_FLAG_PMD)
     {
       struct rte_pci_device *pci;
       struct rte_eth_rss_conf rss_conf;
@@ -455,7 +455,7 @@
 		  format_dpdk_rss_hf_name, di.flow_type_rss_offloads);
     }
 
-  if (verbose && xd->dev_type == VNET_DPDK_DEV_VHOST_USER)
+  if (verbose && xd->flags & DPDK_DEVICE_FLAG_VHOST_USER)
     {
       s = format (s, "%Uqueue size (max):  rx %d (%d) tx %d (%d)\n",
 		  format_white_space, indent + 2,
@@ -527,7 +527,7 @@
 #endif
 
 #if DPDK_VHOST_USER
-  if (verbose && xd->dev_type == VNET_DPDK_DEV_VHOST_USER)
+  if (verbose && xd->flags & DPDK_DEVICE_FLAG_VHOST_USER)
     {
       int i;
       for (i = 0; i < xd->rx_q_used * VIRTIO_QNUM; i++)
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c
index 7b65720..a2cc884 100644
--- a/vnet/vnet/devices/dpdk/init.c
+++ b/vnet/vnet/devices/dpdk/init.c
@@ -405,7 +405,7 @@
       else
 	xd->rx_q_used = 1;
 
-      xd->dev_type = VNET_DPDK_DEV_ETH;
+      xd->flags |= DPDK_DEVICE_FLAG_PMD;
 
       /* workaround for drivers not setting driver_name */
       if ((!dev_info.driver_name) && (dev_info.pci_dev))
@@ -755,7 +755,7 @@
 
 	  /* Create vnet interface */
 	  vec_add2_aligned (dm->devices, xd, 1, CLIB_CACHE_LINE_BYTES);
-	  xd->dev_type = VNET_DPDK_DEV_KNI;
+	  xd->flags |= DPDK_DEVICE_FLAG_KNI;
 
 	  xd->device_index = xd - dm->devices;
 	  ASSERT (nports + i == xd->device_index);
@@ -1458,7 +1458,7 @@
   u8 hw_flags_chg = 0;
 
   /* only update link state for PMD interfaces */
-  if (xd->dev_type != VNET_DPDK_DEV_ETH)
+  if ((xd->flags & DPDK_DEVICE_FLAG_PMD) == 0)
     return;
 
   xd->time_last_link_update = now ? now : xd->time_last_link_update;
@@ -1757,7 +1757,7 @@
 	  dpdk_update_link_state (xd, now);
 
 #if DPDK_VHOST_USER
-	if (xd->dev_type == VNET_DPDK_DEV_VHOST_USER)
+	if (xd->flags & DPDK_DEVICE_FLAG_VHOST_USER)
 	  if (dpdk_vhost_user_process_if (vm, xd, vu_state) != 0)
 	    continue;
 #endif
diff --git a/vnet/vnet/devices/dpdk/node.c b/vnet/vnet/devices/dpdk/node.c
index 54a6a50..5852b3d 100644
--- a/vnet/vnet/devices/dpdk/node.c
+++ b/vnet/vnet/devices/dpdk/node.c
@@ -287,7 +287,7 @@
   n_left = VLIB_FRAME_SIZE;
   n_buffers = 0;
 
-  if (PREDICT_TRUE (xd->dev_type == VNET_DPDK_DEV_ETH))
+  if (PREDICT_TRUE (xd->flags & DPDK_DEVICE_FLAG_PMD))
     {
       while (n_left)
 	{
@@ -303,7 +303,7 @@
 	}
     }
 #if DPDK_VHOST_USER
-  else if (xd->dev_type == VNET_DPDK_DEV_VHOST_USER)
+  else if (xd->flags & DPDK_DEVICE_FLAG_VHOST_USER)
     {
       vlib_main_t *vm = vlib_get_main ();
       vlib_buffer_main_t *bm = vm->buffer_main;
@@ -367,7 +367,7 @@
     }
 #endif
 #ifdef RTE_LIBRTE_KNI
-  else if (xd->dev_type == VNET_DPDK_DEV_KNI)
+  else if (xd->flags & DPDK_DEVICE_FLAG_KNI)
     {
       n_buffers =
 	rte_kni_rx_burst (xd->kni, xd->rx_vectors[queue_id], VLIB_FRAME_SIZE);
diff --git a/vnet/vnet/devices/dpdk/vhost_user.c b/vnet/vnet/devices/dpdk/vhost_user.c
index 58cff7b..f8910ad 100644
--- a/vnet/vnet/devices/dpdk/vhost_user.c
+++ b/vnet/vnet/devices/dpdk/vhost_user.c
@@ -137,7 +137,7 @@
   vnet_hw_interface_t *hi = vnet_get_hw_interface (vnm, hw_if_index);
   dpdk_device_t *xd = vec_elt_at_index (dm->devices, hi->dev_instance);
 
-  if (xd->dev_type != VNET_DPDK_DEV_VHOST_USER)
+  if ((xd->flags DPDK_DEVICE_FLAG_VHOST_USER) == 0)
     return 0;
 
   return xd;
@@ -221,7 +221,7 @@
       if (vec_len (dm->devices) > vui_idx)
 	{
 	  xd = vec_elt_at_index (dm->devices, vui_idx);
-	  if (xd->dev_type == VNET_DPDK_DEV_VHOST_USER)
+	  if (xd->flags & DPDK_DEVICE_FLAG_VHOST_USER)
 	    {
 	      DBG_SOCK
 		("reusing inactive vhost-user interface sw_if_index %d",
@@ -283,7 +283,7 @@
     {
       // vui was not retrieved from inactive ifaces - create new
       vec_add2_aligned (dm->devices, xd, 1, CLIB_CACHE_LINE_BYTES);
-      xd->dev_type = VNET_DPDK_DEV_VHOST_USER;
+      xd->flags |= DPDK_DEVICE_FLAG_VHOST_USER;
       xd->rx_q_used = num_qpairs;
       xd->tx_q_used = num_qpairs;
       xd->vu_vhost_dev.virt_qp_nb = num_qpairs;
@@ -1661,7 +1661,7 @@
 
   vec_foreach (xd, dm->devices)
   {
-    if (xd->dev_type == VNET_DPDK_DEV_VHOST_USER && xd->vu_intf->active)
+    if ((xd->flags & DPDK_DEVICE_FLAG_VHOST_USER) && xd->vu_intf->active)
       vec_add1 (hw_if_indices, xd->vlib_hw_if_index);
   }
 
@@ -1988,7 +1988,7 @@
     {
       vec_foreach (xd, dm->devices)
       {
-	if (xd->dev_type == VNET_DPDK_DEV_VHOST_USER && xd->vu_intf->active)
+	if ((xd->flags DPDK_DEVICE_FLAG_VHOST_USER) && xd->vu_intf->active)
 	  vec_add1 (hw_if_indices, xd->vlib_hw_if_index);
       }
     }
