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 1950CA034D; Wed, 12 Jan 2022 11:59:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F08E426EB; Wed, 12 Jan 2022 11:59:50 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 8358440040 for ; Wed, 12 Jan 2022 11:59:49 +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 20C5SOCi015969; Wed, 12 Jan 2022 02:59:48 -0800 Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2177.outbound.protection.outlook.com [104.47.56.177]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3dh8nm4k1a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 12 Jan 2022 02:59:48 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GVM8EnOPZUPUqhIAtXbsRNySOqrp3af7iMnRmouWPISXPyJrIKoMWmFqSmoni46uM655/Z2yq4rQKYY1t96pFOsEOLo4DlNWPsho9B1Jjpd0A64rt8c2F0t19siIywCcZSVJyf7OgJknQ0N1vCr76/5AKy814xamC0UTJqM6ykbggRF4IHVljLPUelgtnwrixQ2ABGe19Y5ux6Bkw90Itn5BstDtuHwAepL/2KEkLhqP3TyZVkmVn/gjhNts4xYHTH68GKXByNcKKLMmcL6Tn9dcGATT0wUFobJffHysoPpBEeKRAbb7o6sHsDpdy9pFLQY5moAYts6Td/tnSQjEGg== 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=YAmnhEeZ1g20wYZrDoeRx9Vn5AsiGK0AMVpcmLa7XwY=; b=a05Qcy/UCSA+xmwYRA4h7N8ezvVQ1tGlQvl56MtaIGF0gJckHI1SZjQ+H/X86k55AJwzjGhOwdQmLNkrtATPP0VtrtYJHUBGvevwB/02nb+T6aM8IeHkdkF7jVVNjYa15xBrHa4KFJ3sd+JBjeFhY59epNdWPxAO3UvRKuAnpMTj41GUV0LeNay48ElnYKAqBfvY6DR9DlVqRLh57r/JmUXjFK6ixuRE8nfSqpE/rZQBqmLnA+IUBDZ74jZjm6DCnyjr1Ou6OOPzJqxosArMdQdLp3lUEYho8R0erS/n+R6Pkq15K8c13BGXJ4GXQ4IQe1GKEs0eOmD68rrUmiFO4w== 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=YAmnhEeZ1g20wYZrDoeRx9Vn5AsiGK0AMVpcmLa7XwY=; b=f3j0Pc0bg61wRnTeeFgM8dp0j57zvpnAL113mEkbqEP0s8Wgv46AJjmGLz3yCNI+5+NKqf3MjwG4vux82EW1CBjx64FDBc0CPayYy9nSauFDnyOLxOdqJ0IHFC7Jt7lMt8W4+NxEwIoIUqX/CMurcktVmQVy8i6pTzNrbC/wGKw= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by MW2PR18MB2315.namprd18.prod.outlook.com (2603:10b6:907:9::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.9; Wed, 12 Jan 2022 10:59:45 +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; Wed, 12 Jan 2022 10:59:45 +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: AQHYALPPmu8JVnwqYk2KffUFopwd36xeGRCAgAAa47CAAQl8gIAAA1lg Date: Wed, 12 Jan 2022 10:59:45 +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: 5513bd0d-72c1-42a8-ebdc-08d9d5baa4e0 x-ms-traffictypediagnostic: MW2PR18MB2315:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: S7dUvG2VScmpcReXywHUd3G3oruIB0iSpK/eCgQ5QZSibjAB8//f3wcmJwmmQz5icmrIwpQv/qUTUM8I8dPsUU6OyV0uFTsStLJFmFf10QusM1IN0SSgsfZ5koPrSl68VvcsjuSfTWf/fNrzmL1ZKKYibUZWYtYbimmhWhK4rzIYzpmMqnCoxxo9Z1h4NVofLHM3urNJ0zo7PnqoSvcjjakfcwU7cJZI9y8+Anf1AP7kN38PiDwEnQ3QqpUp1z7kmlBJOHPBlwfZcGqyx/ISYF2o1DCshliUke4LaHu+3XYTAjJxFCmqivS8WCYo3nOF3XF8yLfCXEsmiJVyx9QUmtk5JoQYunFg64imMEnmSgoJJX0BDiQW60/VQ0k5RUskC1iODWt3gzved70wf6jf0sPxDpcP/oG8e5HP+86mjI2KdEuLgTLUNr1LzVT6wl8kAoE+1d5jJvQxVyPbRYZnX/Y46sfhzC7JExfZ3ytdRohLhbWjmXcrs9KzKCFOBCGnI00uFtJYGpyKVio5mQEivK/HIQcj57aIm/UXlxAOwAs561WUHxZmvkBrK1jYYZKpXHUDOnB6Vjy6u+pqatlSLbgBK0xpery8GSq1Z+Nixjp+SR+Cs5gkNjVzjyAqZHJeZX9j79ki6XVhVIeYSbI1vro2djszXTsxSmI0fswI/WkOxWXvdGHfBCoJIA3zhtPHV0XfWz62rrOkbuWpfWiLGg== 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)(33656002)(4326008)(83380400001)(38070700005)(7416002)(86362001)(316002)(26005)(54906003)(2906002)(110136005)(6506007)(76116006)(66946007)(7696005)(5660300002)(66476007)(8676002)(8936002)(508600001)(66446008)(64756008)(66556008)(55016003)(38100700002)(52536014)(122000001)(71200400001)(9686003)(186003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XGOc8aGPtoraO4AMnXxqk2uGR6i1oB7NgVFD1auaeHJFzVV7+tfNzzK4+eGL?= =?us-ascii?Q?sLx6UjBGKqHR/vz2SRIsK8rOQMdeG1INawdUYi/SqoliW6WgJRQtSzqCGwKZ?= =?us-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x7NJ11kmL3I7Cmr51ITeFmo?= =?us-ascii?Q?FSYSAR60IdrpI6ZIxGCyWJFoq1+kk98wvIMUHp4FZd8IbbKSRz1pa0KB+PJc?= =?us-ascii?Q?4TGqSuhxT+DjfZpEVr+9ZMICd5IrqS+5abHaBtGNWVSFkRcIxaWHEpBIjQ5c?= =?us-ascii?Q?uv66S7zLIFmp9QylTEMYRFXAmzI1rq6IvSTgaW89OGsINix/5VsyoBcOOm8D?= =?us-ascii?Q?0NImU9kjPrniDsqnZnB8nfBk6piWRwKfL5VFX439cOOKzvPdVPTKBFoEJgBf?= =?us-ascii?Q?tq8WvCSjU0WS4jRII+wOT/XdEnoZRDlGVe9gUZ5viv9bNOCoozkjFr2ocBIV?= =?us-ascii?Q?h4R+gTZ6WNspWpNVuTXJLZ5YMMbq2UBOfgBmV6Trcf22WqJTwXKpSSPA3CDg?= =?us-ascii?Q?bKvaCbJXmD67HZCqCG7uAQa0Uk26cY9t6PEPxOXxvjIllGrwusepDJffw9Sn?= =?us-ascii?Q?2+Tnhwjd2/5Tdrpy4wmgdPBvAmazMiokr32mqREGW9OcNFdejRZkJ2yfzSKM?= =?us-ascii?Q?OICdEWWjvVmnPVEq35ExWFd2E8KXQf9RzITtT4wSDIqQwrg+rNKVGgNVeKC7?= =?us-ascii?Q?1ePdr/hKnZftwY8qinqCcJfbl6VXdBjlDwMncuoaxjxi3QNAk8YUepXOugO+?= =?us-ascii?Q?UuDaqv7/U8KmWDknXiHcp0s=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: 5513bd0d-72c1-42a8-ebdc-08d9d5baa4e0 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jan 2022 10:59:45.4598 (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: 3WDcGT+p/6ogpl7ntiCU5Sqn5PZNxK5pMKwdg+NKwJ5CdZjRbOeds94EBZDFId/nWrn91MtNgiaps/snwn/ESg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR18MB2315 X-Proofpoint-GUID: Nuk0copLwO95JP6AlBNMwPajBuU4e-mc X-Proofpoint-ORIG-GUID: Nuk0copLwO95JP6AlBNMwPajBuU4e-mc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-12_03,2022-01-11_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 > > > > > > > > +/** > > > > + * In case of IP reassembly offload failure, ol_flags in mbuf will= be set > > > > + * with RTE_MBUF_F_RX_IPREASSEMBLY_INCOMPLETE and packets will > be > > > returned > > > > + * without alteration. The application can retrieve the attached f= ragments > > > > + * using mbuf dynamic field. > > > > + */ > > > > +typedef struct { > > > > + /** > > > > + * Next fragment packet. Application should fetch dynamic field o= f > > > > + * 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 fragm= ents. > > But here we will have separate mbufs in each dynfield denoting each of = the > > fragments which may have further segmented buffers. >=20 > 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 16= B, > which is quite a lot for mbuf, especially considering that it has to be c= ontinuous > 16B. > Making it smaller (8B) or even splitting into 2 fileds (8+4) will give it= more > chances > to coexist with other dynfields. Even if we drop nb_frags, we will be left with uint16_t time_spent. Are you suggesting to use separate dynfield altogether for 2 bytes of time_= spent?