examples/vhost: fix VLAN tag
[dpdk.git] / examples / vhost / main.c
index 86e5c24..28c17af 100644 (file)
@@ -1396,8 +1396,10 @@ switch_worker(__attribute__((unused)) void *arg)
                                                        rte_pktmbuf_free(pkts_burst[--tx_count]);
                                        }
                                }
-                               for (i = 0; i < tx_count; ++i)
-                                       virtio_tx_route(vdev, pkts_burst[i], (uint16_t)dev->device_fh);
+                               for (i = 0; i < tx_count; ++i) {
+                                       virtio_tx_route(vdev, pkts_burst[i],
+                                               vlan_tags[(uint16_t)dev->device_fh]);
+                               }
                        }
 
                        /*move to the next device in the list*/