From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH 03/13] rte_ether: set PKT_RX_VLAN_STRIPPED in rte_vlan_strip() Date: Thu, 4 May 2017 09:30:41 +0200 Message-ID: <20170504093041.503dcd8c@glumotte.dev.6wind.com> References: <1643890.a9zoQB8M0i@xps13> <20170209165638.34019d58@glumotte.dev.6wind.com> <5260370.FTaY66JWmf@xps> 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: Thomas Monjalon Return-path: Received: from mail-wr0-f174.google.com (mail-wr0-f174.google.com [209.85.128.174]) by dpdk.org (Postfix) with ESMTP id 902FA68F7 for ; Thu, 4 May 2017 09:30:54 +0200 (CEST) Received: by mail-wr0-f174.google.com with SMTP id l50so2775766wrc.3 for ; Thu, 04 May 2017 00:30:54 -0700 (PDT) In-Reply-To: <5260370.FTaY66JWmf@xps> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Thomas, On Sun, 30 Apr 2017 17:58:45 +0200, Thomas Monjalon w= rote: > 09/02/2017 16:56, Olivier MATZ: > > Hi, > >=20 > > On Mon, 30 Jan 2017 10:54:08 +0100, Thomas Monjalon > > wrote: =20 > > > 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 > > > [...] =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 > >=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. =20 >=20 > No more comment? >=20 > 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? I don't feel it's too risky for 17.05. It's used in virtio and af_packet drivers, only when using vlan offload. FYI, for 17.08, I plan to put the mbuf vlan flag subject on the table again: when I introduced the new flag VLAN_STRIPPED, we acted that another flag or pkt_type had to be introduced, but it was not really finished. Olivier