From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 1/3] net/netvsc: support receive without vlan strip Date: Fri, 14 Dec 2018 08:28:44 -0800 Message-ID: <20181214082844.2b125896@xeon-e3> References: <20181214012621.15213-1-stephen@networkplumber.org> <20181214012621.15213-2-stephen@networkplumber.org> <52a74eca-3de8-c2bf-08ad-cf7602c63ffc@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Stephen Hemminger To: Ferruh Yigit Return-path: Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id 640411B676 for ; Fri, 14 Dec 2018 17:28:47 +0100 (CET) Received: by mail-pf1-f195.google.com with SMTP id c73so3056936pfe.13 for ; Fri, 14 Dec 2018 08:28:47 -0800 (PST) In-Reply-To: <52a74eca-3de8-c2bf-08ad-cf7602c63ffc@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 14 Dec 2018 16:09:33 +0000 Ferruh Yigit wrote: > On 12/14/2018 1:26 AM, Stephen Hemminger wrote: > > In some cases, VLAN stripping is not desireable. If necessary > > re-insert stripped vlan tag. > > > > Signed-off-by: Stephen Hemminger > > <...> > > > @@ -501,6 +501,14 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb, > > if (info->vlan_info != HN_NDIS_VLAN_INFO_INVALID) { > > m->vlan_tci = info->vlan_info; > > m->ol_flags |= PKT_RX_VLAN_STRIPPED | PKT_RX_VLAN; > > + > > + /* NDIS always strips tag, put it back if necessary */ > > + if (!hv->vlan_strip && rte_vlan_insert(&m)) { > > Should 'PKT_RX_VLAN_STRIPPED' flag removed when vlan inserted back? This is already done by rte_vlan_insert()