From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 03/13] rte_ether: set PKT_RX_VLAN_STRIPPED in rte_vlan_strip() Date: Mon, 30 Jan 2017 10:54:08 +0100 Message-ID: <1643890.a9zoQB8M0i@xps13> References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , olivier.matz@6wind.com Return-path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 160353B5 for ; Mon, 30 Jan 2017 10:54:10 +0100 (CET) Received: by mail-wm0-f41.google.com with SMTP id b65so24801561wmf.0 for ; Mon, 30 Jan 2017 01:54:10 -0800 (PST) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" It is fixing the introduction of the new flag PKT_RX_VLAN_STRIPPED. Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN") This patch is applying the flag to the software emulation case (currently only for virtio). So the comment of this flag should be changed: /** * A vlan has been stripped by the hardware and its tci is saved in * mbuf->vlan_tci. This can only happen if vlan stripping is enabled * in the RX configuration of the PMD. */ #define PKT_RX_VLAN_STRIPPED (1ULL << 6) = =20 > Signed-off-by: Micha=C5=82 Miros=C5=82aw [...] > --- a/lib/librte_net/rte_ether.h > +++ b/lib/librte_net/rte_ether.h > @@ -357,7 +357,7 @@ static inline int rte_vlan_strip(struct rte_mbuf = *m) > =09=09return -1; > =20 > =09struct vlan_hdr *vh =3D (struct vlan_hdr *)(eh + 1); > -=09m->ol_flags |=3D PKT_RX_VLAN_PKT; > +=09m->ol_flags |=3D PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED; > =09m->vlan_tci =3D rte_be_to_cpu_16(vh->vlan_tci); > =20 > =09/* Copy ether header over rather than moving whole packet */ I think this flag should also be removed in the function rte_vlan_inser= t().