summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorYuanhan Liu <yuanhan.liu@linux.intel.com>2016-03-25 15:58:52 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-03-25 19:53:00 +0100
commit1a95fe0be196ba80a29d5fc74481060a3c9b31b8 (patch)
treecd96ee7c88148a36ad7d3776d2dc053ee8f08c58 /examples
parentdf40169ac0e2f82847812b4082258dee518572fb (diff)
downloaddpdk-1a95fe0be196ba80a29d5fc74481060a3c9b31b8.zip
dpdk-1a95fe0be196ba80a29d5fc74481060a3c9b31b8.tar.gz
dpdk-1a95fe0be196ba80a29d5fc74481060a3c9b31b8.tar.xz
examples/vhost: fix VLAN tag
While the last arg of virtio_tx_route() asks a vlan tag, we currently feed it with device_fh, which is wrong. Fix it. Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application") Reported-by: Qian Xu <qian.q.xu@intel.com> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/vhost/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 86e5c24..28c17af 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -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*/