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 CC892A04F1; Mon, 6 Jan 2020 09:35:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2DB5D1D5EF; Mon, 6 Jan 2020 09:35:21 +0100 (CET) Received: from relay.smtp.broadcom.com (relay.smtp.broadcom.com [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id 639531D5EC for ; Mon, 6 Jan 2020 09:35:19 +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 A10E61B9583; Mon, 6 Jan 2020 00:35:18 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com A10E61B9583 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1578299719; bh=wPMZ/YbX6xZ1SG+IDZH+OQKNgaEgXP9L9r4I+sDpCBM=; h=From:To:Cc:Subject:Date:From; b=ICff+qO7nQ7b7C5SOWd634mpuiKMRtLgNX6Ci7H7uO6VjxvkxyJXGmc7ehr1zcLiQ 86y9SNktftJwvD00XNfWKIl5846LbKPXHZDzQsQlOTAeBlLvSDPGcyWQb4w34KybgN cnSkbEkkRmWGEcuLF89dL2y/hMtyE0ng6Pth2pZE= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Mon, 6 Jan 2020 14:04:23 +0530 Message-Id: <20200106083423.26600-1-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 Subject: [dpdk-dev] [PATCH] mbuf: fix to update documentation of QinQ stripped bit interpretation 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 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 --- 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