diff mbox

[dpdk-dev,10/14] vmdq_rx_q

Message ID 1413779906-28113-11-git-send-email-huawei.xie@intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Huawei Xie Oct. 20, 2014, 4:38 a.m. UTC
vmdq_rx_q minior change

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
---
 examples/vhost/main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Thomas Monjalon Oct. 23, 2014, 9:45 a.m. UTC | #1
2014-10-20 12:38, Huawei Xie:
> vmdq_rx_q minior change

This patch should be merged with vhost_dev structure definition (patch 4).
diff mbox

Patch

diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index e0bd452..15cb493 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1722,13 +1722,14 @@  virtio_tx_route_zcp(struct virtio_net *dev, struct rte_mbuf *m,
 	struct virtio_net_data_ll *dev_ll = ll_root_used;
 	struct ether_hdr *pkt_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
 	uint16_t vlan_tag = (uint16_t)vlan_tags[(uint16_t)dev->device_fh];
+	uint16_t vmdq_rx_q = ((struct vhost_dev *)dev->priv)->vmdq_rx_q;
 
 	/*Add packet to the port tx queue*/
-	tx_q = &tx_queue_zcp[(uint16_t)dev->vmdq_rx_q];
+	tx_q = &tx_queue_zcp[vmdq_rx_q];
 	len = tx_q->len;
 
 	/* Allocate an mbuf and populate the structure. */
-	vpool = &vpool_array[MAX_QUEUES + (uint16_t)dev->vmdq_rx_q];
+	vpool = &vpool_array[MAX_QUEUES + vmdq_rx_q];
 	rte_ring_sc_dequeue(vpool->ring, (void **)&mbuf);
 	if (unlikely(mbuf == NULL)) {
 		struct vhost_virtqueue *vq = dev->virtqueue[VIRTIO_TXQ];