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 EDD5C41B9D; Wed, 1 Feb 2023 10:56:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AAF64021F; Wed, 1 Feb 2023 10:56:53 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 884A940141 for ; Wed, 1 Feb 2023 10:56:52 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 913EA5C012F; Wed, 1 Feb 2023 04:56:49 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 01 Feb 2023 04:56:49 -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=1675245409; x= 1675331809; bh=dVqxYdImjSaGGW6RRS8n+k2khyAXdYGVhd89/1dt1E8=; b=q jw0ONinda+RwGgoepZjXf+ybUD8cMI0WTGP7qt/JbG3hQZ1mjdiODLdaN55ov9rm HXSyIS7C12gs6BE3QvqP2B8Yw0JDpKS0HxmBYfumeQaq3K8hRHLOeamImLxjYeez 6mFzO7VFDvoDJ9kNEakX1jxqzNo7Yj1Xpd1UbzHOoqLgHjFQEwVy8Y2TLDeFzY6p EJpxsY+D5dCEedtawEyvwsQQglGe7Mbzi0/tlzBhrf2ntb1/ui5aPHKhSki0eSFs zwS039iKw7FMu6DErDfKyH7fRNv7n6/6PN1pECuZ4PxCtEZ//Hmp1pow9gyp2xcd y267JfeMciTSdpvNszoYQ== 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=1675245409; x= 1675331809; bh=dVqxYdImjSaGGW6RRS8n+k2khyAXdYGVhd89/1dt1E8=; b=L qEI61r2aTKndKQsNX4UUGB74WWLDKESj2fjDtO0rOfxleKX5llhoG/2WuchbSSBI TFQi3CrPtvsAHafH0TVjDTnRR7RWrUa4n+v4/uLQqaGqbIW49C9MEOMuesXfzu4U MIUdCt4owylAWwAozEYCkVifAEgq1fA5Kqr7/bn13gOrIChKluqCO6VNfwEb/BY/ 5YriDGrAgMJQhGOg16u4AsPrbJGqm7ZnB+NSZ6C/GbSKTEshZ82XU1/POligzdTg 5BfnmnVKVVJiLxoeJI4JGOiKIcNMmZy3W55MIy1ddMY4G/pbgzk90sHgOqm2pFbb L5Yzm12Eb4/r8M0oUu9sA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudefiedgtdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Feb 2023 04:56:48 -0500 (EST) From: Thomas Monjalon To: "Leo Xu (Networking SW)" 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, 01 Feb 2023 10:56:46 +0100 Message-ID: <6520018.4vTCxPXJkl@thomas> In-Reply-To: References: <20221212085923.2314350-1-yongquanx@nvidia.com> <5985170.1B3tZ46Xf9@thomas> 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 31/01/2023 07:53, Leo Xu (Networking SW): > From: Thomas Monjalon > > 20/12/2022 08:44, Leo Xu: > > > +/** > > > + * 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? > > Hi Thomas, > Looks like, using rte_icmp_hdr as base header for both icmp and icmpv6 is not that good. > since, rte_icmp_hdr default their headers always having id and sequence fields, which is not applicable for most other icmp6/icmp types packets. > > I may suggest to keep icmp and icmp6 structures independent against each other, because, looks like these two protocols definitions do not share common base. What about introducing rte_icmp_base_hdr? We should try to avoid duplicating things.