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 7DAF941B89; Tue, 31 Jan 2023 07:53:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 649E2410F6; Tue, 31 Jan 2023 07:53:19 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2082.outbound.protection.outlook.com [40.107.101.82]) by mails.dpdk.org (Postfix) with ESMTP id 5E41F40DFB for ; Tue, 31 Jan 2023 07:53:18 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jLHB8/YtPgFp73w2LfknL/hEQuL+czeY8w/5xAkHQKEO1CzG33uMZqG8EereBgNk+1e9ln1zn5PHyLRSEYuvWIJadvBWZmzEDx4jb9Vxw/TqqGaDTNBcorvP7ft5IDaKgdCX85HVFEq+VJB6zp3HzmOIR3wIqFb9rI/fk7bXhz0uBhsJz47ZRt0LsmqHNsUNLLRUmgpRlSkFqKXpHfsLCXKV0b+RalZ3LPmn1wIk+ccD/C9jrFK6j0ECkESzkzEF5G4dsnw2AM6qLu4JsV0MJ2fxnuEUuctauSE3e577+HObxdH/mMmIpNmT7NnnIURN9AA3/r5UgfrBmOwELkgsXg== 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=5cuhjTnZ/VmBpVSpW10rRtAQoxxysepenfvr/z1UVlU=; b=JucoNniGlkbvW5CoevyihDXR9/atRfU9qIH9CCN6OhsnAQVlqAY6+dOGmxUeqgIyjuFCp+6/psi5EHzZ+vl1TNoMh3kiOYM4b8mi4O0Xfp/A8sszTM/+KQBjNV7NJdVhF+vDheK2n4+h2sPupAYNOShfG+fmXKD/Mgwpn80dudXre83r259G0wZd3uYQJkmLoVENRIVQi5RbnUDjIsDMmieCRt15RTJ/nuvKzNQItoYbdJ1+8G2Wp+4NEKGKofdV6gxD5MjSO1Pj6GVVFWS5bqapT3qRuDmEWkwa2VdOtFa6q0jfGtAV94EUlsoDPtQTQ/1QtiecQdExt6UxZSSMKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; 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=5cuhjTnZ/VmBpVSpW10rRtAQoxxysepenfvr/z1UVlU=; b=iIpsokJB8CFgUgoGGuASfuOF27+Rwbh5CIx6Swo6MT3Nvtii/aFVXuv9j9jTpvwGTUSomE0TeC/Ax4BYnzBW+yQcDa12Apnwnq9RanFvHWzU7F5XgJfCrO5+YBLU5WJWy/yxt2e/SRv4196tXwPsvk1K8GuDmRSzjDGnBOD7FM3IvWrbD96iJ/mhyiXMziqJQW/L3Usdsw+AWNWr7cX7beEu/l8qhNYx76fvAAV9a7NCLEviIbtVIsHl3AnXfOEUQR1t8GoooHwZV3p2bRCCEgQ2jbh3HTUHAJDtZ7jcPOfaQXZJ9Btep1vqYbiho0/v6464Ich9jbfFpKmC+AFskg== Received: from CH2PR12MB4248.namprd12.prod.outlook.com (2603:10b6:610:7a::23) by PH0PR12MB5605.namprd12.prod.outlook.com (2603:10b6:510:129::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.33; Tue, 31 Jan 2023 06:53:16 +0000 Received: from CH2PR12MB4248.namprd12.prod.outlook.com ([fe80::f2a4:bf61:61d5:2950]) by CH2PR12MB4248.namprd12.prod.outlook.com ([fe80::f2a4:bf61:61d5:2950%8]) with mapi id 15.20.6043.038; Tue, 31 Jan 2023 06:53:16 +0000 From: "Leo Xu (Networking SW)" To: "NBU-Contact-Thomas Monjalon (EXTERNAL)" 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 Thread-Topic: [PATCH v2 1/3] ethdev: add ICMPv6 ID and sequence Thread-Index: AQHZFEb31FRUO605hEClPnSd5PClL66kFoAAgBQ89hA= Date: Tue, 31 Jan 2023 06:53:15 +0000 Message-ID: References: <20221212085923.2314350-1-yongquanx@nvidia.com> <20221220074403.1015411-1-yongquanx@nvidia.com> <20221220074403.1015411-2-yongquanx@nvidia.com> <5985170.1B3tZ46Xf9@thomas> In-Reply-To: <5985170.1B3tZ46Xf9@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CH2PR12MB4248:EE_|PH0PR12MB5605:EE_ x-ms-office365-filtering-correlation-id: 5e4c52c5-d02b-4ea8-b442-08db0357d428 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: PdvJzFEhXQJmTmY7tCwXa8VppFL7bB4tyEsxjCoGjft/vbBL64SOkzvE1QxQc9FZu+obvNuVqFLM5Ez58x4nG+HUDyziAFgy0EuGeNes7l/EfvzOZAlBXWTi6Oe+fm7wMKk3lPKZRSmM6XHv5cJS4dtmcNNoiFLpkXzKOeaWt8KVyYEHfY7pPiBgZHm9Nw0jbioSNVdWrG6EM6htLRKktXEObBWNMsZGjMi+HB8iOi3AecUUDrkGAMvJTEXEfkyBROq82ryJZXjWHICXk+39tkS3l9TyNob5Zr+6F4435S0EOMrOSk4EJUlJ4K+z0gNFEDES5c3EK5qGE4Nn9oT/+duXKnzEKzwGVXaivRQpuX6N/sjd3X24I75y6D4HWyKIcvLuUppVBlp664gSOKZ4lQ7EeprYd38SjnpI/wEhMSKsdYx5Pq8By2BDKrm1ut2RiXRBMFMjZxM1r+LDpXMkPDAXK0s3JKvHI69B9El3njEyiBjVMzn04ADUB+KT9ffb2QCx8lk3JlDyEoBJhuOEJnhpgN+LLa86DRr5STjmTOWVtXFzbYvbivb7VyJKIMQ34eEkqQc5Zkvk8w8MS4s5PmFm0Xl7/SPU3n2lByiPb5a2NlZLvc1EgEW00pqHMc36qbfKxx0EgRqHxE5DqqWRRIii783byQ4XtAdqngCqlJa64xYi9Xhp/2jzbVPQf5Nome+qYkh1MZc0yvtqmp0NLQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4248.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(376002)(366004)(136003)(396003)(346002)(451199018)(54906003)(83380400001)(6916009)(316002)(52536014)(8936002)(66556008)(76116006)(4326008)(66446008)(8676002)(41300700001)(64756008)(66476007)(66946007)(478600001)(9686003)(186003)(26005)(86362001)(53546011)(71200400001)(6506007)(7696005)(38070700005)(33656002)(55016003)(5660300002)(2906002)(38100700002)(122000001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?nipnyieHziDP9kZhtbcTFcy0q1+ujmWrkOFlUW5VrHn9TQuJG18BMFXIz1U1?= =?us-ascii?Q?1l1vqzFIxZ3qhU2A4k6a3qxAu8eLokzeb6V/nNFY9YtFbR1cyMmfi72jkhrD?= =?us-ascii?Q?A1tJQNjCBwJUiu9GZuigrX1s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ascii?Q?VyqgGt9myqqybt1NaOIw7q4Oa6oivrmud6LERX3A+ko/W/kw34EGQNfOi8lS?= =?us-ascii?Q?mCQRmbXHBW0wjyDeoihtMSpZ4Smo0WZxFIMvA/9axEqMjg4Jytp+p7oxDgG5?= =?us-ascii?Q?DKsgPwmqDYz7OQaFxLbupAmLOazlh8VqUc1G8Z/JOvaVb9T+LDvkN4rincgl?= =?us-ascii?Q?7aLpNPzsWpm9OjvLmTuDKXkzNYGToKMPaI/1luBE15Y/cE32UFG9wCAWqA4B?= =?us-ascii?Q?ZxzOdO0Ih7oy/SlXD4f1QmVSAKDKVLDt2c/LTvpvMB/0HTwovNEcsKS8uVDb?= =?us-ascii?Q?jiaDm1Mbl1ymKcjp15udrqQDNnJXMqbuzietxTa2FRLVg2LPHVEB576wG8IS?= =?us-ascii?Q?uFLHWHlGX3LZjdfQxTaYWVVXjIhzvT0RGTvh+Nk3KsR1egAoILvT0xfO6hPa?= =?us-ascii?Q?L7jvck4YogZH9nU3XSfxSD8hvX1/+RN02+DRBApzXCyYlIMC5Fl0egs/eRWj?= =?us-ascii?Q?Rf1V4q/bpxRwCCOsE2W7ez1sQnzRhPx9hC0PYPH3OjOUY2bb6BfHg+rP/U+g?= =?us-ascii?Q?FJ5ZL4Wy+dp2UtTQEufrcupEwfO1zE5rVfWcRUek?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4248.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e4c52c5-d02b-4ea8-b442-08db0357d428 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jan 2023 06:53:15.8907 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: z6+dwH2CN8FrGPPETW6IZEaPT++sZvMTeBR2Yi8rVP//PlK5rTJGAcfCmGFmNYkNJwnhs/xZ9ZtOMScROxLmOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5605 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 Hi Thomas, Thanks for those comments. PSB > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, January 18, 2023 5:31 PM > 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 >=20 > External email: Use caution opening links or attachments >=20 >=20 > 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. >=20 > Easier to read: > " > Added flow items to match ICMPv6 echo request and reply packets. > Matching patterns can include ICMP identifier and sequence numbers. > " Thanks for that good sentence, will update accordingly. >=20 > > + /** > > + * 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, >=20 > It is better to use @see doxygen syntax. Ok, thanks. >=20 > > +/** > > + * 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; > > +}; >=20 > Other items are defined with "hdr" as first field (instead of the name "e= cho" > here). >=20 > > --- a/lib/net/meson.build > > +++ b/lib/net/meson.build > > @@ -22,6 +22,7 @@ headers =3D files( > > 'rte_geneve.h', > > 'rte_l2tpv2.h', > > 'rte_ppp.h', > > + 'rte_icmp6.h', > > ) >=20 > Please insert it after rte_icmp.h. Will merge the rte_icmp6.h into rte_icmp.h, then no rte_icmp6.h any more. >=20 > > +#ifndef _RTE_ICMP6_H_ > > +#define _RTE_ICMP6_H_ >=20 > No need of underscores at the beginning and end, it is not reserved. >=20 Will merge the rte_icmp6.h into rte_icmp.h, then no rte_icmp6.h any more. > [...] > > +/** > > + * 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; >=20 > 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 n= ot that good.=20 since, rte_icmp_hdr default their headers always having id and sequence fie= lds, which is not applicable for most other icmp6/icmp types packets. I may suggest to keep icmp and icmp6 structures independent against each ot= her, because, looks like these two protocols definitions do not share commo= n base. >=20 > > +/* ICMP6 packet types */ > > +#define RTE_ICMP6_ECHO_REQUEST 128 > > +#define RTE_ICMP6_ECHO_REPLY 129 >=20 > Can we avoid adding this file and add only these defines to rte_icmp.h? >=20 Yes, good idea. rte_ip.h does not have independent v6 header file either. We should not create v6 header file for icmp.