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 DB568A04B3; Mon, 16 Dec 2019 04:17:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1CD581C012; Mon, 16 Dec 2019 04:17:30 +0100 (CET) Received: from relay.smtp.broadcom.com (relay.smtp.broadcom.com [192.19.211.62]) by dpdk.org (Postfix) with ESMTP id 7148B1BFEF for ; Mon, 16 Dec 2019 04:17:29 +0100 (CET) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 1E9ED28F899; Sun, 15 Dec 2019 19:17:28 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 1E9ED28F899 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1576466248; bh=ofksMHLmXIvkjwFaLTZpcMN7za5h5UHCBLfqEqUIfsg=; h=From:To:Cc:Subject:Date:From; b=Uw2xAnv6y9KYpY78H/1x/z9J0EzBT1GnjaMP2rC0jjJWqBl8M+N/10rjhA6Xc4UPq 1zMvUXwnq5slLlldzXEF8TOEt9JB9rHnYyOVecodi3kCgZGedPstzrgFd+uE71d+5Y TGii4US/Ykcw9JVuBdMAZfHRKmSHdJ6hh1fiDAos= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Mon, 16 Dec 2019 08:46:47 +0530 Message-Id: <20191216031647.7750-1-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 Subject: [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" 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) -- 1.8.3.1