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 E0D0DA0545; Tue, 20 Dec 2022 08:44:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7B9D410DE; Tue, 20 Dec 2022 08:44:54 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2065.outbound.protection.outlook.com [40.107.93.65]) by mails.dpdk.org (Postfix) with ESMTP id BC1CB40395 for ; Tue, 20 Dec 2022 08:44:53 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RWwxMdvDeBYTFoTgjJKV33dYHDKVRmKKsrPoEJr89Lu5BJ5www/k29EKqtlZKNyDjnIXNzLrfiwCj/RkhhMmEQ/EPLx+LltmqkpSrvL46Vytk7cC//eoN9ulZFd3EZXWD3jrtKXZyN9jPt0LKypQX2wgvg+JRhyaxI8rE1sxxZxtCm2jyyr8s+rPcSSIY6Zxt5H1F9o+xG7JfHvjGAh4/LVPyC2gfiQW6iBiP/uBtA18s5IvXDwcsbaHcMK9Vr8xFrXa9lViTOrqbkBkWssGDOWJj5BAiBSX3QngaMwwV3TsahYBQ3BXmsN7gd+oHVtcY/8zN0F8hgu4c1umU55dVA== 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=nWSS3hc1JiPHow5weOtcSSZwhI40ubA4pW2IyqRBfj4=; b=dZO8mAIkJJh+HyPQ67cvQ0Vi6MJ1L5fdTX34OaVp1gFqgrk8SC1wo21iokN5DAEISv5kKdOv7K3XUBXbu/XLy5VLTjzLVis/M17kMVS+463gBYhWeQknN+DJ99gwMxi4pdOc8Xeqt8G/R596WJCNyx7rNxUN/CpLT7CkX26iQXaLWgePq5GUf2mcz5EeaGB/bSv1zw7mL0jsmLr5sF3LQUB0to86Y8M7wbriz7yCiMVoQvQo0T7qiG+hscxZJWHHI44uGqiiEzQljfarDpEuXOA1ELAd8k+zZ/LV/nI2AK6cgcIRbuFlmwIHwuqTko1+Hv/Noip0/2ivNWwnQ15+Fw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=nWSS3hc1JiPHow5weOtcSSZwhI40ubA4pW2IyqRBfj4=; b=lv9r/Sv+VNnGdNDsKeGyKZ75/GLcLVhkZOAVG/bsIEH35fhv83A8QDazBEn6eQ3xUFk2rh/PuIO3elWwQXsHfzwJO7UTC7BnwYiE4FR+sp0IzNsmpgoahZMFjKVnHlZv8VrIJfBKYWdQH3K8bf5PW6pINijZSdKdWXm/YhW3hX7sqW+3P4TmYgOEVCgzkfylGzH+/uVWh1BvWz1QsvLANWLU15UCbzU9c6lkfWrh2EQYa+HVD+YXgfH4bpviwytwhO7nftpmfl8Ekekw3BcbLWrCu0yKqvOWkpW5qYs/uLuW9Kh/GvzQRTGqtOVzaK1fuFmHJIRG8WCJE1C/ozgtHQ== Received: from MW4PR03CA0261.namprd03.prod.outlook.com (2603:10b6:303:b4::26) by DM4PR12MB5344.namprd12.prod.outlook.com (2603:10b6:5:39a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Tue, 20 Dec 2022 07:44:50 +0000 Received: from CO1NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b4:cafe::28) by MW4PR03CA0261.outlook.office365.com (2603:10b6:303:b4::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.21 via Frontend Transport; Tue, 20 Dec 2022 07:44:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1NAM11FT034.mail.protection.outlook.com (10.13.174.248) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.6 via Frontend Transport; Tue, 20 Dec 2022 07:44:50 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 19 Dec 2022 23:44:36 -0800 Received: from nvidia.com (10.126.230.37) 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.36; Mon, 19 Dec 2022 23:44:33 -0800 From: Leo Xu To: CC: Bing Zhao , Ori Kam , Aman Singh , Yuying Zhang , "Thomas Monjalon" , Ferruh Yigit , "Andrew Rybchenko" , Olivier Matz Subject: [PATCH v2 1/3] ethdev: add ICMPv6 ID and sequence Date: Tue, 20 Dec 2022 09:44:01 +0200 Message-ID: <20221220074403.1015411-2-yongquanx@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221220074403.1015411-1-yongquanx@nvidia.com> References: <20221212085923.2314350-1-yongquanx@nvidia.com> <20221220074403.1015411-1-yongquanx@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] 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-TrafficTypeDiagnostic: CO1NAM11FT034:EE_|DM4PR12MB5344:EE_ X-MS-Office365-Filtering-Correlation-Id: 624ce78f-e441-4e1a-7a2b-08dae25e133a X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0VwNMGMTsxI59zVU5AI58T4JjD4yOCsOQMGXCQigm6E3GzQzN90r/Idx8Tpu0a7Yl2axXdiqvVJxcTNNQir13NhSp7OLx+82VUQbCLxiJbH3olVUeZ7fKavO9+Ls42/pRLI4Zmk6RfjADq0L8IypSQYYKYV5JWl/ahXkl7oJSW4ILHUvR6qA5teMwbhTSP6ohBMZjCe7Nca8crXVSF032RnHfNp6CG+i9nY/UL0zhqCqLs1w3rLun7fqwXCEIgr18K6YDdNlvLUpNbcgMAmsIpHhWx5iGUoKmvbhGqUtUs9FgQhpV4vlIXOHJdqBILtpOq0yToDE7sH0oHIIgCEJa0zKEuxzeaN4puY1jKbwGW/FmMwoXnLwAx5/+NbnjBUtAjhb6Nk91ZzYr5a3+apx6Jj5Gu60u/exrcyfmb0plL77cLK3JkI11jGdJAbFzvUoZngSC4W9OWO3kvo1jEq+xoZcRn1XDETL8jgtUQnKbaCajLDOwubpX3Tww8J4fBolIGyi56eXXGdDCaweyiRHweCFeu7B8r9czxIEcsN9Ed4v9Zm4keDW9rMngb1722h1HTHbx6x42dnP0bSMP8yjrHGjUZWBa/uBZQdQopgxBgwlQnyqmmKtd2QvL/TDKTigsFnrp7ZDZiQD848rUu50QLwiAQwBi38kXegXTjO8YiZEviRQUc6spylhM38T8w/nR+iesoTERWGMfZSqRIx59A== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(136003)(346002)(396003)(376002)(451199015)(40470700004)(46966006)(36840700001)(6666004)(478600001)(7696005)(86362001)(186003)(40480700001)(2616005)(6286002)(16526019)(70206006)(6916009)(316002)(55016003)(26005)(70586007)(54906003)(2906002)(336012)(36756003)(83380400001)(8676002)(41300700001)(82310400005)(4326008)(1076003)(356005)(7636003)(82740400003)(36860700001)(40460700003)(47076005)(8936002)(426003)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2022 07:44:50.2499 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 624ce78f-e441-4e1a-7a2b-08dae25e133a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5344 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 This patch adds API support for ICMPv6 ID and sequence. 1: Add two new pattern item types for ICMPv6 echo request and reply: RTE_FLOW_ITEM_TYPE_ICMP6_ECHO_REQUEST RTE_FLOW_ITEM_TYPE_ICMP6_ECHO_REPLY 2: Add new header file rte_icmp6.h for ICMPv6 packet definitions. 3: Enhance testpmd flow pattern to support ICMPv6 identifier and sequence. Example of ICMPv6 echo pattern in testpmd command: pattern eth / ipv6 / icmp6_echo_request / end pattern eth / ipv6 / icmp6_echo_reply / end pattern eth / ipv6 / icmp6_echo_request ident is 20 seq is 30 / end Signed-off-by: Leo Xu Signed-off-by: Bing Zhao --- app/test-pmd/cmdline_flow.c | 70 +++++++++++++++++++++ doc/guides/prog_guide/rte_flow.rst | 14 +++++ doc/guides/rel_notes/release_23_03.rst | 4 ++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 10 +++ lib/ethdev/rte_flow.c | 4 ++ lib/ethdev/rte_flow.h | 25 ++++++++ lib/net/meson.build | 1 + lib/net/rte_icmp6.h | 48 ++++++++++++++ 8 files changed, 176 insertions(+) create mode 100644 lib/net/rte_icmp6.h diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 88108498e0..7dc1528899 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -360,6 +360,12 @@ enum index { ITEM_ICMP6, ITEM_ICMP6_TYPE, ITEM_ICMP6_CODE, + ITEM_ICMP6_ECHO_REQUEST, + ITEM_ICMP6_ECHO_REQUEST_ID, + ITEM_ICMP6_ECHO_REQUEST_SEQ, + ITEM_ICMP6_ECHO_REPLY, + ITEM_ICMP6_ECHO_REPLY_ID, + ITEM_ICMP6_ECHO_REPLY_SEQ, ITEM_ICMP6_ND_NS, ITEM_ICMP6_ND_NS_TARGET_ADDR, ITEM_ICMP6_ND_NA, @@ -1327,6 +1333,8 @@ static const enum index next_item[] = { ITEM_IPV6_EXT, ITEM_IPV6_FRAG_EXT, ITEM_ICMP6, + ITEM_ICMP6_ECHO_REQUEST, + ITEM_ICMP6_ECHO_REPLY, ITEM_ICMP6_ND_NS, ITEM_ICMP6_ND_NA, ITEM_ICMP6_ND_OPT, @@ -1575,6 +1583,20 @@ static const enum index item_icmp6[] = { ZERO, }; +static const enum index item_icmp6_echo_request[] = { + ITEM_ICMP6_ECHO_REQUEST_ID, + ITEM_ICMP6_ECHO_REQUEST_SEQ, + ITEM_NEXT, + ZERO, +}; + +static const enum index item_icmp6_echo_reply[] = { + ITEM_ICMP6_ECHO_REPLY_ID, + ITEM_ICMP6_ECHO_REPLY_SEQ, + ITEM_NEXT, + ZERO, +}; + static const enum index item_icmp6_nd_ns[] = { ITEM_ICMP6_ND_NS_TARGET_ADDR, ITEM_NEXT, @@ -4323,6 +4345,54 @@ static const struct token token_list[] = { .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6, code)), }, + [ITEM_ICMP6_ECHO_REQUEST] = { + .name = "icmp6_echo_request", + .help = "match ICMPv6 echo request", + .priv = PRIV_ITEM(ICMP6_ECHO_REQUEST, + sizeof(struct rte_flow_item_icmp6_echo)), + .next = NEXT(item_icmp6_echo_request), + .call = parse_vc, + }, + [ITEM_ICMP6_ECHO_REQUEST_ID] = { + .name = "ident", + .help = "ICMPv6 echo request identifier", + .next = NEXT(item_icmp6_echo_request, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_echo, + echo.identifier)), + }, + [ITEM_ICMP6_ECHO_REQUEST_SEQ] = { + .name = "seq", + .help = "ICMPv6 echo request sequence", + .next = NEXT(item_icmp6_echo_request, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_echo, + echo.sequence)), + }, + [ITEM_ICMP6_ECHO_REPLY] = { + .name = "icmp6_echo_reply", + .help = "match ICMPv6 echo reply", + .priv = PRIV_ITEM(ICMP6_ECHO_REPLY, + sizeof(struct rte_flow_item_icmp6_echo)), + .next = NEXT(item_icmp6_echo_reply), + .call = parse_vc, + }, + [ITEM_ICMP6_ECHO_REPLY_ID] = { + .name = "ident", + .help = "ICMPv6 echo reply identifier", + .next = NEXT(item_icmp6_echo_reply, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_echo, + echo.identifier)), + }, + [ITEM_ICMP6_ECHO_REPLY_SEQ] = { + .name = "seq", + .help = "ICMPv6 echo reply sequence", + .next = NEXT(item_icmp6_echo_reply, NEXT_ENTRY(COMMON_UNSIGNED), + item_param), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_icmp6_echo, + echo.sequence)), + }, [ITEM_ICMP6_ND_NS] = { .name = "icmp6_nd_ns", .help = "match ICMPv6 neighbor discovery solicitation", diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 3e6242803d..59932e82a6 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -1165,6 +1165,20 @@ Matches any ICMPv6 header. - ``checksum``: ICMPv6 checksum. - Default ``mask`` matches ``type`` and ``code``. +Item: ``ICMP6_ECHO_REQUEST`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Matches an ICMPv6 echo request. + +- ``echo``: ICMP6 echo definition (``rte_icmp6.h``). + +Item: ``ICMP6_ECHO_REPLY`` +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Matches an ICMPv6 echo reply. + +- ``echo``: ICMP6 echo definition (``rte_icmp6.h``). + Item: ``ICMP6_ND_NS`` ^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/guides/rel_notes/release_23_03.rst b/doc/guides/rel_notes/release_23_03.rst index b8c5b68d6c..5af9c43dd9 100644 --- a/doc/guides/rel_notes/release_23_03.rst +++ b/doc/guides/rel_notes/release_23_03.rst @@ -55,6 +55,10 @@ New Features Also, make sure to start the actual text at the margin. ======================================================= +* **Added rte_flow support for matching ICMPv6 ID and sequence fields.** + + Added ``icmp6_echo`` item in rte_flow to support ID and sequence + matching in ICMPv6 echo request/reply packets. Removed Items ------------- diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 0037506a79..f497bba26d 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -3622,6 +3622,16 @@ This section lists supported pattern items and their attributes, if any. - ``type {unsigned}``: ICMPv6 type. - ``code {unsigned}``: ICMPv6 code. +- ``icmp6_echo_request``: match ICMPv6 echo request. + + - ``ident {unsigned}``: ICMPv6 echo request identifier. + - ``seq {unsigned}``: ICMPv6 echo request sequence number. + +- ``icmp6_echo_reply``: match ICMPv6 echo reply. + + - ``ident {unsigned}``: ICMPv6 echo reply identifier. + - ``seq {unsigned}``: ICMPv6 echo reply sequence number. + - ``icmp6_nd_ns``: match ICMPv6 neighbor discovery solicitation. - ``target_addr {ipv6 address}``: target address. diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c index 7d0c24366c..39cd4f9817 100644 --- a/lib/ethdev/rte_flow.c +++ b/lib/ethdev/rte_flow.c @@ -123,6 +123,10 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = { MK_FLOW_ITEM(IPV6_EXT, sizeof(struct rte_flow_item_ipv6_ext)), MK_FLOW_ITEM(IPV6_FRAG_EXT, sizeof(struct rte_flow_item_ipv6_frag_ext)), MK_FLOW_ITEM(ICMP6, sizeof(struct rte_flow_item_icmp6)), + MK_FLOW_ITEM(ICMP6_ECHO_REQUEST, + sizeof(struct rte_flow_item_icmp6_echo)), + MK_FLOW_ITEM(ICMP6_ECHO_REPLY, + sizeof(struct rte_flow_item_icmp6_echo)), MK_FLOW_ITEM(ICMP6_ND_NS, sizeof(struct rte_flow_item_icmp6_nd_ns)), MK_FLOW_ITEM(ICMP6_ND_NA, sizeof(struct rte_flow_item_icmp6_nd_na)), MK_FLOW_ITEM(ICMP6_ND_OPT, sizeof(struct rte_flow_item_icmp6_nd_opt)), diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index b60987db4b..72695aca8a 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -624,6 +625,20 @@ enum rte_flow_item_type { * See struct rte_flow_item_meter_color. */ RTE_FLOW_ITEM_TYPE_METER_COLOR, + + /** + * Matches an ICMPv6 echo request. + * + * See struct rte_flow_item_icmp6_echo. + */ + RTE_FLOW_ITEM_TYPE_ICMP6_ECHO_REQUEST, + + /** + * Matches an ICMPv6 echo reply. + * + * See struct rte_flow_item_icmp6_echo. + */ + RTE_FLOW_ITEM_TYPE_ICMP6_ECHO_REPLY, }; /** @@ -1303,6 +1318,16 @@ static const struct rte_flow_item_icmp6 rte_flow_item_icmp6_mask = { }; #endif +/** + * RTE_FLOW_ITEM_TYPE_ICMP6_ECHO_REQUEST + * RTE_FLOW_ITEM_TYPE_ICMP6_ECHO_REPLY + * + * Matches an ICMPv6 echo request or reply. + */ +struct rte_flow_item_icmp6_echo { + struct rte_icmp6_echo echo; +}; + /** * RTE_FLOW_ITEM_TYPE_ICMP6_ND_NS * diff --git a/lib/net/meson.build b/lib/net/meson.build index 379d161ee0..ce3ca67bdc 100644 --- a/lib/net/meson.build +++ b/lib/net/meson.build @@ -22,6 +22,7 @@ headers = files( 'rte_geneve.h', 'rte_l2tpv2.h', 'rte_ppp.h', + 'rte_icmp6.h', ) sources = files( diff --git a/lib/net/rte_icmp6.h b/lib/net/rte_icmp6.h new file mode 100644 index 0000000000..bf6956d7c9 --- /dev/null +++ b/lib/net/rte_icmp6.h @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright (c) 2022 NVIDIA Corporation & Affiliates + */ + +#ifndef _RTE_ICMP6_H_ +#define _RTE_ICMP6_H_ + +/** + * @file + * + * ICMP6-related defines + */ + +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * ICMP6 header + */ +struct rte_icmp6_hdr { + uint8_t type; + uint8_t code; + rte_be16_t checksum; +} __rte_packed; + +/** + * ICMP6 echo + */ +struct rte_icmp6_echo { + struct rte_icmp6_hdr hdr; + rte_be16_t identifier; + rte_be16_t sequence; +} __rte_packed; + +/* ICMP6 packet types */ +#define RTE_ICMP6_ECHO_REQUEST 128 +#define RTE_ICMP6_ECHO_REPLY 129 + +#ifdef __cplusplus +} +#endif + +#endif /* RTE_ICMP6_H_ */ -- 2.27.0