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 9E74DA00C4; Fri, 1 Jul 2022 14:01:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3AC8E4069D; Fri, 1 Jul 2022 14:01:48 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 457D240150 for ; Fri, 1 Jul 2022 14:01:47 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2611VY2Y012600; Fri, 1 Jul 2022 05:01:44 -0700 Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2041.outbound.protection.outlook.com [104.47.66.41]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3h1akbnap0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Jul 2022 05:01:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aROH5gRDqUxKakjFwdaUuGG4eYXmRHmzDpzf4ZPKTPusc2UGbXdIoVt6I+5WOvTK1kTpQSALVkRFZ3avsrHaKHxaydFf9bq2j5ilG3/7FI0ba+HCda6gn8GPSWyxwNfXUSdqBz/AFxsyj1YrQLO9jOwa0TekyRW5nz/cuP/kPh1acHcK9O71KupL2hEkzAhWAjBQAYm3VvwoRl83K+DROFQ1ELlDy6nrY7GeKWZ0v3tOFND00BsH6HemIQhYKBKbSAplP1Oy8ateBJ7NrEA3JnTsiKEBHrDQMqGX2SSSuJYCpmuSBVae+cbME5jZB0Vl990qKrcf/+nOyQLTiQacmw== 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=BkWHiQEZ/9WJMIHimoQ+pCzewCKZN4moLQoBeHVleyI=; b=A2PNKid5iz8cjEimWczt/a0ibtUfu1TV18B4iaBDOuC5T7bxwp3iVBn0++71NaQ//9VvjwvRhiLKXBMDn/PalCPjKPcdNv/QTX5YePOfsTW8T8edStDYqKsGxmYYkMsErQGsXU7sNYrTj0RTAwfCCnfLbjFilTWN0SH/iovu76XBII4QiJy0stqPZ72K+edrs3eogBkykcJuhmqpM07eWda7h6R+3vizIhXqCv+kQqTcOX3VYwgnvaJycX5yeIXm7bRk0g2BwZs1P40XQmSF8OokCtsa1lyVRZ341wxJhCE29ZYQtA2MQ74x9FBQBFBeKLdK1cJI88apih2lkPIB8A== 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=BkWHiQEZ/9WJMIHimoQ+pCzewCKZN4moLQoBeHVleyI=; b=Kg1TEABvGNUIVUUvdibln2Iy7Lbyy2l5xQGYH4QcfUdiXO8SNqHpvXsYkJHPJv39UI5JqlNjeO1MP5i25ntvitu3pphtGXUosU5ykbHqUvFvZ6Vp3eHFy+h+y5SzF7Fo7WxCda/GlBWUHZl+nEtSiulgFSN3HZJHt8hTJMZz748= Received: from PH0PR18MB4425.namprd18.prod.outlook.com (2603:10b6:510:ef::13) by CY4PR18MB1190.namprd18.prod.outlook.com (2603:10b6:903:110::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15; Fri, 1 Jul 2022 12:01:41 +0000 Received: from PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::6974:2d07:35d2:5f32]) by PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::6974:2d07:35d2:5f32%7]) with mapi id 15.20.5395.015; Fri, 1 Jul 2022 12:01:40 +0000 From: Shijith Thotton To: Olivier Matz , Bruce Richardson CC: Jerin Jacob Kollanukkaran , "thomas@monjalon.net" , "dev@dpdk.org" Subject: RE: [EXT] Re: [PATCH] mbuf: add mbuf physical address field to dynamic field Thread-Topic: [EXT] Re: [PATCH] mbuf: add mbuf physical address field to dynamic field Thread-Index: AQHYjJ4M4sg1x+yFTUumLGZfstFa+61oKyKAgAEbH4CAABMEEA== Date: Fri, 1 Jul 2022 12:01:40 +0000 Message-ID: References: <57d2ab7fff672716d37ba4078e2e3bb2db126607.1656605763.git.sthotton@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: 06a24948-527f-427c-7665-08da5b597559 x-ms-traffictypediagnostic: CY4PR18MB1190:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ymQU/F+OEAi0p3feVVu7hM1wTejaIHMiRhdjWvmhh4dVhxVa1tNQEsG5QJNfGcWuU1IohrNraZxUbe49853ybQGCS1+VU72DzZAwW+rayPx5+2EqkP6TcddTaBTQYkzipw8HvS7sbioCXiJ1fEOToBYm1RJ9Hv6+/3siTHuZ1YdC84osthkFNPBTTwOsZNPFDLqjsctSKX6m7UeeRJ0D7HXVa0751+2b/5KTMhb2h92r9JbtlHhJkEFdJgg7a9iDP7ThvikkYv5pF3Xtp/6gWdpCB6Glf9nInyLTHrx2ri01n6KrsCuZpamzEkarSGPrreYOgdZsOGBbUuyjl3fVF5FtaoJvjjh1PDtesEC/NqqpWP/C1k1o9xJcjfOrpjnVnBUtA+oBtVRW1jr4xbYFBk0DDzTEoPE5ja0PFWXqh+5uhNafu+coYd62NglcjgRDohjKUcsbh5H/klybj3RkP1B/AXhZnK0WoH+ylYRP8femvpfHI6dkuZjFeCdP1TpXDOUj0FOyqZ3QDYpByRDFTJSk21X5BXXpCAWqQ+amCKIaMSnJVIfv9CEOHALJPgWHg8M/XujvGypSSMK0pVz4qVRbpW+ovHfHs8oAayTWiO4mUv8JhB3qNuM10KseqA6mL0f4wVfffQforQY1X7Bb3X+qT2kHPQn3r/RgViaPfrENJh+QoipHlDaW7j0w5sTinSrItqMPoA2IChTkvO0iHHVVCa2JP+vDGu4YEgh6LKqnAiXb5VAu9m3ivRVkUBFLDJDTgxnPOHQTZGMdvnHOjUdbNBP0e07paLj64kip11n3SCOdFh2CHqYQw+SknyJo x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4425.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(366004)(376002)(346002)(396003)(136003)(39860400002)(66946007)(5660300002)(66446008)(66476007)(64756008)(66556008)(52536014)(4326008)(2906002)(8676002)(478600001)(8936002)(26005)(41300700001)(110136005)(9686003)(86362001)(76116006)(6506007)(7696005)(33656002)(71200400001)(316002)(55016003)(122000001)(38100700002)(186003)(38070700005)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?pCGqNjqFCLPudtusQBhpi1KPbw2L6rj+BB+QOaDVl6V4M9bE2VN/R3kThgyI?= =?us-ascii?Q?xMbUgUiaWSmvIXiEZtKQNcRRO9tG3ReVNAUkg7pUwF8JVKgY8oS4rBF6HD2C?= =?us-ascii?Q?uG9wsQZeSZ8Y6bCPXdkYzHtZZo7XnDgLeOPW+F5N6OKGs6HisUXaIdIYNS2k?= =?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1fpexCijAiZZw0e?= =?us-ascii?Q?bm6YXXFs9oQCzoGqNFWvO9A06O7x8KVzhJk9t0T1X5HHZJ2dlELQvS/8EMBq?= =?us-ascii?Q?+GxAmvBHS2xKymIwBmo6GPdf+fWKVwAojQOGklOAXMIewZzOmIL+TVnyUPcI?= =?us-ascii?Q?K+AzJN578cMNAXQFzWZ47DIMwHTrblotdxaRg1QxZotXOjqzpI2Oo7y9l3bV?= =?us-ascii?Q?t7wOb91LQrHSTzbixR25SPpg9dwJXg+3y1bUSAlXgnJT+gG1rSzYmPwlNmvK?= =?us-ascii?Q?uxr9LGZbM4z4cSysea4NtzFaksCuRXBfdTaZHDxQg5Psl8IodypZw0C3JQOe?= =?us-ascii?Q?Jg/G3qTA739uD5wt7OAanJ1FEuLDNQIS2c4o1RHQ8Bw4abji941PKhNt3Pp0?= =?us-ascii?Q?syy6Xu7R792utdNgBu5G1KOCCTUBWHJC6Q/tsQtrBEtA2/UUyJDsv5Oh3sAj?= =?us-ascii?Q?rsS8UAN4y4Jxoid/6nvAsChvQuiytJhW/6xXlIJtArRFffvcMi74hsQ2/bYJ?= =?us-ascii?Q?49J5aIst2YSQj/UQyzNGl+Mpdr2CrAc+Iih9m6CE?= 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: PH0PR18MB4425.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06a24948-527f-427c-7665-08da5b597559 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Jul 2022 12:01:40.4735 (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: +pZFwY6PZ3+3aA0dwLZ7srXeOownp7YwltJxPa1SC6z5r+Z5FPgaSTO6cY9M4Q6kVmjrcN/RDKAf1P5lG1asNw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR18MB1190 X-Proofpoint-GUID: c4PMYN1uD2dX6GuXkLFrn9a6bAsELh5b X-Proofpoint-ORIG-GUID: c4PMYN1uD2dX6GuXkLFrn9a6bAsELh5b X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-01_06,2022-06-28_01,2022-06-22_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 > >On Thu, Jun 30, 2022 at 05:55:21PM +0100, Bruce Richardson wrote: >> On Thu, Jun 30, 2022 at 09:55:16PM +0530, Shijith Thotton wrote: >> > If all devices are configured to run in IOVA mode as VA, physical >> > address field of mbuf (buf_iova) won't be used. In such cases, buf_iov= a >> > space is free to use as a dynamic field. So a new dynamic field member >> > (dynfield2) is added in mbuf structure to make use of that space. >> > >> > A new mbuf flag RTE_MBUF_F_DYNFIELD2 is introduced to help identify th= e >> > mbuf that can use dynfield2. >> > >> > Signed-off-by: Shijith Thotton >> > --- >> I disagree with this patch. The mbuf should always record the iova of th= e >> buffer directly, rather than forcing the drivers to query the EAL mode. >> This will likely also break all vector drivers right now, as they are >> sensitive to the mbuf layout and the position of the IOVA address in the >> buffer. > =20 Hi Bruce, The IOVA check should have been bus specific, instead of eal. The bus IOVA= mode will be VA, only if all devices on the bus has the flag RTE_PCI_DRV_NEED_IOVA_AS_VA. It was our thought process, but used wrong API= for the check. It should have avoided the issue which you mentioned above. >I have the same opinion than Stephen and Bruce. This field is widely used >in DPDK, I don't think it is a good idea to disable it if some conditions >are met. Hi Olivier,=20 I was under the assumption, buf_iova won't be used directly by the applicat= ion (only through wrapper). So that wrappers can check ol_flags before setting buf_iova.