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 75AB141BB1; Thu, 2 Feb 2023 19:33:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0AE61410D7; Thu, 2 Feb 2023 19:33:51 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2051.outbound.protection.outlook.com [40.107.243.51]) by mails.dpdk.org (Postfix) with ESMTP id 0442A40693 for ; Thu, 2 Feb 2023 19:33:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cFpXKWWuOtoKdoO6jrYYOqeVPahUOovW+piOuSrBDvdBA2JkET4nkpdQec7A9GgHYoMwFCyLJBXfRDHXd+Pn9iajZz2LEATIc+lD7+PQ1hyFZVbg7Rqyav8ol//bG/pEXnaAhxbdgqJlgnSDYDkJ++wXwrhIarKcZMzLispetqmvAMWhNQdWAq6ooygAMBLPGmySspypVhKNilePXuqhdnC/qtXGhA6BeTuLdwSXi+mW3RoS24exYDPV1hMWrV1dUEYt5Kzf9noeziFekvmp1GPVmjKQlRBloMHP8hl1LvH5A7pETSfjXH8307eakNEkOXAuZKAVqm8X/ZlL395PWQ== 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=U0HK72CtKBkJodlxTBX+n8OZnH9H9BbsEEIO2gf5m68=; b=iLZyj87cJ90yaHamynej6ek96YgSdP9Nl79wIlMzVcHI0kFZc89jcyhyR90Qh4/l4vrM/7NT7VQK5wGuHSJCWHlLpIB8t6ypjViS0qZwgWTBWL9utNyuln24K0f21tHfbrwUb5BAPZH0cANOD6pZAnhJ7OLqAJYWzGRGs+yqBgLVW0MPVIZdWUvK7MM7aTdF+WOdkOdqfFhGE3wHM928mvyJrDu7NYYpUJkfBNM9reKCJPzgq5mYbsVIgcsLH1XR4eIAnp5dF5F0cHOQ6J5IQjWDzi2Srco/WqEx5V5IO+twF8YE0lZvA+fO/UjETUK1ogUe0Hq81Zvm1o28sPd6vg== 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=U0HK72CtKBkJodlxTBX+n8OZnH9H9BbsEEIO2gf5m68=; b=X6BGrTmP9/Utk+RIGYIlLGkhGolck7SeoWjkDOS8ee7URSoR9BKi0MJbkmYAxACRRujvg3HZ0UVzdG9lGBYLDS5F4CsZ1wzfAMsFYcTwA5oBvkJYMyyEBfuMkMsCtD1+nhdSop9Ur0F/vq2dohjw+u8E4EO7Xr+8PA0mZRmU6F6sOzYvCupJNGduAbhd4D1p1MjpsrzDv1MPUM5rWuGOqlLLjWVHvjs/4YnzJgjI74lUqsLuoKk/mrnGAos8ZqWJ4hQp/KGUE0auY2tNA2D6/KLwc78AJ9c+e1g0DZRG88uvVMuDpWjpAlP0428okMVNmKbPc+zAxTyj+t6jlLBpOg== Received: from CH2PR12MB4248.namprd12.prod.outlook.com (2603:10b6:610:7a::23) by MN2PR12MB4206.namprd12.prod.outlook.com (2603:10b6:208:1d5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.24; Thu, 2 Feb 2023 18:33:48 +0000 Received: from CH2PR12MB4248.namprd12.prod.outlook.com ([fe80::f2a4:bf61:61d5:2950]) by CH2PR12MB4248.namprd12.prod.outlook.com ([fe80::f2a4:bf61:61d5:2950%9]) with mapi id 15.20.6064.027; Thu, 2 Feb 2023 18:33:47 +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: AQHZFEb31FRUO605hEClPnSd5PClL66kFoAAgBQ89hCAAcr5AIACINJg Date: Thu, 2 Feb 2023 18:33:47 +0000 Message-ID: References: <20221212085923.2314350-1-yongquanx@nvidia.com> <5985170.1B3tZ46Xf9@thomas> <6520018.4vTCxPXJkl@thomas> In-Reply-To: <6520018.4vTCxPXJkl@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_|MN2PR12MB4206:EE_ x-ms-office365-filtering-correlation-id: 7e686824-bf65-49fb-4b2a-08db054c05ef 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: lN4dL4CP+hlXucaMAT2+s1jNKQ8Ylu/gCRgDl+kaukY473g7W/tGbkuNNGK55PbFYN7JOWxBZ7H/R3cYtvZB9o5G2TK11BEaxaIBzlGxVw5zwWvwg4AlknsI0LrLqBODkJsquEe1+FNMr2dFn4iClv0wYAXlUp1XiUF6QCnVsXmqt/VgoiYA7zs8krc85B6a2HHxqNNcWz/RAsWwHNhI8Ni7nOe1BG2jKByy83nL898OqZzqUcVhnRUiJDh0WvaRjfYH0rd5/wHYo6S3GEA39FgK0XvIignmOr4z9mQfkynh0U3U54PO0xK/bFmbVIhjpA3ZKojnnzkBdxTJ3GM2qApvrNcE1y1SzsvopvptphPxd/DbvoWAN+oo2LZesn8BSs+Qqapdp0JZoeK/ME8Esu1+uEC9Kr2+nkskl1ZpXhdchFLQdKg68bI/bwa+ZZk8uu6S+SLYdf7WJ4XgOUZwvOjtmbEUD0Ks4QrB6Pd8RZ2YRV44Ff9Ydv4x4ozoZUjJ1JG2F5sCaOjC/ZoYs3gdFbHiTCsilv5Q99PcJWkTLSX8f/NmqVWmUNByxmYSxYa+ox6kKExOHaLJc8OJ0/RSPs8rSsTtSAEGiv7plKx/9Otz90IthiG2NfTAQ4BvIKCZ5Pcu0SLuHmHoIb4Tbnrmv4zk50yb0lfXOqW/UDFl111GKUuZQ483u4X6n2GvmMsJRBRpccmYcXcLFoLJLf1JSw== 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)(396003)(346002)(136003)(376002)(366004)(39860400002)(451199018)(122000001)(33656002)(38100700002)(86362001)(38070700005)(66446008)(41300700001)(26005)(316002)(66946007)(66556008)(64756008)(66476007)(6916009)(55016003)(8936002)(4326008)(54906003)(8676002)(76116006)(2906002)(52536014)(478600001)(71200400001)(9686003)(7696005)(186003)(5660300002)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?h0Q4fGC/9QMO401dfZYT1RxviP4EMVFGIYkKTYaAbTtXJAxKTPVdI5Qa4xFF?= =?us-ascii?Q?NeaL/Jg+/r01l2Ugb5bgwI3HHQ195bM68Iu77gZyB2m4wrCR2M/1Jmrb7I/t?= =?us-ascii?Q?3dP7De+oNmAcB9WMuOw4HPwrwI5N9lKExXsoie4it4AJ70VVJh2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hdmeT9lJrrM1MvSt5ksjUc8Bb0YxQFYNE6V?= =?us-ascii?Q?2ASR4SuMAjDdbNWYrqJ9CGTlP/HwvjcvSIPSzfkk26kfAw/nagn9/zL7vBIg?= =?us-ascii?Q?fNUpaFKr5Ar+bBDKfeiKuhrMLEVgL4kQGfIRYtLcLwV/Ji6957q5Z+t0mpdR?= =?us-ascii?Q?J2KN856eBQ9h1cXVw+/V6lM1b2fj65NTC317XovuUctKOzC6+anP/xs8Cp35?= =?us-ascii?Q?SMqgdO2VCH3cRloPjzX0aeYQqVp8gi4K7emDeNnH0L5pxjnxAfNpaX1oakKH?= =?us-ascii?Q?rO51Gi7IUWJQiFqcq9Cf5NpFghfirQEr+8rn3scF6eST7T4LXMtohGzsyu/T?= =?us-ascii?Q?JPoiPxf+RB1/KVEDgudEOnX77mkcvNARmzm2ByH97IV8EEBbzLwbpD9kbBdy?= =?us-ascii?Q?NiBNdif+iaaF2uMkoqrjWFcZeSB/k1mUuqahxmQ8c0F79D58Lx4RfLEHUVUy?= =?us-ascii?Q?ShOXDau7tSEL87uEclTz82mvgDnieHoGKQqUHG3M375vgDvZiLxkeWuL3gB1?= =?us-ascii?Q?AaBPI+nwY9D9ofBJCuLon7KK7i9+JxVn9cMQCZ14?= 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: 7e686824-bf65-49fb-4b2a-08db054c05ef X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Feb 2023 18:33:47.7654 (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: UECJ4OC2yXbYlAKgWssLnwOR/s2gb/+/UWfk3svqOA1FgFo3Wl3r0ud+Zt+BrsNbvwUX8KoXNMCUXJ2PyJi8JA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4206 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 PSB > 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 eac= h > other, because, looks like these two protocols definitions do not share c= ommon > base. >=20 > What about introducing rte_icmp_base_hdr? > We should try to avoid duplicating things. >=20 You mean introduce rte_icmp_base_hdr like following? struct rte_icmp_base_hdr { uint8_t icmp_type; uint8_t icmp_code; rte_be16_t icmp_cksum; } __rte_packed; And change the existing rte_icmp_hdr to be: struct rte_icmp_hdr { rte_icmp_base_hdr bash_hdr; rte_be16_t icmp_ident;=20 rte_be16_t icmp_seq_nb; } __rte_packed; #define rte_icmp6_echo struct rte_icmp_hdr; If it is, there will be some compatibilities issues, since we changed exist= ing structure. Or, maybe I'm missing something. Would you help to give more details about above comment?