From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 423A547D0 for ; Fri, 25 Mar 2016 06:59:05 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 24 Mar 2016 22:59:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,388,1455004800"; d="scan'208";a="675375703" Received: from yliu-dev.sh.intel.com ([10.239.66.49]) by FMSMGA003.fm.intel.com with ESMTP; 24 Mar 2016 22:59:03 -0700 From: Yuanhan Liu To: dev@dpdk.org Cc: huawei.xie@intel.com, Thomas Monjalon , Ksiadz MarcinX , Yuanhan Liu Date: Fri, 25 Mar 2016 14:01:34 +0800 Message-Id: <1458885694-31111-5-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1458885694-31111-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1458885694-31111-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-dev] [PATCH 4/4] examples/vhost: fix wrong vlan_tag 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: Fri, 25 Mar 2016 05:59:05 -0000 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 Signed-off-by: Yuanhan Liu --- 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