Thread (12 messages) 12 messages, 2 authors, 2016-03-25
STALE3766d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 4/4] examples/vhost: fix wrong vlan_tag

From: Yuanhan Liu <hidden>
Date: 2016-03-25 05:59:05
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
Signed-off-by: Yuanhan Liu <redacted>
---
 examples/vhost/main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index ae1e110..00ae0de 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1364,8 +1364,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*/
-- 
1.9.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help