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 82F7F4240B; Wed, 18 Jan 2023 10:30:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 451A340223; Wed, 18 Jan 2023 10:30:48 +0100 (CET) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id 61C804003F for ; Wed, 18 Jan 2023 10:30:46 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id AB300320091D; Wed, 18 Jan 2023 04:30:43 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 18 Jan 2023 04:30:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1674034243; x= 1674120643; bh=kBW13J59bMbqsc/fPhnDIBj2V2zXP30Z50z5F1Bj8p8=; b=Y uEUnebzQ3WhQ+p3cRIoDs2Q0qOCRExq6H1LWhJnzsAYV79+/l/MZvof4tv1AjRYW pz8FjNBC3Xh+Ac//9ISUI2PfClnTNkniS392vl+RUbwDkvgY4YW6PNbNZQ/kqm9Y lAQuC0RCnNur6D04xqgcuiYGTY9hDuhwhxR1iTArua4LqxDy/PSGrznw23Euq4IY tyIHFTXxTam8Tuas8ZhYpZOxWMi7KlUNXG2iQ6LEgudb3k71gBrcck5JsGmKh6W0 nVgWbrCoKuDnt3dt3i5ikjuN8m1CpFp6rGnlGdYb+EFO3ssYh87X0GLONbs2nIuk +MEvfIUXguuBfz9VTHENw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1674034243; x= 1674120643; bh=kBW13J59bMbqsc/fPhnDIBj2V2zXP30Z50z5F1Bj8p8=; b=D vuRYRMAkP8tMJ+SQcvJ0frUEA2kgzFuO+wta5x4j7UVhoOBeu+qhgPcEJP/+z211 jE2Kw9t/Lz02h0GTQStpyp3bJW4u+Gg8pELkyuGBTZaqGX7IrCtLmBxb936MQeyv LDRJyIGnVfAO9PSnZ7dmXmn1JTX1tDdkjn2EQ/Uf0uIQju8VnyjkA2s6RsU/wfbH vwbNFUndwnI7KpmCOQ5ZVeF6sZkdDy1dxU+bQ5LXcBcO3PN8gNw+7ETX185Om2xi 1msFduubuh0mfk27olKziJSz0KOk0/aOQncYTVt0iDDeMmy/9dJtpckCioNDwc40 GenCejGJk28P9umuI6mSQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddtkedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 18 Jan 2023 04:30:41 -0500 (EST) From: Thomas Monjalon To: Leo Xu Cc: dev@dpdk.org, Bing Zhao , Ori Kam , Aman Singh , Yuying Zhang , Ferruh Yigit , Andrew Rybchenko , Olivier Matz , david.marchand@redhat.com Subject: Re: [PATCH v2 1/3] ethdev: add ICMPv6 ID and sequence Date: Wed, 18 Jan 2023 10:30:40 +0100 Message-ID: <5985170.1B3tZ46Xf9@thomas> In-Reply-To: <20221220074403.1015411-2-yongquanx@nvidia.com> References: <20221212085923.2314350-1-yongquanx@nvidia.com> <20221220074403.1015411-1-yongquanx@nvidia.com> <20221220074403.1015411-2-yongquanx@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 20/12/2022 08:44, Leo Xu: > +* **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. Easier to read: " Added flow items to match ICMPv6 echo request and reply packets. Matching patterns can include ICMP identifier and sequence numbers. " > + /** > + * 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, It is better to use @see doxygen syntax. > +/** > + * 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; > +}; Other items are defined with "hdr" as first field (instead of the name "echo" here). > --- 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', > ) Please insert it after rte_icmp.h. > +#ifndef _RTE_ICMP6_H_ > +#define _RTE_ICMP6_H_ No need of underscores at the beginning and end, it is not reserved. [...] > +/** > + * 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; It is exactly the same as struct rte_icmp_hdr. Why not reuse it? Maybe introduce struct rte_icmp_base_hdr and define rte_icmp_echo_hdr as rte_icmp_hdr? > +/* ICMP6 packet types */ > +#define RTE_ICMP6_ECHO_REQUEST 128 > +#define RTE_ICMP6_ECHO_REPLY 129 Can we avoid adding this file and add only these defines to rte_icmp.h?