From patchwork Mon Dec 12 08:59:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Xu X-Patchwork-Id: 120765 X-Patchwork-Delegate: andrew.rybchenko@oktetlabs.ru Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C81A9A034C; Mon, 12 Dec 2022 10:01:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA8E94021D; Mon, 12 Dec 2022 10:01:38 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2076.outbound.protection.outlook.com [40.107.92.76]) by mails.dpdk.org (Postfix) with ESMTP id 2E7DF40151 for ; Mon, 12 Dec 2022 10:01:37 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fzfj8rxJbjrnkl0F4VhKCkyqj0dzuPTzeLyUY9Vv3lRDar+pTON2gIbeqTPvcxepSM5+WKIC0UpUANaKBapQJjD0ZcbH9e1RIMM21urnyjYMUQqqUa9r1oZs77YLPQF7z7f6PpfOD455UUCdOGF5tbIC9waK5cLq9yLTG2w+shdIImVYwVTqUVAvCteMO5E+PCyAN8mqT4dTHemSUrLKPEA/MCBSS1Aa1pOKMitOuVNq0GfVP0X2IxX7/lsXWtEr/wsAx4Qsmp1930X5XOZPlq9NJLKY+S5NJ0QruocAXGm0ely2hk9qW/GNIQM2kg7ZT/bcUueix5cJFd+nMDP2PQ== 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=U+oSuNMdnywV9KSHyNg/3G67K63PlgNda9irbhy8Ma0=; b=TMZJqxoja42sHeVd2t1LxTELH1nQZ2t+B9pW6YgjTq54BLJds0k74QkdoVCLW7+4p2trGV2Vnxzkp7jwCy3VL51cFK4l060WWzIGw5vusufN/UU6TeY9ovC6HLticqbreOCSFI/hILb2X1ewdh8UekR5G5VtbwMu8qc+K8TRnPNuSTw0KNEpbV1A9yapMlkmanMBzfxHkcub5wqtkyLhmO4A/+WODfTHh8vasdNketQYyECo/PFleFfxjTJe+zZZF2FbzVEXxQclCpmxUBq6WusTsJH5p61M0LOVEaq6ym7DFvzoq0CU5OADVGnvTqhHJgOv1IRZ6c0pQaCnTObdTA== 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=U+oSuNMdnywV9KSHyNg/3G67K63PlgNda9irbhy8Ma0=; b=LwXklnMZwiC3RFSkPr+2vC1RWdsKxibOQk/vMxjwYH8ClYAG/ldULAoECmOr3LeNqXEkdagSelZO9iyoBj/VYuZcesObLzCsrhAy/UVsR8Y9m79cj+dSYBN+7Vdkf5JF3pzjNXEqjOidjZ7BP7P7jvqeKFZjaVpiewj1ia1/qSAtrprL2ChedeZ1VWD/Ryz7TkdZW7gFsnZT1ZqMwdzPfw0HX6BpKVW4Vp4VkQzGt+CIAuhCmITiEHQ100SuNhBzRlwesInoblFYE4pGBoA/vf08U55Eai6eqYyCjvRUi4ThTlBwazxS8jq5yPwY+D2z+NvIwIe5+/zoJ6TGgglODg== Received: from BLAPR03CA0070.namprd03.prod.outlook.com (2603:10b6:208:329::15) by DM4PR12MB7694.namprd12.prod.outlook.com (2603:10b6:8:102::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19; Mon, 12 Dec 2022 09:01:34 +0000 Received: from BL02EPF0000C406.namprd05.prod.outlook.com (2603:10b6:208:329:cafe::79) by BLAPR03CA0070.outlook.office365.com (2603:10b6:208:329::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19 via Frontend Transport; Mon, 12 Dec 2022 09:01:34 +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 BL02EPF0000C406.mail.protection.outlook.com (10.167.241.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.9 via Frontend Transport; Mon, 12 Dec 2022 09:01:33 +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, 12 Dec 2022 01:01:15 -0800 Received: from nvidia.com (10.126.231.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, 12 Dec 2022 01:01:11 -0800 From: Leo Xu To: CC: Bing Zhao , Ori Kam , Wenzhuo Lu , Beilei Xing , "Bernard Iremonger" , Thomas Monjalon , Ferruh Yigit , "Andrew Rybchenko" , Olivier Matz Subject: [PATCH 1/3] ethdev: add ICMPv6 id and sequence Date: Mon, 12 Dec 2022 10:59:20 +0200 Message-ID: <20221212085923.2314350-2-yongquanx@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221212085923.2314350-1-yongquanx@nvidia.com> References: <20221212085923.2314350-1-yongquanx@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [10.126.231.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: BL02EPF0000C406:EE_|DM4PR12MB7694:EE_ X-MS-Office365-Filtering-Correlation-Id: 07697995-95f7-4013-4c2f-08dadc1f77e4 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: xbw4ZiHK0SBtJOo40IQtik3JyTVKbuxMFtUvguboXqgtV0v93MtFDA5AXHHFWjwcKm6cqHE3d4yYUlZMOcwRzkgw2mX0OoQZSjrmQvsYwKvnBKvVFDpQgVmTniY8/fwUTOSxwl1mxDMUcNjEBipK0b2oRhLbs5o8PUh41HYgcZCOrRj6Eps/YB+scqhyUJx9D3GUiYHK/3K3ZQLHm8FsGe5BfFEvalkB7tWkuAjKyqVmZnNPnXZ0dOhVlxzf9cCgvew8OzsluoMGVCoaSjy0a/UtcnQQR6vaZrgzd3sOLzgl+kRVUNL9IXYhdZL08tj4XmRAGGdTNHQqhaYK2V/kwqZPhlhsdHjGL5uJGYRJ1siThEpDyk2GRk/kukmwgl0F4yqNTxhrXj1gyM76e0QacDUoyDgJJhUsuXpnWoQgXEiiyZWdlUyDE3toT2CDmspG635p4rFI1LYJCxCvLTUKOBuU7M+K6QSPtqoRjpc9EDLasLdibGoSbUFwQC2tEWvShNxkTOJG4/ijY9qYQlBI5PIziqDbpRF1CFbcSpoId5c2b1KJdnZ4VDqoYQv+lmF+mwpYqjashZGIrDPEyeluSYtxuFfI8CiXQhDYrSjI76/XqX0AVWZ0DDnBBR/Po1H2vdQ+ZQHwknPJqpMscfK6YZBPwL5oNr3oGCB0QCwP0Y1N+SkmzxxiajXxjACn8167Lc+a7IJs+P0Bd6AKknZyoQ== 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)(136003)(39860400002)(396003)(346002)(376002)(451199015)(46966006)(36840700001)(40470700004)(186003)(16526019)(36756003)(2906002)(47076005)(426003)(336012)(54906003)(1076003)(6916009)(316002)(40460700003)(83380400001)(7696005)(6666004)(40480700001)(86362001)(55016003)(2616005)(26005)(6286002)(478600001)(70206006)(82310400005)(82740400003)(70586007)(41300700001)(8676002)(4326008)(36860700001)(7636003)(8936002)(5660300002)(356005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2022 09:01:33.7862 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 07697995-95f7-4013-4c2f-08dadc1f77e4 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: BL02EPF0000C406.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7694 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/testpmd_app_ug/testpmd_funcs.rst | 10 +++ lib/librte_ethdev/rte_flow.c | 4 ++ lib/librte_ethdev/rte_flow.h | 25 ++++++++ lib/librte_net/meson.build | 3 +- lib/librte_net/rte_icmp6.h | 48 ++++++++++++++ 7 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 lib/librte_net/rte_icmp6.h diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index ce8035cb46..413ef905f2 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -375,6 +375,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, @@ -1373,6 +1379,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, @@ -1629,6 +1637,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, @@ -4432,6 +4454,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(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(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(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(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 b0bbb6fcbe..282fa1176c 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -1260,6 +1260,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/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index d711ca1f5c..6c370c033f 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -4033,6 +4033,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/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c index 350c46420c..4f4c641111 100644 --- a/lib/librte_ethdev/rte_flow.c +++ b/lib/librte_ethdev/rte_flow.c @@ -128,6 +128,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/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index 1b527f045a..fa21ed0c52 100644 --- a/lib/librte_ethdev/rte_flow.h +++ b/lib/librte_ethdev/rte_flow.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -684,6 +685,20 @@ enum rte_flow_item_type { * @see struct rte_flow_item_quota */ RTE_FLOW_ITEM_TYPE_QUOTA, + + /** + * 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, }; /** @@ -1428,6 +1443,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/librte_net/meson.build b/lib/librte_net/meson.build index 94d816e79f..5c5d0a03c6 100644 --- a/lib/librte_net/meson.build +++ b/lib/librte_net/meson.build @@ -17,7 +17,8 @@ headers = files('rte_ip.h', 'rte_mpls.h', 'rte_higig.h', 'rte_ecpri.h', - 'rte_geneve.h') + 'rte_geneve.h', + 'rte_icmp6.h') sources = files('rte_arp.c', 'rte_ether.c', 'rte_net.c', 'rte_net_crc.c') deps += ['mbuf'] diff --git a/lib/librte_net/rte_icmp6.h b/lib/librte_net/rte_icmp6.h new file mode 100644 index 0000000000..bf6956d7c9 --- /dev/null +++ b/lib/librte_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_ */