From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 573AB2C18; Fri, 5 May 2017 16:00:25 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BC921206D4; Fri, 5 May 2017 10:00:24 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Fri, 05 May 2017 10:00:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=f1ErYcHKNl+jDVY 0RdakUJS+yZq+MBEs9HlaE1FfDZE=; b=OtkgzBmyl6U5vsCiWur2Iao0NOtdLW4 SAdJPX2KDTMaHntHxFpsZRL47+QGsOaP+4/NMKj+/LOWST2CgBI3kNcusF6EBcWY DXkc1m5Rm5HC1o46EWrYaHUhwJhNYVYyAvoXJCsAHaFX0QcUbnLOsWfCShGuvCE5 x5YtBMn5gRG8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=f1ErYcHKNl+jDVY0RdakUJS+yZq+MBEs9HlaE1FfDZE=; b=IlF87h2O 2ip4QYnKEEsnK4z3tmh0N/cGlyq05liW5T8Q9Q1+W2gilaPi4HJ+SgyR/Y8jppC3 +kxBA+PiF/whSkaf/r0s9DtwF1NklazvtTPhRbe1VmPfcwuCbvxxtemz2/w7IDIv 3ByUQhaTVhDYFM7TDX78Zc5SvOiCYqOxQE5Jc0wM/5H1hTPfgHQ+dlY1fvyur5D0 ckL/oCc1HasqQGzZiRmFElIBxb4Z5M9F8pcnsk2BUalmqjqca+reEEbfA8o7NstE t1aa+CjVV1+wmXuMW/GrlOc8ZmMxn9PDj7o4WQ0+F0x3bhavzT7UEUAPJS/3aI0V qYUvr1e+0SXfSQ== X-ME-Sender: X-Sasl-enc: 9mrHP7liGPldk1HubxeaY1Vn5OkmHNuXk1rTNzWXb8y/ 1493992824 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 505A924713; Fri, 5 May 2017 10:00:24 -0400 (EDT) From: Thomas Monjalon To: Olivier Matz , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , =?utf-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: stable@dpdk.org, dev@dpdk.org Date: Fri, 05 May 2017 16:00:22 +0200 Message-ID: <2719377.9oiiVVdPIA@xps> In-Reply-To: <20170505120227.1bac5411@platinum> References: <20170504093041.503dcd8c@glumotte.dev.6wind.com> <20170504223613.24431-1-thomas@monjalon.net> <20170505120227.1bac5411@platinum> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2] net: fix stripped VLAN flag for offload emulation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2017 14:00:25 -0000 05/05/2017 12:02, Olivier Matz: > Hi Thomas, >=20 > On Fri, 5 May 2017 00:36:13 +0200, Thomas Monjalon = wrote: > > From: Micha=C5=82 Miros=C5=82aw > >=20 > > Apply the new flag PKT_RX_VLAN_STRIPPED to the software emulation case > > (currently only for virtio and af_packet). > >=20 > > Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN") > > Cc: stable@dpdk.org > >=20 > > Signed-off-by: Micha=C5=82 Miros=C5=82aw > > Signed-off-by: Thomas Monjalon > > --- > > v2: add explanations and update rte_vlan_insert() > > --- > > lib/librte_net/rte_ether.h | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > >=20 > > diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h > > index ff3d06540..5edf66c3f 100644 > > --- 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 */ > > @@ -407,6 +407,8 @@ static inline int rte_vlan_insert(struct rte_mbuf *= *m) > > vh =3D (struct vlan_hdr *) (nh + 1); > > vh->vlan_tci =3D rte_cpu_to_be_16((*m)->vlan_tci); > > =20 > > + (*m)->ol_flags &=3D ~PKT_RX_VLAN_STRIPPED; > > + > > return 0; > > } > > =20 >=20 > Having disymetric flags looks strange at first glance, but I think > you are right and PKT_RX_VLAN_PKT should be kept in rte_vlan_strip() > for compat purpose. As I said previously in the thread, I think > there is some work remaining to clean-up the vlan offload flags, > we should do this for 17.08. >=20 >=20 > Acked-by: Olivier Matz Applied, thanks