From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tREU9FTsTSOmNzW6oPrnkEkYPNzJO+gDr7CrIioqaNU=; b=Uzv139GMFz18bNbeLL9YNlhIOcG7e7hBIpWsGfncrZNGeJ20j2S9Q6cBBGj7tMMLci fFWKGH/0RqXfqAY00x1ri7GxHeotx4somFSvtjkIYXSw4MhZCMeYkjy5OtgEcsvJJoIb q5Ca1LyC/pGerPNYqhRRkJKOI3Z0eIpH/UeS8IDZhzxiWyDh1NsqkqX8s8uFGJ79MXbC iY2O5emtCULnpG0Oaf1Y2ncoyQ2qIjJ7lzGaZSTrV1+s48hjcaBRgcZgevX1qXgAVQyE U9JFF7yxehiq/hAYnny2tlzwqEdL5EKPR0tWD91nUArpiIbo25mZCKB7SKh7LD6WMSYc VlLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tREU9FTsTSOmNzW6oPrnkEkYPNzJO+gDr7CrIioqaNU=; b=SP766hmfPNqFQ/ObXv86i81Q5yLhz2aMuovhSO7BGd8FC8jbz5+DO5W+/4r6cwAuJF CHF3wWfneAa7OTIoNR04GIJlzVI8qciIT4Fh1pLKRyQCtagycDZlbXJ4f+gL1VN+HO7g bHT7Xq7tXGN4bnyZ/CNGtBP4RH+gnFgkUC2IaKAwkwCNHU1gRUzLv5KbC6yax6m1dPzG 7Rkd0G4uqDMiCakcQcvLV+GtNgyhG9paiMwUB6L0qhmio/fHiq8j0uHD6/34rxaGEIVj i6KjJLt6tIBDbIyWaM8FUKwFhUszTN98tWX0wIkamLYHUzt6jgqK3LDX6xJdmWxrQkb3 qZhw== X-Gm-Message-State: AN3rC/6iUfWhNI2Vw+1ehZQt+68/evVDXMHJnFW/RYqj16k0rPHCrAJf JZe/6I9Lek2Zp9e1JFY= X-Received: by 10.223.174.200 with SMTP id y66mr20795518wrc.79.1493883053584; Thu, 04 May 2017 00:30:53 -0700 (PDT) Received: from glumotte.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id m201sm781171wmd.15.2017.05.04.00.30.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 May 2017 00:30:53 -0700 (PDT) Date: Thu, 4 May 2017 09:30:41 +0200 From: Olivier MATZ To: Thomas Monjalon Cc: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= , dev@dpdk.org Message-ID: <20170504093041.503dcd8c@glumotte.dev.6wind.com> In-Reply-To: <5260370.FTaY66JWmf@xps> References: <1643890.a9zoQB8M0i@xps13> <20170209165638.34019d58@glumotte.dev.6wind.com> <5260370.FTaY66JWmf@xps> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH 03/13] rte_ether: set PKT_RX_VLAN_STRIPPED in rte_vlan_strip() 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: Thu, 04 May 2017 07:30:54 -0000 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