From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 07CC3A04DD; Tue, 31 Dec 2019 03:15:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2CA311C0B5; Tue, 31 Dec 2019 03:15:54 +0100 (CET) Received: from mail-vs1-f65.google.com (mail-vs1-f65.google.com [209.85.217.65]) by dpdk.org (Postfix) with ESMTP id E2D6F1C066 for ; Tue, 31 Dec 2019 03:15:52 +0100 (CET) Received: by mail-vs1-f65.google.com with SMTP id n27so22002379vsa.0 for ; Mon, 30 Dec 2019 18:15:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ji2KdjxnJJpSjkDLCP9kgrOUD0xL1aFrqyPtvTcGvvI=; b=dA+ugE9ZOknU7RiCISmbi3qBLnk2I2w/fABJvOWhOl35djglrkpktGTmDFKEKchSQH h3tnzAHj9nbV3iEb0OS06aluppD6HC24KuOl9aET5Kdp1B0yEiL5HFZuRD33Yf3QpKlp eE/iTRAy3x3n+20q6fdiKDBTeYaYPdRIkj1oU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ji2KdjxnJJpSjkDLCP9kgrOUD0xL1aFrqyPtvTcGvvI=; b=Q6ebVzOm8lBS32RD+2DGWSyr3Kcy4/2Xvo4u3RRVhM2K0Tbt53FwfYEWZRSaALYpiO yUe9VVdRS1LjkRF2bmvlzM0GkcvslPepE7iAlWfgLUzYx0b7IuBNi5AXj2RmUpz2gKKn S75Vm2oqNTB9lDkLYU3+Ibz2D1R3UZAKBccEyTUZe0cAFzFkQ9H7mI+usJUC7VpRCd7U YPzvUrYcIHRar+x9ZsKgB3hMcQCdJLJL27q8AYz6MZ9SNW6UHHlURkmpfRirsp2SVG1M lGonUWuRBknov5vF5Huo8YxLQ+ph+E9r5X8MZpQ0URHxwxUDPtfXONSH/F75p5NNc92u KbhA== X-Gm-Message-State: APjAAAWRkuO9OKqFcNcoTuWhFtoGUaLni4R8c/ff/jvxT+NngbpyO/dW vg/hDQ/5Iq40KKs8T65SauGa0QHaDrDGL1/DNSrUKQ== X-Google-Smtp-Source: APXvYqx4t6oL0K+FNSQoqs+/PDG4AyXwlTmHXLVEZMOPQWSmmHCSEa5cYG4vzaKgNXJxFfDA7Grs4UVikm+88KGNMLw= X-Received: by 2002:a67:b911:: with SMTP id q17mr23499540vsn.230.1577758552182; Mon, 30 Dec 2019 18:15:52 -0800 (PST) MIME-Version: 1.0 References: <20191216031647.7750-1-somnath.kotur@broadcom.com> <68e1721c-4051-0451-185d-39344a026a38@solarflare.com> <53c0b3d2-5d61-6300-178e-b9500a93a7e3@solarflare.com> <4000b4f4-cdcd-78af-de60-2e8bde1364f7@solarflare.com> In-Reply-To: <4000b4f4-cdcd-78af-de60-2e8bde1364f7@solarflare.com> From: Somnath Kotur Date: Tue, 31 Dec 2019 07:45:39 +0530 Message-ID: To: Andrew Rybchenko , JP Lee Cc: dev , Ferruh Yigit , Olivier Matz , Hemant Agrawal , Sachin Saxena , Thomas Monjalon , David Marchand Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [RFC PATCH] mbuf: fix to update documentation of PKT_RX_QINQ_STRIPPED 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Andrew, On Tue, Dec 24, 2019 at 3:23 PM Andrew Rybchenko wrote: > > On 12/24/19 6:16 AM, Somnath Kotur wrote: > > Given that we haven't heard any objection from anyone in a while on > > this ...can we get this in please? > > I'm sorry, but have you seen below? > It means that PKT_RX_QINQ_STRIPPED, PKT_RX_QINQ, PKT_RX_VLAN > and PKT_RX_VLAN_STRIPPED must be clarified. > OK, not sure I understood what is the next action here? Will you or someone from the main tree maintainers be sending out a patch with this clarification? > It sounds like change of semantics in order to resolve the > problem, but anyway it is still a small change of semantics. > > BTW, it is better to make summary human readable and avoid > PKT_RX_QINQ_STRIPPED (I guess check-git-log.sh yells on it). > > Also RFC patch cannot be applied, non-RFC version is required. > > CC main tree maintainers. > > > Thanks > > > > On Mon, Dec 16, 2019 at 2:43 PM Andrew Rybchenko > > wrote: > >> > >> On 12/16/19 11:47 AM, Somnath Kotur wrote: > >>> On Mon, Dec 16, 2019 at 12:01 PM Andrew Rybchenko > >>> wrote: > >>>> > >>>> On 12/16/19 6:16 AM, Somnath Kotur wrote: > >>>>> Certain hardware may be able to strip and/or save only the outermost > >>>>> VLAN instead of both the VLANs in the mbuf in a QinQ scenario. > >>>>> To handle such cases, we could re-interpret setting of just PKT_RX_QINQ_STRIPPED > >>>>> to indicate that only the outermost VLAN has been stripped by the hardware and > >>>>> saved in mbuf->vlan_tci_outer. > >>>>> Only When both PKT_RX_QINQ_STRIPPED and PKT_RX_VLAN_STRIPPED are set, the 2 vlans > >>>>> have been stripped by the hardware and their tci are saved in mbuf->vlan_tci (inner) > >>>>> and mbuf->vlan_tci_outer (outer). > >>>>> > >>>>> Signed-off-by: Somnath Kotur > >>>>> Signed-off-by: JP Lee > >>>>> --- > >>>>> lib/librte_mbuf/rte_mbuf_core.h | 15 +++++++++++---- > >>>>> 1 file changed, 11 insertions(+), 4 deletions(-) > >>>>> > >>>>> diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h > >>>>> index 9a8557d..db1070b 100644 > >>>>> --- a/lib/librte_mbuf/rte_mbuf_core.h > >>>>> +++ b/lib/librte_mbuf/rte_mbuf_core.h > >>>>> @@ -124,12 +124,19 @@ > >>>>> #define PKT_RX_FDIR_FLX (1ULL << 14) > >>>>> > >>>>> /** > >>>>> - * The 2 vlans have been stripped by the hardware and their tci are > >>>>> - * saved in mbuf->vlan_tci (inner) and mbuf->vlan_tci_outer (outer). > >>>>> + * The outer vlan has been stripped by the hardware and their tci are > >>>>> + * saved in mbuf->vlan_tci_outer (outer). > >>>>> * This can only happen if vlan stripping is enabled in the RX > >>>>> * configuration of the PMD. > >>>>> - * When PKT_RX_QINQ_STRIPPED is set, the flags (PKT_RX_VLAN | > >>>>> - * PKT_RX_VLAN_STRIPPED | PKT_RX_QINQ) must also be set. > >>>>> + * When PKT_RX_QINQ_STRIPPED is set, the flags (PKT_RX_VLAN | PKT_RX_QINQ) > >>>>> + * must also be set. > >>>>> + * When both PKT_RX_QINQ_STRIPPED and PKT_RX_VLAN_STRIPPED are set, the 2 vlans > >>>>> + * have been stripped by the hardware and their tci are saved in > >>>>> + * mbuf->vlan_tci (inner) and mbuf->vlan_tci_outer (outer). > >>>>> + * This can only happen if vlan stripping is enabled in the RX configuration > >>>>> + * of the PMD. > >>>>> + * When PKT_RX_QINQ_STRIPPED and PKT_RX_VLAN_STRIPPED are set, > >>>>> + * (PKT_RX_VLAN | PKT_RX_QINQ) must also be set. > >>>>> */ > >>>>> #define PKT_RX_QINQ_STRIPPED (1ULL << 15) > >>>>> > >>>> > >>>> I always thought that PKT_RX_VLAN_STRIPPED means *one* VLAN > >>>> stripped regardless if it is outer (if the packet is double > >>>> tagged) or inner (if only one VLAN tag was present). > >>>> > >>>> That's why PKT_RX_QINQ_STRIPPED description says that *two* > >>>> VLANs have been stripped. > >>>> > >>>> What is the problem with such approach? > >>> The problem is that RX_VLAN_STRIPPED implies that the stripped VLAN > >>> (outer or inner) is saved in mbuf->vlan_tci, correct? > >> > >> Yes. > >> > >>> There is no way to convey that it is in QinQ mode and yet only outer > >>> VLAN has been stripped and saved in mbuf->vlan_tci_outer ? > >> > >> Ah, it looks like I understand now that the problem is in > >> PKT_RX_QINQ description which claims that TCI is saved in > >> mbuf->vlan_tci_outer and PKT_RX_QINQ_STRIPPED means that > >> both VLAN tags are stripped regardless (PKT_RX_VLAN_STRIPPED). > >> Moreover PKT_RX_QINQ_STRIPPED requires PKT_RX_VLAN_STRIPPED. > >> > >> It means that PKT_RX_QINQ_STRIPPED, PKT_RX_QINQ, PKT_RX_VLAN > >> and PKT_RX_VLAN_STRIPPED must be clarified. > >> > >> I'm not sure, but it looks like it could affect net/dpaa2, > >> so I'm including driver maintainers in CC. >