From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0574F43AB5; Fri, 9 Feb 2024 00:55:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BADD9402AF; Fri, 9 Feb 2024 00:55:09 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2073.outbound.protection.outlook.com [40.107.101.73]) by mails.dpdk.org (Postfix) with ESMTP id 1006040293 for ; Fri, 9 Feb 2024 00:55:08 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D2y/yT/9/1hxqRBW5anb1gBwnCZ/eOP/zZHp6nX450HkI/hVITyuHfjCiC0I+rDlWTpE7/UDj2xYWmUrXK8rGRYgKZtKU3jktuZSCwY0lAYFxS8aPhJz2n4wXkf2IcEnEP/tM+h09daudjX2+jjUdsrg70vFMtd86YKbTTWm734wD8iHePOdrqBICsj1RJo6lBovDyVBW3lytPbqxpVod6TZ9rJqeRpsl5hzvQiCSZuv0e4sJojJj4nJEtBPzRBay0W/+HSrlgKC0718nylYZF4ShyqSGGMthMOD7FtXQCRCsUfSJIZ3QW8Zg0wyws9naujiq/EoMXVeZpYTbS65Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8dVws/7P5rC4dfwoccH+S1Q7anfRInSR/GYSqfnflYw=; b=Kj917DHSEzGTt1Jg2voCq0lIESq4Q96ab8v1RQN7IrCn6a1k7JNlb3i8LZHxUvPwVHN2Eovh06cNiyVbwA6a0jXXa9BCL/K2EEAw6/lREzvDVJqA3eQS3XGxwGmlQG8pEAnC/vRDJWjnEUc6MzYuOVw1GasvsuL+zLW4vcVn0Vrtxd6aPYNZhQcYDEC91sBkACscoMxbvjhQ9/tjFoOw1mvWktlXDRDIUUS+gZ8jQH14FvSRtDOC//Pb/OrxAYDUye2W1qvPcDM+KR+bKOCwtXiQ20yyvUZ53eug6kVwwnyK6TWXwZEsM8nbwFdRxfD6A9vWRaXWeSLHzQb+LpZRDA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8dVws/7P5rC4dfwoccH+S1Q7anfRInSR/GYSqfnflYw=; b=anxREsTRUuLmsGU6BYLWm16B91AeFMSf9oXf9WObAImvwikM8uxIpulaPioZ/ZGQq034ACXmZfjMU13o3d4140BEMALcjh9EgcRx1JqkldBYI5OLOgfozXvJNRYF+9hteYxjrVJI8ploAlPwScF2vwjQimDhLRxSHwlX3MmLSdM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by PH8PR12MB6769.namprd12.prod.outlook.com (2603:10b6:510:1c4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.17; Thu, 8 Feb 2024 23:55:02 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f%4]) with mapi id 15.20.7292.009; Thu, 8 Feb 2024 23:55:02 +0000 Message-ID: <76ab3ffb-5f6b-4f16-a3a8-4e80f5afffcb@amd.com> Date: Thu, 8 Feb 2024 23:54:57 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [RFC V1 1/1] net: extend VXLAN header to support more extensions Content-Language: en-US To: Gavin Li , orika@nvidia.com, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru Cc: dev@dpdk.org, jiaweiw@nvidia.com References: <20240130112520.1971315-1-gavinl@nvidia.com> <20240130112520.1971315-2-gavinl@nvidia.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XG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JIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240130112520.1971315-2-gavinl@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0526.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:2c5::12) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH8PR12MB6769:EE_ X-MS-Office365-Filtering-Correlation-Id: c3f7e010-7912-4b04-670e-08dc29015d35 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lvOBMeEEjS6QYylQdOW9/RI3qC4t75TqEDJNBNF5CaiF8L8gN0USHFpiQFTincDPj1jdan3rjs2nlPxFLP97wV8v4qtyXwzpNRuCP2YQ25GvKc1vJv2tsIDbLBIrnO8asHmv22j5hSZIiJYeQMggVGdUB+TFUo5C/zT+WSGD7IPfE1oeOkgXx1AGhGr+n9Y80PZanytj/frKCcQSH2JSiiHU+QQ6ZyXjN68kidYZS6MS7aSnF450V58lvw7iBkGAze4IX8LGr5Fx00T5toUS4zeMHoV/MG5sVtyCzq4d3E7YjhNALirfv0yQf2OzJAVAIQMKFrs66T/maS96N/RGkeTzJJifsqIzyg38odKVFVvDta3uTx5iZzJGPSSEWb+Zaf7KBBbK17f5okmkKJaYHfD+QS968Q3bYtwT29lB+WPUujiB75JwO/3PEXkJ4/neAnpjuShI6Giye3gqU8dcV46E1Bqw8wY6tl1Rua7HHZNjpEUsrW8lO8LebGJBqpWVtErwsWsmvxmnvBsJI8tXJXMnPymrTA3JCzMjaQucndRizTRriYJI4XSMw2J/fjXJ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(136003)(346002)(376002)(39860400002)(396003)(230922051799003)(1800799012)(451199024)(186009)(64100799003)(31686004)(2616005)(41300700001)(2906002)(38100700002)(83380400001)(6512007)(26005)(6666004)(53546011)(31696002)(8676002)(6506007)(316002)(478600001)(86362001)(66556008)(36756003)(8936002)(66946007)(4326008)(6486002)(66476007)(5660300002)(44832011); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Tmd6N2Y2Tkt4eCtzN203RjZxS3JmdGlsYjFPbXBFSGVRVEhGdU8zemdaUm9w?= =?utf-8?B?T2lDaEdlMDRMTzM1SGFPejRjNDZEU0g3dVAzMnJpb1lSeGpnVStaeHFSRGc5?= =?utf-8?B?QnFxMFZtdWdjOFk5MGRkZkJpK2VTem80d0RJbDRtUU5BTS9hamFhN0VuanZy?= =?utf-8?B?UWVDdjllMXdsNzROQjNZSDM4MW5wQVJUYTFXZ3NrQUtSUjBUNjdTTTF1L2xu?= =?utf-8?B?VlFXYmdLZmtVb3VQdWQ5WVJSUWs4eEJVOFpYRUNGZDFTdGpaWm5EU1ZFQ0Vp?= =?utf-8?B?TjBmMnRUdGJyaC9aMHI3QXpIOHh3dXd4UXhNaVNUTGhHeHE0V1VUSDBaQWR5?= =?utf-8?B?dWdsN1VLZ24zY1ZDcFZSam01U0hMTVBOL1IxaFJ0TjBWcHlnYXdPTXhSdWw0?= =?utf-8?B?enVHcGJja1A2YnZZZnNSRTVLa0Z2V2RPZzVkdVE3V1VIMlVxZzh4RXFJOVhO?= =?utf-8?B?V2lkYlVmSzBtYldwcklHYjJCK21jT01Jam00Wlo3N000MmRIa00vSlplWGZs?= =?utf-8?B?eUdUS2hiMEx0bUZnMWJIbnlVOXBuU1JaZ2NnTXVQZWVrTWErelZteU1DdmlK?= =?utf-8?B?W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TRmbnZsWTNhZDkwM1dm?= =?utf-8?B?TmZRQVBpOEpldW9HNVRTbmVNemRXb3pEM01OakZXWEhnQmcrMHV0OG0rdFZj?= =?utf-8?B?U2thbEFvcm95SVRZVTVkRWs4UzlhOWcxUEZ6S0R5Q2YzTFY0c09VdW1xaUJO?= =?utf-8?B?T3FYQnJpbXYrVHN3SW5nNGk0NzdxUGE2TlpQMVkrOTRBRWtockJOKzNuZUhL?= =?utf-8?B?WWtwYk9ocUlwMDJwa2dnTVEzOFZVcnhvb2JBclZYSmVxY09KSFRyajVici9i?= =?utf-8?B?VzJZbE5nL2kxZXFVS1JaaUZpcjdTKzJnSDhvdzI2U1R6dDFCRis4Q0lMd0FW?= =?utf-8?B?U2pmZW1Fa280SWRld0g3SXBBdVBQUDhXTnJHeVU3UzV4U3lLSmRWNjd5R1B3?= =?utf-8?B?Lys0UktwMjY5dHBiS0pXZUU2QzA4eFRJSlNGbENZbHFGeGFIWTcvTjAvTlFu?= =?utf-8?B?YU9HQU9PLy9pSTNRVEFmaUdEdHYxblFHRmtsN0JvWW9kMnpSNXptYWRvS0xt?= =?utf-8?B?YVRrcytKNTlKZjZ4WXY1RldwN29aWXZmbGJSVzZCUzlLakVKclVzM1pFMnpV?= =?utf-8?B?T3NuNm1QM2gzY25SQ2tXdWMxNU40WW9yK0pZRTNOamZMUzBhZlg2Y21ydjFp?= =?utf-8?Q?WhjAHq8VEcpfTBo+l2SrJ2dFX?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c3f7e010-7912-4b04-670e-08dc29015d35 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2024 23:55:02.3798 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Bva+JA9ZB0cWmls59HXaDPLHCYhFomInrWxY0E1DWqNEGJgoQA2bL+MREFQpKmts X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6769 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 1/30/2024 11:25 AM, Gavin Li wrote: > Currently, DPDK supports VXLAN and VXLAN-GPE with similar header > structures and we are working on adding support for VXLAN-GBP which is > another extension to VXLAN. More extension of VXLAN may be added in the > future. > > VXLAN and VXLAN-GBP use the same UDP port(4789) while VXLAN-GPE uses a > different one, 4790. The three protocols have the same header length and > overall similar header structure as below. > 0 1 2 3 > 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > |R|R|R|R|I|R|R|R| Reserved | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > | VXLAN Network Identifier (VNI) | Reserved | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > > Figure 1: VXLAN Header > > 0 1 2 3 > 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > |R|R|Ver|I|P|B|O| Reserved |Next Protocol | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > | VXLAN Network Identifier (VNI) | Reserved | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > > Figure 2: VXLAN-GPE Header > > 0 1 2 3 > 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > |G|R|R|R|I|R|R|R|R|D|R|R|A|R|R|R| Group Policy ID | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > | VXLAN Network Identifier (VNI) | Reserved | > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > > Figure 3: VXLAN-GBP Extension > > Both VXLAN-GPE and VXLAN-GBP extended VXLAN by redefining its reserved > bits, which means the packets can be processed with same pattern and most > of the code can be reused. Instead of adding more new items by > copying/pasting code for the VXLAN extensions in the future, it’s better > to use existing VXLAN infrastructure and add support code in it. > Hi Gavin, The motivation is to prevent code duplication, and the code mentioned is the driver code, right? Overall OK to unify "struct rte_vxlan_hdr" although it makes the struct a little complex, perhaps we can consider extraction some nested structs as named struct, no strong opinion. But not sure about removing the flow item types for VXLAN-GPE, or not adding for VXLAN-GBP. Think about a case user adding a rule, which has a item type as VXLAN and in the protocol header some bits are set, lets say first word, last byte is set, how driver will know if to take it as GPE "next protocol" or "group policy id". And if a specific HW detects VXLAN-GPE and VXLAN-GBP protocols as two separate protocols, won't only having capability to describe VXLAN protocol in SW be a limitation. If the target is to remove code duplication in the driver, can it be accomplished by extracting code that parse the common fields of these protocols? > In this patch, all the VXLAN extension header will be merged with VXLAN as > union if the overlapped field has different format among protocols. The > existing VXLAN-GPE will be marked as deprecated and new extensions of > VXLAN should be added to VXLAN instead of a new RTE item. > > Signed-off-by: Gavin Li > --- > doc/guides/rel_notes/deprecation.rst | 5 +++ > lib/ethdev/rte_flow.h | 13 +++++- > lib/net/rte_vxlan.h | 67 ++++++++++++++++++++++++++-- > 3 files changed, 80 insertions(+), 5 deletions(-) > > diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst > index 81b93515cb..f9cf931b77 100644 > --- a/doc/guides/rel_notes/deprecation.rst > +++ b/doc/guides/rel_notes/deprecation.rst > @@ -95,6 +95,11 @@ Deprecation Notices > - ``rte_flow_item_pppoe`` > - ``rte_flow_item_pppoe_proto_id`` > > +* ethdev: The flow item ``RTE_FLOW_ITEM_TYPE_VXLAN_GPE`` is replaced with ``RTE_FLOW_ITEM_TYPE_VXLAN``. > + The item ``RTE_FLOW_ITEM_TYPE_VXLAN_GPE``, the struct ``rte_flow_item_vxlan_gpe``, its mask ``rte_flow_item_vxlan_gpe_mask``, > + and the header struct ``rte_vxlan_gpe_hdr`` with the macro ``RTE_ETHER_VXLAN_GPE_HLEN`` > + will be removed in DPDK 25.11. > + > We have 24.11 in between. > * ethdev: Queue specific stats fields will be removed from ``struct rte_eth_stats``. > Mentioned fields are: ``q_ipackets``, ``q_opackets``, ``q_ibytes``, ``q_obytes``, > ``q_errors``. > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h > index 1267c146e5..a9943106d9 100644 > --- a/lib/ethdev/rte_flow.h > +++ b/lib/ethdev/rte_flow.h > @@ -355,6 +355,7 @@ enum rte_flow_item_type { > RTE_FLOW_ITEM_TYPE_GENEVE, > > /** > + * @deprecated Replaced with ``RTE_FLOW_ITEM_TYPE_VXLAN``. > * Matches a VXLAN-GPE header. > * > * See struct rte_flow_item_vxlan_gpe. > @@ -1096,7 +1097,11 @@ static const struct rte_flow_item_sctp rte_flow_item_sctp_mask = { > /** > * RTE_FLOW_ITEM_TYPE_VXLAN. > * > - * Matches a VXLAN header (RFC 7348). > + * Matches a VXLAN header (RFC 7348), including GPE (draft-ietf-nvo3-vxlan-gpe-13.txt) > + * and GBP (draft-smith-vxlan-group-policy-05.txt). > + * > + * GPE is distinguished with its UDP port. > + * UDP port may be specified with ``rte_eth_dev_udp_tunnel_port_add()``. > */ > struct rte_flow_item_vxlan { > union { > @@ -1339,6 +1344,7 @@ static const struct rte_flow_item_geneve rte_flow_item_geneve_mask = { > #endif > > /** > + * @deprecated Replaced with ``rte_flow_item_vxlan``. > * RTE_FLOW_ITEM_TYPE_VXLAN_GPE (draft-ietf-nvo3-vxlan-gpe-05). > * > * Matches a VXLAN-GPE header. > @@ -1360,7 +1366,10 @@ struct rte_flow_item_vxlan_gpe { > }; > }; > > -/** Default mask for RTE_FLOW_ITEM_TYPE_VXLAN_GPE. */ > +/** > + * @deprecated Replaced with ``rte_flow_item_vxlan_mask``. > + * Default mask for RTE_FLOW_ITEM_TYPE_VXLAN_GPE. > + */ > #ifndef __cplusplus > static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask = { > .hdr.vni = "\xff\xff\xff", > diff --git a/lib/net/rte_vxlan.h b/lib/net/rte_vxlan.h > index 997fc784fc..255c30f71d 100644 > --- a/lib/net/rte_vxlan.h > +++ b/lib/net/rte_vxlan.h > @@ -38,8 +38,65 @@ struct rte_vxlan_hdr { > rte_be32_t vx_vni; /**< VNI (24) + Reserved (8). */ > }; > struct { > - uint8_t flags; /**< Should be 8 (I flag). */ > - uint8_t rsvd0[3]; /**< Reserved. */ > + union { > + uint8_t flags; /**< Should be 8 (I flag). */ > + /* Flag bits defined by GPE */ > + struct { > +#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN > + uint8_t flag_o:1, > + flag_b:1, > + flag_p:1, > + flag_i_gpe:1, > + flag_ver:2, > + rsvd_gpe:2; > +#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN > + uint8_t rsvd_gpe:2, > + flag_ver:2, > + flag_i_gpe:1, > + flag_p:1, > + flag_b:1, > + flag_o:1; > +#endif > + }; > + /* Flag bits defined by GBP */ > + struct { > +#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN > + uint8_t rsvd_gbp1:3, > + flag_i_gbp:1, > + rsvd_gbp2:3, > + flag_g:1; > +#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN > + uint8_t flag_g:1, > + rsvd_gbp1:3, > + flag_i_gbp:1, > + rsvd_gbp2:3; > +#endif > + }; > + }; > + union { > + uint8_t rsvd0[3]; /**< Reserved. */ > + /* Overlap with rte_vxlan_gpe_hdr which is deprecated.*/ > + struct { > + uint8_t rsvd0_gpe[2]; /**< Reserved. */ > + uint8_t proto; /**< Next protocol. */ > + }; > + struct { > +#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN > + uint8_t rsvd0_gbp1:3, > + policy_applied:1, > + rsvd0_gbp2:2, > + dont_learn:1, > + rsvd0_gbp3:1; > +#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN > + uint8_t rsvd0_gbp1:1, > + dont_learn:1, > + rsvd0_gbp2:2, > + policy_applied:1, > + rsvd0_gbp3:3; > +#endif > + uint16_t policy_id; > + }; > + }; > uint8_t vni[3]; /**< VXLAN identifier. */ > uint8_t rsvd1; /**< Reserved. */ > }; > @@ -52,6 +109,7 @@ struct rte_vxlan_hdr { > > > /** > + * @deprecated Replaced with ``rte_vxlan_hdr``. > * VXLAN-GPE protocol header (draft-ietf-nvo3-vxlan-gpe-05). > * Contains the 8-bit flag, 8-bit next-protocol, 24-bit VXLAN Network > * Identifier and Reserved fields (16 bits and 8 bits). > @@ -75,7 +133,10 @@ struct rte_vxlan_gpe_hdr { > }; > } __rte_packed; > > -/** VXLAN-GPE tunnel header length. */ > +/** > + * @deprecated Replaced with ``RTE_ETHER_VXLAN_HLEN``. > + * VXLAN-GPE tunnel header length. > + */ > #define RTE_ETHER_VXLAN_GPE_HLEN (sizeof(struct rte_udp_hdr) + \ > sizeof(struct rte_vxlan_gpe_hdr)) >