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 4EC81A034D; Wed, 12 Jan 2022 11:30:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A959426E3; Wed, 12 Jan 2022 11:30:58 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 9E8B940040 for ; Wed, 12 Jan 2022 11:30:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641983456; x=1673519456; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=P3MrthW0nTTlN/mRYsXSg9qd4IHF5pxoXgAm1P1VzGg=; b=G/kjNFTnTVYG1pb5o0B17GYK7Jirz194VosXA9dhR4BSQ06dU96iX9fG oIBEIl8juqUwmWNhFPjWH3mQK16Ko0LBtLilJhKWx9t2s5tzVQpgfHDtN tgd2opGoKXcwYkG7VBaCn5mxT5GcqGjXLGS+rlJ+Jxx1PVuwE0ShPdniO UoH0gd/67xuVwMxA9YoekIGYX8ua7WQWfLkN8itkVwyqOouDCpWiUeCRR Zx8k3bVC4e4rGN78m6zJqiGOCE068dN8xp7wlTQ2rwfPUd+Pw/r6Q2Bac JVoEksJBkRhqKLyQJMLDPvvrVsJHguShu8sbtlafFj+Fwz+H10hEMNF7z w==; X-IronPort-AV: E=McAfee;i="6200,9189,10224"; a="243502766" X-IronPort-AV: E=Sophos;i="5.88,282,1635231600"; d="scan'208";a="243502766" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2022 02:30:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,282,1635231600"; d="scan'208";a="623393744" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga004.jf.intel.com with ESMTP; 12 Jan 2022 02:30:32 -0800 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 12 Jan 2022 02:30:32 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 12 Jan 2022 02:30:32 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 12 Jan 2022 02:30:31 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WS8Zha7GkPvG2ziBsxlAFj0LdX9CIOHv+KTO1TRNr7/g/EhinjDet2HoVj2lBnyQf+rPgjcE1CdeOl8gJHGr21CoJDQSUUqQUN+r6wjwRMALxjX8tNq66QByLXe2rWtlKX+IvnZ6XOoJzT5gdBHxRNA8vlng88MHAmEb2RUJEeV0K/WmOBSubvRLgZHlgM3YcvLq8LJJ4JQc5uaERqg6+mET0JktFsIiUydE1k4rUEdJGXfpDGdNyMrmKS8Wc6ED33joBtwCbE9Exjh6Q1hsO+KKzGX5FWldxcKipG0ckeLtxRFtypfPfanOF/iDM8YXlp+OD05PzK4CBFb0zU4irQ== 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=9nzRQnt2KBD1bOVu/slkrDkBGKEgmfZMCKNHP8HVpJA=; b=a8dVgt4RkgfliVpXFu75sORkQz4bBGbM9D3E3XOkKXbKLSCM/C7Bd7hPFM3v4vFPRQyARQ8z034lZMmFsKMzrGk/AElOaSno8jvrqdIFLWo55FMcWwLfiGbT2u79imOzPe8M6p1SmZ/FYMn5+hs3MK2t0yVOUo+cwGoikmTwqb8vGfKLEFZeWeO6KkSj9sjNGzchHp9W51HHn56GZRbatyknjoqHXrLrp3t9dIh9QctoRTixbOzYQbWCANrIxEgt9lYZnI2xhq23cJ4vI0EFmKHaaSKuBUZbic8RxaPVkirEFTey9i6VGeA9EYGw93zfT5+oXt5Jka4UisqwTuX1Tw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by SN6PR11MB3520.namprd11.prod.outlook.com (2603:10b6:805:cf::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.11; Wed, 12 Jan 2022 10:30:30 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::7de4:731c:cee2:49c2]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::7de4:731c:cee2:49c2%3]) with mapi id 15.20.4888.010; Wed, 12 Jan 2022 10:30:30 +0000 From: "Ananyev, Konstantin" To: Akhil Goyal , "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: AQHYALPm5GZXp3/J5kytklOWiwFqV6xeCiiAgAArBACAAQZioA== Date: Wed, 12 Jan 2022 10:30:29 +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-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b96afbf9-6df0-4410-359a-08d9d5b68e7c x-ms-traffictypediagnostic: SN6PR11MB3520:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: O+FqIv+Ce3buP6EhJjSOc/oXBnR3Yk/HPicSvnmP3QdcOzVXaT44qbD3AaBhw8/RP7e3RKzlUTTi4FWYgv1gIwotmwPpC6X4CqqKAwzbEjeRDGp2X/RDcql4hkDau1pPRkGplbiFc61qpCXH5De31H6qjQv/IThYC/CDb7iaR+BdWUTGdz4FTmiXKEApt6NK2oB0Kmuo/X+5U0x0NM8ZhCYsMbIVUQRrtIpqCZVYtOQkX4+NchjqarUcuoiTGDAa/0rFcYHkjLrLFg1mDslJq2SSUAu8htvD/0mnPAwu5FBm0fW1neOMlo2Xjz4NDt+49Mr9v8GrDg/mvZUZiwsUOZt02PBRDS2rEYGBliQBk/D6eZRo28YbXbSgOXtlHQF7GZeae3Fh61cwTJ9RiK+F8u8UiMIshUw87LM5fwcOvdv8g82YH5P0iNTZWm2eoLvWmbnB6BDFQNtRSarIhMMPWxD+S4kWUcD9c3qRD/f8YmZRJMaKOPOlhZ/Mt86PTZNjeKOvKgokkSZFOJfsjoJrsxrGXYiqOiCz2jpZytoLha0Soj7pCPDxntxwC2H5g1FbIw09jcGcp6Vn/ZZs21LKXUok5SdqVUW94/5FRfXrg6y4xS7nn0gcF4rQgrT9K/NjcVNQ+0TNSv0AWEhYagKFrfDwhGANcU/sXDLzOIMTIulI7qP3D8+Hlmb5CyQ/YhAS6WLclI7Xaq8NfyQKd9tVlQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(76116006)(66476007)(8676002)(71200400001)(66556008)(186003)(64756008)(38070700005)(122000001)(86362001)(55016003)(2906002)(107886003)(52536014)(83380400001)(9686003)(26005)(82960400001)(4326008)(33656002)(5660300002)(66446008)(508600001)(316002)(7696005)(6506007)(66946007)(38100700002)(8936002)(54906003)(110136005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qdK2h8+UE3PIFiJJfrLkTdUdWlya+rWkr2HwI74EUOrsoPelPDItPdy88eT7?= =?us-ascii?Q?g4UaSQfVXGu6ilLgEH4waZyrQfzbDen2Yxhwc7dKCZcam113WcdDKIZIkcXD?= =?us-ascii?Q?ATbfCay7f0poQl53keqKFi0+kH8buUJ1i2Yzj5q/hmmla2LtkbohpoiRHZdp?= =?us-ascii?Q?gh8zASXq3XYVkCO67RsyQBvmbxEP901wOEsK9G98ZR+DkBoNAIqFYKoEWNhR?= =?us-ascii?Q?EkpLQ2zOwySoJaAMMdcct/PQX1bHedJWbBcjqCVtJutuQiK6NAYia+XEE47J?= =?us-ascii?Q?5xyfNPz5eKjK1wG8VOXZMExI99wA5DiW7W5ZU8GK4dIHeLvPGpnguwFIbB2z?= =?us-ascii?Q?sNLoCA3sDTINQdvRVrlkyiUp0kZ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?Q?8+kP8lKYVux+SERMMKOZpl5GSp2coxAvi8V26g2awApPtpzLSyzp8d0oVurc?= =?us-ascii?Q?P8W/fze42kopZdMx0eZHf0hvmJGrj/TeHkwhp2f7blQaO5WoJaDNg/t5d9Ut?= =?us-ascii?Q?j0cfD/wSklIsjm3mmLZHB3fOY8fInYXqQpwgEG+IV0/dzBAyFoACe6zJFeza?= =?us-ascii?Q?J1H96EQFUUHqd9tdkhROKIn4BNMsgPfJBCwCdawLjJqm58y3RGKgiHG13MOn?= =?us-ascii?Q?zp+vB3zTACrMoiAnWF1Vq88VxOu3W6dlk2SD2viFaPxqDobbfP0W3MWl+dli?= =?us-ascii?Q?O1arMOneyKtcsexoNreIeQSKGK4nZYfME2wCfAlQB69p21plNV28qOzroxfQ?= =?us-ascii?Q?YpT/oJXhtXFHwkV6PyRG1mgBqaoX1EIJ+DWOizRPbTDf7PmtVRzwobfxfTms?= =?us-ascii?Q?2n3VIg=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b96afbf9-6df0-4410-359a-08d9d5b68e7c X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jan 2022 10:30:29.9811 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NTMA7CAhX1xVW3yE//Pr2dghQVel1XDnDVOZzQLha8Y9Sj/K699frUrtzsZ0j9tVZYu/ts83bg46N0TDMAsOMo3Fc64n23Bohyao7CCDbgE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3520 X-OriginatorOrg: intel.com 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 > > > > > Hardware IP reassembly may be incomplete for multiple reasons like > > > 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 for t= hat > > case. >=20 > I have not looked into using dynflag. Will explore if it can be used. >=20 >=20 > > > > > > +/** > > > + * In case of IP reassembly offload failure, ol_flags in mbuf will b= e set > > > + * with RTE_MBUF_F_RX_IPREASSEMBLY_INCOMPLETE and packets will be > > returned > > > + * without alteration. The application can retrieve the attached fra= gments > > > + * using mbuf dynamic field. > > > + */ > > > +typedef struct { > > > + /** > > > + * Next fragment packet. Application should fetch dynamic field of > > > + * each fragment until a NULL is received and nb_frags is 0. > > > + */ > > > + struct rte_mbuf *next_frag; > > > + /** Time spent(in ms) by HW in waiting for further fragments. */ > > > + uint16_t time_spent; > > > + /** Number of more fragments attached in mbuf dynamic fields. */ > > > + uint16_t nb_frags; > > > +} rte_eth_ip_reass_dynfield_t; > > > > > > Looks like a bit of overkill to me: > > We do already have 'next' and 'nb_frags' fields inside mbuf, > > why can't they be used here? Why a separate ones are necessary? > > > The next and nb_frags in mbuf is for segmented buffers and not IP fragmen= ts. > But here we will have separate mbufs in each dynfield denoting each of th= e > fragments which may have further segmented buffers. Makes sense, thanks for explanation. Though in that case just 'struct rte_mbuf *next_frag' might be enough (user will walk though the list till mbuf->next_frag !=3D NULL)? The reason I am asking: current sizeof(rte_eth_ip_reass_dynfield_t) is 16B, which is quite a lot for mbuf, especially considering that it has to be con= tinuous 16B. Making it smaller (8B) or even splitting into 2 fileds (8+4) will give it m= ore chances to coexist with other dynfields.=20