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 DB318A04A8; Wed, 26 Jan 2022 09:44:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D05942704; Wed, 26 Jan 2022 09:44:25 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2089.outbound.protection.outlook.com [40.107.95.89]) by mails.dpdk.org (Postfix) with ESMTP id 265234069D for ; Wed, 26 Jan 2022 09:44:25 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gOjbDBpJH318+83lSNlp4DghlsUT31C+YVe3Kp5jIRDeNHVgLO0CVE8SaYWSv5UFxc1La8Sw2Vxc4mp3ZCQ5tjykm8ZvY+Z0mDrbBFQ7SSLOKGdSCLzBA0B7dP32c9biI3RhKr/MYWRHaCvSEOHdi67/iyan1q6nUj0TFH01DL1as4/VZ0VKcXN2QHmvKMOtSPa8aHdLkI/Wcw89LHFh7Y68d9p2fFSILYmR6zepgvLJfggsZoHoYMRQgWdzFaDfUAj7o4FD0qHKj5qGHMvUMKT+RJpND/WmYBFoABb82tpqsjiqxnwfsgaWWhdQoUVNA94zvN5ZKBCGIpdMaNKK7g== 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=qOHAUsxFNhJvYIWXZN1qIKdtRe06TtQ/SnmrvHBGL7Y=; b=g8dQqEoxjNFVenXzQXZo3BPjecwTadgXQGOJhPf90zyCwFMkJOqYPh53exo/Swgo+3lxMoSS4m9ezA3zCHdwSlKwOuM7Inb0kYLn8/3Ge5Y3yrBQKBmkqK67cy5LVnWfc+bgUm/2K8/2lDAUQazPXabkbF2JIoyZfkVcasg5CSJKa1UcPcpvLKwSwRkOxDZjYaJqZKTRKmLlglFNopIJnylJoqnY0RXt3OK+1proQvtto1Gws4lhTAk5uQs9Sk9iJ9P5hsTGy5H96MBD8M5xBuKG5cItW6PSQdVHU3ofGPDvMFAt6bnZdkZY9uKEg8by/Qr8jJwXimoCljPxjqaqKw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qOHAUsxFNhJvYIWXZN1qIKdtRe06TtQ/SnmrvHBGL7Y=; b=uNdVjKPZPOhtbunqE9Dji14/2wtVrogYltNtHW98FjD266zAvbK+lmH08dV+8AwsT9n+VNHSNs+jKhVpgBwKbyM84YThQV/BcOLiue8SP6y4H9is5i60GVUi3GHe1/XmstX8IlQa6jo0do3aIxkav9/556kUu0CkAz6NbDu5M/BDS9osNHMipmoC17IQvdPvnBPH4kwoJiJVa7HhHtmz14nuaC7AppfNtt3no+Qzmdajtuw1GYxXEhGVuAnZ68RwJqUkU89EWsNMlha/A48PTszjHoCPn0cmdfB84sEABUFS1N0lXbQXayFmoU/eAEk+zEvgnZ5FCo1RNlkadSO+MQ== Received: from DM6PR02CA0092.namprd02.prod.outlook.com (2603:10b6:5:1f4::33) by DM5PR12MB1386.namprd12.prod.outlook.com (2603:10b6:3:77::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.12; Wed, 26 Jan 2022 08:44:23 +0000 Received: from DM6NAM11FT035.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1f4:cafe::bd) by DM6PR02CA0092.outlook.office365.com (2603:10b6:5:1f4::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.15 via Frontend Transport; Wed, 26 Jan 2022 08:44:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.234) by DM6NAM11FT035.mail.protection.outlook.com (10.13.172.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4930.15 via Frontend Transport; Wed, 26 Jan 2022 08:44:23 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 26 Jan 2022 08:44:22 +0000 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.9; Wed, 26 Jan 2022 00:44:21 -0800 From: Sean Zhang To: , Olivier Matz CC: Subject: [v1 1/4] lib: add optional fields in GRE header Date: Wed, 26 Jan 2022 10:44:01 +0200 Message-ID: <20220126084404.40178-2-xiazhang@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220126084404.40178-1-xiazhang@nvidia.com> References: <20211230030817.15264-2-xiazhang@nvidia.com> <20220126084404.40178-1-xiazhang@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: drhqmail203.nvidia.com (10.126.190.182) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f2c942bd-0f65-458a-1615-08d9e0a80da1 X-MS-TrafficTypeDiagnostic: DM5PR12MB1386:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2150; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A7slPuv1EXK9Mp5BNZ+5G4ouGCt0Ml+ZxLWytZl9oBxr9t66Zigfj6zdp7nLVXIR/z6D2dEWfrmCcc9EdTJmz+oTL29AlnDTjxo0K/uKFgf40a5Qi4qle37zjVIL4phdPa7EBFKQIQmC2cOn4XxUelQhGaFCpKfVuUByC5EIaLz7vfauFouC9e5TdeXqyrTNFOVbMjdGo2IsVAigvFRQMDYT5vLgWahqgW+SYD8kBKOR8/0yMK34yzDEW9ThetHPidln1tFd7BTgo2PgPVVOVRyYMo1sJpobNgSzT5AA34qI5kQWw2PeTuDaXQO4kV00CV7ELmbP1S8eH1IXKSqTMqsk14k9BBDngxG88ITD2JO2oSS+6H0JVw+qLGAR6nL7s4nl855Am3NxdF1oW8JcuxTJ8n9oOAhReI6NXFDfnzxaSXFKbp2ZQrywOqxnCPlBNJ1Syajz8f60wuKw8il3R91WSAeoT/J1APhaHtFkxL5vPu4yn5lp9eChX6z34MyFHZAcd/iqCWK/ewHvZHCfc5XSHVrYISdmu/tYCEtDDuPp2/ECI2a3v2tetTuw5MkpDSfjNfN8EVB1kFM6DRzjmuUACJ3+n6AKQ3g/DAlRQEkoU7+MlnlmQF7wgMqEd+5TVFrI0F2nWENX6IkDRWT+H+U4PX7OdJciSfSSWtAcHnjnM7kguubn4ZdjUr1OVDa/zQNf9SE1PSaeq9hfNQ93i0zB1ZACl2v+N7LbhmnPagzwlxqhqjZX5Knrv+A8jNeI611fKAtcKPGJSBghVozBRkPo84gy7/v1Yc8fO0f8twI= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(4636009)(40470700004)(36840700001)(46966006)(426003)(6666004)(8676002)(6286002)(7696005)(86362001)(508600001)(336012)(47076005)(1076003)(356005)(26005)(316002)(55016003)(186003)(16526019)(8936002)(5660300002)(70586007)(36860700001)(70206006)(110136005)(4744005)(81166007)(82310400004)(2616005)(2906002)(4326008)(36756003)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2022 08:44:23.6174 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f2c942bd-0f65-458a-1615-08d9e0a80da1 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT035.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1386 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 There are optional fields in GRE header(checksum/key/sequence), this patch adds definition of structures of the optional fields. Signed-off-by: Sean Zhang --- lib/net/rte_gre.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/net/rte_gre.h b/lib/net/rte_gre.h index 5897756..5113e79 100644 --- a/lib/net/rte_gre.h +++ b/lib/net/rte_gre.h @@ -48,6 +48,27 @@ struct rte_gre_hdr { uint16_t proto; /**< Protocol Type */ } __rte_packed; +/** + * Optional field checksum in GRE header + */ +struct rte_gre_hdr_opt_checksum { + rte_be16_t checksum; +} __rte_packed; + +/** + * Optional field key in GRE header + */ +struct rte_gre_hdr_opt_key { + rte_be32_t key; +} __rte_packed; + +/** + * Optional field sequence in GRE header + */ +struct rte_gre_hdr_opt_sequence { + rte_be32_t sequence; +} __rte_packed; + #ifdef __cplusplus } #endif -- 1.8.3.1