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 3CCDFA04A5; Fri, 19 Jun 2020 11:21:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 114091B5E1; Fri, 19 Jun 2020 11:21:43 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id CD72B1B3BB for ; Fri, 19 Jun 2020 11:21:41 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.137]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 3604320055; Fri, 19 Jun 2020 09:21:41 +0000 (UTC) Received: from us4-mdac16-10.at1.mdlocal (unknown [10.110.49.192]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 360A96009B; Fri, 19 Jun 2020 09:21:41 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.110.50.9]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id CA103220070; Fri, 19 Jun 2020 09:21:40 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 6D7DC580051; Fri, 19 Jun 2020 09:21:40 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 19 Jun 2020 10:21:36 +0100 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 19 Jun 2020 10:21:36 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 05J9Lai6029352; Fri, 19 Jun 2020 10:21:36 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id B4128161798; Fri, 19 Jun 2020 10:21:36 +0100 (BST) From: Andrew Rybchenko To: Ajit Khaparde , Somnath Kotur , Olivier Matz CC: , Ivan Malov Date: Fri, 19 Jun 2020 10:21:15 +0100 Message-ID: <1592558476-1944-1-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1020-25490.003 X-TM-AS-Result: No-3.539600-8.000000-10 X-TMASE-MatchedRID: ceEONRK33ip4M+GjknD5cKiUivh0j2Pvqb3/o5s+OcO9K1jOJyKSa5GS q1u/woRG9Aq9YXNfLu19lMBqhUL7QSHhSBQfglfsA9lly13c/gHaCn4DqCiXNgQsw9A3PIlLTeU 2YiYrYEvzflyoTkWhRYAy6p60ZV62Mhe627A+8aHdB/CxWTRRuwihQpoXbuXFUSOz+w49SBQxE9 uEIgndcPxCmaNo2YgV3egZ4Q3VhUIxx0rVVwAIjvSou88o71fi8RE04hWDqr/x+9lp16q1y9vyK XRgtLNpD1y8R38S3l1URzkirO0Q1F5h9KQWrq4BvuMTr7CQJJ6eqD9WtJkSIw== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--3.539600-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1020-25490.003 X-MDID: 1592558501-JqLYC-Zie6pV Subject: [dpdk-dev] [PATCH] ether: use named constants for deprecated QinQ TPIDs 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" From: Ivan Malov Add named constants for deprecated QinQ TPIDs. Update drivers which have already been using existing TPID named constants from librte_net to use the new named constants rather than magic numbers. Signed-off-by: Ivan Malov Signed-off-by: Andrew Rybchenko --- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- lib/librte_net/rte_ether.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index e8b4c058a1..74485a7aaf 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -2409,15 +2409,15 @@ bnxt_vlan_tpid_set_op(struct rte_eth_dev *dev, enum rte_vlan_type vlan_type, bp->outer_tpid_bd = TX_BD_LONG_CFA_META_VLAN_TPID_TPID8100; break; - case 0x9100: + case RTE_ETHER_TYPE_QINQ1: bp->outer_tpid_bd = TX_BD_LONG_CFA_META_VLAN_TPID_TPID9100; break; - case 0x9200: + case RTE_ETHER_TYPE_QINQ2: bp->outer_tpid_bd = TX_BD_LONG_CFA_META_VLAN_TPID_TPID9200; break; - case 0x9300: + case RTE_ETHER_TYPE_QINQ3: bp->outer_tpid_bd = TX_BD_LONG_CFA_META_VLAN_TPID_TPID9300; break; diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h index 0ae4e75b6c..e942556c5a 100644 --- a/lib/librte_net/rte_ether.h +++ b/lib/librte_net/rte_ether.h @@ -294,6 +294,9 @@ struct rte_vlan_hdr { #define RTE_ETHER_TYPE_RARP 0x8035 /**< Reverse Arp Protocol. */ #define RTE_ETHER_TYPE_VLAN 0x8100 /**< IEEE 802.1Q VLAN tagging. */ #define RTE_ETHER_TYPE_QINQ 0x88A8 /**< IEEE 802.1ad QinQ tagging. */ +#define RTE_ETHER_TYPE_QINQ1 0x9100 /**< Deprecated QinQ VLAN. */ +#define RTE_ETHER_TYPE_QINQ2 0x9200 /**< Deprecated QinQ VLAN. */ +#define RTE_ETHER_TYPE_QINQ3 0x9300 /**< Deprecated QinQ VLAN. */ #define RTE_ETHER_TYPE_PPPOE_DISCOVERY 0x8863 /**< PPPoE Discovery Stage. */ #define RTE_ETHER_TYPE_PPPOE_SESSION 0x8864 /**< PPPoE Session Stage. */ #define RTE_ETHER_TYPE_ETAG 0x893F /**< IEEE 802.1BR E-Tag. */ -- 2.17.1