[dpdk-dev,10/14] vmdq_rx_q
Commit Message
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
2014-10-20 12:38, Huawei Xie:
> vmdq_rx_q minior change
This patch should be merged with vhost_dev structure definition (patch 4).
@@ -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];