From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E1E135AA8 for ; Thu, 15 Jan 2015 06:16:28 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 14 Jan 2015 21:11:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,401,1418112000"; d="scan'208";a="662128228" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 14 Jan 2015 21:16:27 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t0F5GPck002223; Thu, 15 Jan 2015 13:16:25 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t0F5GMCJ015398; Thu, 15 Jan 2015 13:16:24 +0800 Received: (from couyang@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0F5GMc0015394; Thu, 15 Jan 2015 13:16:22 +0800 From: Ouyang Changchun To: dev@dpdk.org Date: Thu, 15 Jan 2015 13:15:30 +0800 Message-Id: <1421298930-15210-23-git-send-email-changchun.ouyang@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1421298930-15210-1-git-send-email-changchun.ouyang@intel.com> References: <1421298930-15210-1-git-send-email-changchun.ouyang@intel.com> Subject: [dpdk-dev] [PATCH 22/22] virtio: Use soft vlan strip in mergeable Rx path 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: Thu, 15 Jan 2015 05:16:35 -0000 To keep the consistent logic with normal Rx path, the mergeable Rx path also needs software vlan strip/decap if it is enabled. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_virtio/virtio_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_pmd_virtio/virtio_rxtx.c b/lib/librte_pmd_virtio/virtio_rxtx.c index 2529dc4..9090613 100644 --- a/lib/librte_pmd_virtio/virtio_rxtx.c +++ b/lib/librte_pmd_virtio/virtio_rxtx.c @@ -568,6 +568,7 @@ virtio_recv_mergeable_pkts(void *rx_queue, uint16_t nb_pkts) { struct virtqueue *rxvq = rx_queue; + struct virtio_hw *hw = rxvq->hw; struct rte_mbuf *rxm, *new_mbuf; uint16_t nb_used, num, nb_rx = 0; uint32_t len[VIRTIO_MBUF_BURST_SZ]; @@ -674,6 +675,9 @@ virtio_recv_mergeable_pkts(void *rx_queue, seg_res -= rcv_cnt; } + if (hw->vlan_strip) + rte_vlan_strip(rx_pkts[nb_rx]); + VIRTIO_DUMP_PACKET(rx_pkts[nb_rx], rx_pkts[nb_rx]->data_len); -- 1.8.4.2