From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by dpdk.org (Postfix) with ESMTP id 2843958F7 for ; Thu, 15 Jan 2015 17:56:08 +0100 (CET) Received: by mail-pd0-f171.google.com with SMTP id y13so17281816pdi.2 for ; Thu, 15 Jan 2015 08:56:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=ojNVkUftgTTUWjLo96Xl5A4EK1eVeGsZUIvSxKd+Q+c=; b=BHbhhWTHBcbmSt5G+8V1HSPyAcdbtW0H8CmcJo+LRCPEhvDVYxZa6Vi1Ab++cg39yB Ovjp2ZiO9yf9M2Id7WgmJIMX8q/39L/MkE2h/thjARmaRrumPXN2ZRdK4xIrznrQyx8W RiwYuI9SX2Xu8hwPFb3cXZ1Dm3FROvVausehxqFwUdPYZ4CmjFqaJQU+TJeVb6VH+qfc 5SQUgG66Tp7dszyV/j9n6GIYLRqWj7+IMrQMBjOjMuwqOeNNd48ZJvV5bAKrE2ymT4OX hRjr8vVB3GMqS6YRikC4cUIcTw7ayrmZAmlUpQnt9DIVGPgQn4XI+wrDSfrkJLKlPBcc DG4Q== X-Gm-Message-State: ALoCoQlvjMkGrV314sDXjADZMheUuGook5hVrNntXYRZALW6FxjBK7m7Q/VvzBNxHaG7fbajBvhp X-Received: by 10.68.234.170 with SMTP id uf10mr15525148pbc.159.1421340967469; Thu, 15 Jan 2015 08:56:07 -0800 (PST) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id pv3sm1907343pbb.56.2015.01.15.08.56.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 08:56:07 -0800 (PST) Date: Thu, 15 Jan 2015 08:55:57 -0800 From: Stephen Hemminger To: Ouyang Changchun Message-ID: <20150115085557.0d4c147f@urahara> In-Reply-To: <1421298930-15210-23-git-send-email-changchun.ouyang@intel.com> References: <1421298930-15210-1-git-send-email-changchun.ouyang@intel.com> <1421298930-15210-23-git-send-email-changchun.ouyang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [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 16:56:08 -0000 On Thu, 15 Jan 2015 13:15:30 +0800 Ouyang Changchun wrote: > 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); > If you resubmit, just combine this with earlier patch that does vlan strip