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: Sun, 30 Apr 2017 17:58:45 +0200 Message-ID: <5260370.FTaY66JWmf@xps> References: <1643890.a9zoQB8M0i@xps13> <20170209165638.34019d58@glumotte.dev.6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , dev@dpdk.org To: Olivier MATZ Return-path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 5ADCF689E for ; Sun, 30 Apr 2017 17:58:48 +0200 (CEST) In-Reply-To: <20170209165638.34019d58@glumotte.dev.6wind.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" 09/02/2017 16:56, Olivier MATZ: > Hi, >=20 > On Mon, 30 Jan 2017 10:54:08 +0100, Thomas Monjalon > wrote: > > It is fixing the introduction of the new flag PKT_RX_VLAN_STRIPPED. > >=20 > > Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN") > >=20 > > This patch is applying the flag to the software emulation case > > (currently only for virtio). > > So the comment of this flag should be changed: > >=20 > > /** > > * 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 > >=20 > >=20 > > > Signed-off-by: Micha=C5=82 Miros=C5=82aw =20 > > [...] > > > --- 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) return -1; > > > =20 > > > struct vlan_hdr *vh =3D (struct vlan_hdr *)(eh + 1); > > > - m->ol_flags |=3D PKT_RX_VLAN_PKT; > > > + m->ol_flags |=3D PKT_RX_VLAN_PKT | PKT_RX_VLAN_STRIPPED; > > > m->vlan_tci =3D rte_be_to_cpu_16(vh->vlan_tci); > > > =20 > > > /* Copy ether header over rather than moving whole packet > > > */ =20 > >=20 > > I think this flag should also be removed in the function > > rte_vlan_insert(). >=20 > Agree with Thomas, I think rte_vlan_insert() should be updated too. >=20 > But I don't think the comment of the mbuf flag should be changed: > "stripped by the hardware" is a bit ambiguous for virtual drivers, but > we can understand that for virtual drivers the same work is done in > software. No more comment? Olivier, the author is not replying. I think we should have updated the patch ourself. How risky it is for 17.05? Should it wait for 17.08?