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 5538DA00BE; Fri, 11 Feb 2022 02:46:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 803AC411ED; Fri, 11 Feb 2022 02:45:55 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2048.outbound.protection.outlook.com [40.107.93.48]) by mails.dpdk.org (Postfix) with ESMTP id E328D411ED for ; Fri, 11 Feb 2022 02:45:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cHI/BmQTFRVG5lEraa7kl97ZIxy45vVdtrNM2at3AiWP4Gf1vZTOOPXBTEehZ/Kd9zAxRe/51ydDt570v2O46kfan5Ru0EwcPFCwtsB65X5ybJEK4dVQW82TzEONryxA5+6BzUZc18/FUK5wQgYgh//47ks+8QcTj/He3u6eO+MuG94xIjPAS25XtrNfNIlMZ3TlzEoN4bqOlJduinDZZcGl2XDQ1gI1scOKmN04ojcHKOkEECyDsRp3adtnYKJ3p5uDtbhpfNJkn9waqsjjqzQSACTIjoepjofhHTc5bXjLb0A2XzRqesgh2Cd3jub/qBLZ0yIJLZIv7kh9jHu+Gg== 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=uSUsJCTkgxgkqZdz1XdPfEGDxVkJrR+J3oMerf7dQUA=; b=f1DzNB7lXBwoQcCXi+IhLf80DqKGmwHWQy7tAPdrmqi5ev/Q7ZFtxYIFC6MnbNY+epgFe3QUPGMyE7Cr+s5wPKcp6HqyH/WLHCZo2F60lW0r8/g8AQneHey79428mNVwHeAzNcKkgblXaaWpDARCZkxHtfP29/mX8iektCY33Ny/LFScxjegZjJzNpEVyDnxKUbbT0cicOTCrGyK8Q00jb/sSPFbCxQchWN10caXAtqrGMJyMk9a0TmPJqWAC/2BYuiSF8R6foHHQv1Utv5iUxjlsPuOaT3EyBUqRquteKgOLo4UxTX8CLK6Uzbs6ErgHG1/22C0WSXvkPg6TnSDWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) smtp.rcpttodomain=6wind.com 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=uSUsJCTkgxgkqZdz1XdPfEGDxVkJrR+J3oMerf7dQUA=; b=Zs7ImJ28+68D1VWtobQ0B5A7WwxXdFjtoOZk2KjMxQgogcnnuWH+ZKZSB4yJzslcY8Ly4va3tNo+15hs13ZS38G5qBokynML9gVXjtQaAGxHDczpgE9NTKkarKKSiJQbsXPR5DX4xtUw7Y+0JwMwzMruGj24e+TAyJTqehUbdO9yx+dpouStMZG4d4UZ6dGfBnOMwBBw72ZM+3VlxcToSCX6njW5NJ3Dydb79MJlD3NLucgzw4X4r/QWRzKz6NkdMO6Wvav0sXDp9e8zaOFaf5NDn2qYQqhb6VhbUO0PSW6BGHhAZwvKqORJEJZqbuFf6Ris2eu0W8kQdtUEcamtqw== Received: from BN9PR03CA0667.namprd03.prod.outlook.com (2603:10b6:408:10e::12) by MWHPR12MB1470.namprd12.prod.outlook.com (2603:10b6:301:f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.18; Fri, 11 Feb 2022 01:45:52 +0000 Received: from BN8NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10e:cafe::cb) by BN9PR03CA0667.outlook.office365.com (2603:10b6:408:10e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11 via Frontend Transport; Fri, 11 Feb 2022 01:45:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.235) by BN8NAM11FT021.mail.protection.outlook.com (10.13.177.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4975.11 via Frontend Transport; Fri, 11 Feb 2022 01:45:51 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 11 Feb 2022 01:45:51 +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; Thu, 10 Feb 2022 17:45:49 -0800 From: Sean Zhang To: , , Olivier Matz CC: Subject: [v2 1/4] lib: add optional fields in GRE header Date: Fri, 11 Feb 2022 03:45:27 +0200 Message-ID: <20220211014530.77711-2-xiazhang@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220211014530.77711-1-xiazhang@nvidia.com> References: <20220126084404.40178-1-xiazhang@nvidia.com> <20220211014530.77711-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b5f11790-b20f-4213-ed22-08d9ed003c92 X-MS-TrafficTypeDiagnostic: MWHPR12MB1470: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: qpPX8djY5HzjzlmCVeuCNrAOX7EF2Fjt3ilRoSFXrJacLrWMreDeVFWm2xSpTKKPkftJdHBdenbkvRsmE7OAmv0a0LZE8Ev4+eDMipl45dij3sVGrbBHZhp7bhQoDzeKFL+XdeEBANc+fHg6y8vCDOZbvkmTb8dE7dQC9jnROp+qic8/VWxzjTD5SJq2cUdn5zYirRb18Un4E/mQ25KromldNscBJKnRfH4TNK5Pu1pf5AUO7gy5eNhRQafMLd64LEudRMj+mLdZ72gjLlSf1e7S8rSMqhgGix/kQYnGA+QVMk6W8U/tWxnR9VeeIvtdcC7Gt1prpxC76PQAfwmEp2ie4xdumyJsaGb/mnwGEpD+0tGL1YjAYJ5iYVlxU3HqHjI3VgE2jzl82DmOZndXziM26I545tH2wyiNFP6Kk6IUwMok8GMPXjbsSzAObeQ943cLTMB5yqAYByRa8O/yB0PwbAmfoWvvB51v6RfYt922Tc0SOvzE+WH8YgwIoMkDPLOieFym2RRnEUZfbwI354/NIm0U2v3vS1fsnlCDqpsv+SNi8FR41QvpMs8skyrN26i/4Oj9UHRXUCW7heEg6va5QPf5FOnzctc6UecyhzHCo8vYUQCcT45iNhcZXYEe5ekvqnXK4a4qYRn9WPtE3+zH8ApulPaSdL9nVPVzoxLo6vO4t2Iu2c7/kvBFYQbyRE9jEUv2KEmKrODlQQ1vhA== X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(8936002)(8676002)(4326008)(2906002)(40460700003)(316002)(70206006)(6666004)(7696005)(70586007)(86362001)(81166007)(5660300002)(110136005)(55016003)(356005)(36860700001)(36756003)(47076005)(26005)(4744005)(508600001)(1076003)(426003)(336012)(186003)(16526019)(2616005)(6286002)(82310400004)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2022 01:45:51.9962 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b5f11790-b20f-4213-ed22-08d9ed003c92 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.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1470 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 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/net/rte_gre.h b/lib/net/rte_gre.h index 5897756..6c6aef6 100644 --- a/lib/net/rte_gre.h +++ b/lib/net/rte_gre.h @@ -48,6 +48,28 @@ struct rte_gre_hdr { uint16_t proto; /**< Protocol Type */ } __rte_packed; +/** + * Optional field checksum in GRE header + */ +struct rte_gre_hdr_opt_checksum_rsvd { + rte_be16_t checksum; + rte_be16_t reserved1; +} __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