From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8B7A27E0B for ; Mon, 20 Oct 2014 06:31:00 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 19 Oct 2014 21:32:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,749,1406617200"; d="scan'208";a="592145302" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 19 Oct 2014 21:39:08 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id s9K4d6Na004169; Mon, 20 Oct 2014 12:39:06 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s9K4d43J028218; Mon, 20 Oct 2014 12:39:06 +0800 Received: (from hxie5@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id s9K4d4Pb028214; Mon, 20 Oct 2014 12:39:04 +0800 From: Huawei Xie To: dev@dpdk.org Date: Mon, 20 Oct 2014 12:38:22 +0800 Message-Id: <1413779906-28113-11-git-send-email-huawei.xie@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1413779906-28113-1-git-send-email-huawei.xie@intel.com> References: <1413779906-28113-1-git-send-email-huawei.xie@intel.com> Subject: [dpdk-dev] [PATCH 10/14] vmdq_rx_q X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2014 04:31:04 -0000 vmdq_rx_q minior change Signed-off-by: Huawei Xie --- examples/vhost/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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]; -- 1.8.1.4