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 6353AA0093; Thu, 13 Jan 2022 16:04:47 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F25642741; Thu, 13 Jan 2022 16:04:47 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 0874940150 for ; Thu, 13 Jan 2022 16:04:45 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20DABXNd023894; Thu, 13 Jan 2022 07:04:44 -0800 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2109.outbound.protection.outlook.com [104.47.58.109]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3djhd4ryt2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 13 Jan 2022 07:04:44 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RNqiTWihalyaPOiNqnNtIhfOTo0wwKYBLJU2E4AvJMIc+sx1g0Vd5oNOkapgoJN1SSH7eSnjd7CFE4a5OYiYi2ezGnJ3+NGIlw/jBIELfsrxtWizZRaA5vmxexdh7xBFI6BhRdxuVE/OXQ0YtsjPzNDXUuxQ9n4qoTu2AV7EOeyjaqoWw4eah/26bvXZHjp8CEwebK0r+fJF6R4fvHrXlzxR/ndCtiiA59/y3/hQLBtpOxgnzwi9jl19Xl2F1IhcNbe0XAFUMy2SZ8sJLqyC0UOo5FmROOscLQ2DrIfUJzmZ88wtH6SMLlzKV0aDfnNeZcICPSFBCHOxRd3AtPIing== 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=3tuaEHcWhDrBexc1rmlbO31cX+DJQpcvr5ecbpZLKfk=; b=id1VDBNQ2tNPoiZyBZmhiZ/yxGk3JAvPbJmfCcgk3XYuwB3lW96Y2yHph28mUfmOAXHdfVYTg0jqHNZUKLujy+MKu1r52oJTdOi+Dk1bUfDbVkzxGmPs5wu5eCCSWgZeGFVlga5ehL79BZ1COURcr3GiKZOl8HzWjO6vx30wM1uv5M44GMSWCwITfdlFStk5b2/9+zkrMWSp+2M991dX+qT7jEwZ02bZZIf2SlUZwR4Ylo3tGphLsr51OQ/hzuBF5j7dj3bEm1WNCePa49vDMXc9tMSHrJAFgz2iH9SqJrAhD5mwL2HQZluCUQ3rWnbOdA07hqLxOEe7xw55Ven+cA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3tuaEHcWhDrBexc1rmlbO31cX+DJQpcvr5ecbpZLKfk=; b=ZqX/rfSDyMX3jB6kF46w4+4z1DARLgWHmeOL6yTlEgnx5cBlf54NWN+QyAiFMVBUfiIrymKVDLK/VPl8bkLJ2hWVhPtbhJ82Jkjhg+q1O77BVrJ4k1JIocnVgeWH9RPud4QxK35qhJXZ7FpeTgx05rJl02yOk/29Zosh6Q6a0N4= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by BN8PR18MB2754.namprd18.prod.outlook.com (2603:10b6:408:76::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.9; Thu, 13 Jan 2022 15:04:41 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::ecd1:2b8:57bd:7780]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::ecd1:2b8:57bd:7780%7]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 15:04:40 +0000 From: Akhil Goyal To: "Ananyev, Konstantin" , "dev@dpdk.org" CC: Anoob Joseph , "Nicolau, Radu" , "Doherty, Declan" , "hemant.agrawal@nxp.com" , "matan@nvidia.com" , "thomas@monjalon.net" , "Yigit, Ferruh" , "andrew.rybchenko@oktetlabs.ru" , "olivier.matz@6wind.com" , "Xu, Rosen" Subject: RE: [PATCH 3/8] ethdev: add mbuf dynfield for incomplete IP reassembly Thread-Topic: [PATCH 3/8] ethdev: add mbuf dynfield for incomplete IP reassembly Thread-Index: AQHYALPPmu8JVnwqYk2KffUFopwd36xeGRCAgAAa47CAAsakkIAAGe+AgAAGW5A= Date: Thu, 13 Jan 2022 15:04:40 +0000 Message-ID: References: <20210823100259.1619886-1-gakhil@marvell.com> <20220103150813.1694888-1-gakhil@marvell.com> <20220103150813.1694888-4-gakhil@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 34b8e491-543a-4d6c-f427-08d9d6a60614 x-ms-traffictypediagnostic: BN8PR18MB2754:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pg0Aja4KEpFWMtWZBTYSCRpQbjaRBnneUKsyKhf+HnVmU9np/EAnvglK6pOil+Yq2qDJz/MHw54Prb2cyx1JURX4s6XtGlYteqW6s5Z78MxLEnLPaI4/t49toRuBSZ83vbDqQSenbGcLrUrgvSPEMZed7Ty2VoK3VP/DH/Y/PTkZTGdj6XMvB9uNWErVibaDrIo6Ul4h/erKepUK3rEk4Z4IsQTtNAiTFs8NZIohB6FssqiF2HNCS9X6jsilVbWh2IMQo8ybHHK3Vj90oDk3iCOKCreF2CcufYBRXMdpizt6q1f84zy/sGrDI+i1rgA479mYodyI5B7EWCAKFHg5U0ZfpxvVvJ2REyc21q3OZ3vRuTk+qmAqfAAjvnOEQ7LmxlwP8/wvN0oPZwtRHBREp9iWBHBCdImME2c//0vVIaiKaV2diSvWdkE7zSEU2ZtQJKd4ywgdl/UGodr1N0XGO+wZ/6Z0pr3JR3LC9Vj0x3m2l80LmjAD3FapHcIghdOGm15NERNc+CiR1QsNpblYq+jUvU8cVd5RHmy/V8cfsdRrN7Mn7JiF9MRHRWm4OFE4/oZUDrPagShSQ0VjfdHF9Ox3SQEHTAT3zxCs7DFe88U2BriuVtYG+iC6Mb0NaohZwuXYkty1hf1/Q7cGWMmD8iF8GsrL5NXoaHQbs4yDxeEhlY3Izh/2NP9fVJS42vNvDX1UzHJr5y0zEDAP+ls8Yg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(55236004)(6506007)(316002)(186003)(110136005)(54906003)(26005)(7416002)(71200400001)(52536014)(7696005)(86362001)(55016003)(508600001)(5660300002)(38100700002)(66446008)(122000001)(8936002)(33656002)(8676002)(4326008)(76116006)(38070700005)(64756008)(9686003)(2906002)(66556008)(66946007)(66476007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MzZWZdUy4i9hnG14cJRcJHbLLufbDTEdB+7Rdui1rpmgarf/U6fQPzEM/wz0?= =?us-ascii?Q?Lx7hqgsT6n1EumiReHboU8gbz/FoFpVqYCyD3DjVC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q?HozfSMuwJg55XuQAh+1l7lmrU6u5glpQVIr4fppXFdrwpF7/G7AloRk6Wjzp?= =?us-ascii?Q?qA4c1i4mp8ayC4Hgsq9SkDPu9424f2enadBIzvzxXx5CCeo/bzT3J06IcaTU?= =?us-ascii?Q?MSZ3tEA9URxeh9lxuPegxuhcjG8y8yp++UdZWWCT0Uu2wLhBxZQNAQGvEUd3?= =?us-ascii?Q?3OJG9xKNB03EUQxEn7pm+IxE1t9Oil2Uje66kGRnr/lmKQi2A3oodIKuCUPM?= =?us-ascii?Q?J5NW/mArmyMTA67EucQnGIxIRXJHhI6BE0e5yQPYGtGI25VmtBL8Uwh5CzvY?= =?us-ascii?Q?MggPYPtvjMNKTtmLNerwDd7uiKJ3ODheaYl5Zq/qzcZFhGV+ss5SMaM8rLFm?= =?us-ascii?Q?F2PPVE0sFp+5y8EO9ap6dEjp1VtTVw96YKAgiEYf3vwoj2TemYEtJhbl2SdM?= =?us-ascii?Q?Pb5012IQdEmM7008TLgvpmzDlwn38hfTQIBEp9aMz/hkKKeyG3EcRqvuYV+p?= =?us-ascii?Q?Hzg2jFPPEyMV4KxBcIHnyIOsMfrjD3zZ9KMZWMJX2oYfpYuQ0z0vM8ejNO3k?= =?us-ascii?Q?ePNozkB1xRMmPFthoB9LaezhPiDThyAUtlEneExrai1rwUbAsiqNzPVTB18G?= =?us-ascii?Q?3DyxXKvM6nKFkhBdgE2nVbKJnrLqCF37fe6ZRldk2k6ZuYe+HD6cQWpO7RDO?= =?us-ascii?Q?AA=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 34b8e491-543a-4d6c-f427-08d9d6a60614 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jan 2022 15:04:40.3181 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XcOBPnGBf+BByEn2N0EjBElDnSesoSndP4LGBdOXdJugvBeQfUL4BnTqFMjw9+BzMYRUyQ2xLdge03ViLBjsew== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR18MB2754 X-Proofpoint-GUID: ocp0CVm9T1kEg_aWQ_BNPpDS4Rxf9_a6 X-Proofpoint-ORIG-GUID: ocp0CVm9T1kEg_aWQ_BNPpDS4Rxf9_a6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-13_07,2022-01-13_01,2021-12-02_01 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 Akhil, >=20 > > Hi Konstantin, > > > > > Hardware IP reassembly may be incomplete for multiple reasons lik= e > > > > > reassembly timeout reached, duplicate fragments, etc. > > > > > To save application cycles to process these packets again, a new > > > > > mbuf ol_flag (RTE_MBUF_F_RX_IPREASSEMBLY_INCOMPLETE) is added > to > > > > > show that the mbuf received is not reassembled properly. > > > > > > > > If we use dynfiled for data, why not use dynflag for > > > > RTE_MBUF_F_RX_IPREASSEMBLY_INCOMPLETE? > > > > That way we can avoid introduced hardcoded (always defined) flags f= or > that > > > > case. > > > > > > I have not looked into using dynflag. Will explore if it can be used. > > The intent of adding this feature is to reduce application cycles for I= P > reassembly. > > But if we use dynflag, it will take a lot of cycles to check if dyn fla= g is set or > not. > > As I understand, it first need to be looked up in a linked list and the= n checked. > > And this will be checked for each packet even if there is no reassembly > involved. >=20 > No, I don't think it is correct understanding. > For dyn-flag it is the same approach as for dyn-field. > At init time it selects the bit which will be used and return it'e value = to the user. > Then user will set/check the at runtime. > So no linking list walks at runtime. > All you missing comparing to hard-coded values: complier optimizations. >=20 Ok, got it. rte_mbuf_dynflag_lookup() need to happen only for the first mbu= f. I was checking is_timestamp_enabled() in test-pmd. Didn't see that dynflag = was a static variable. I thought it was happening for each packet.