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 4F401A00C5; Wed, 3 Aug 2022 17:34:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA0FB40A7E; Wed, 3 Aug 2022 17:34:18 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id EC26C40141 for ; Wed, 3 Aug 2022 17:34:17 +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 2738xXw2012698; Wed, 3 Aug 2022 08:34:13 -0700 Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2046.outbound.protection.outlook.com [104.47.56.46]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3hqp04hh5n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Aug 2022 08:34:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g/eIqOCTcoLMvbAng06qB4w3tJElHh7PykOW8ZqKOmXTOnqHtC+h4lA/ZXNoDsMh3YSabiVhlHzLfcXItK9FRTVjX8GthHIFNFXsfcXrKOJW4/NSo2tpLYqoz6i2okCeQH4xeltQS6C4RIsgNhybTeRdOukxc8K0N9VOdSlject7Pw++zyQXUjsCY9XSkyyLmDDw9LS+it72lQOeO3Sk9F1b7JxoZUo0y7T/DOzCESkiRM4MamYXZG+J7vL980t6McaSiME3XcSEohVBioM+IwKDI1ZP1VPBtrVYyqvZYrzZ9nG6nPIgJfm+qlElNv4CPKVo6YUKUVUZoSgcy89JHA== 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=rctCuWf4kwpluirqlTiZyiLN71lmhA4OoMRG2Vnn/BE=; b=GCxo13fJ0iMom+jJnfnQOp6We9yZneZD/zqRvBikWumc4Me5ZBQc0EhFAb6QAuggKNG4w6E4mtWCEQGGVOQFU7CPuudhY+UMdKT3uqllrTZPjp5s8vhepEgrytJLe44Se+rOxJrhkHY/o3591myHibGcUsLuLAzjBQwDYJnCYXTa5F84we3drn6bcnUsuvYLpHP0ODGiVOVu9szeveMXCYV70wo7OQc8bL3RGMe+85AzvEmrJGcsgSyfhlwh9ZCEiTL9zgto8tA0i3ykA7GJmIredLxtwlKpv57IMaz5cdA9XQCZojHhMP9gxNau8mm3F2K/1ETus74qCt8GdSD1xA== 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=rctCuWf4kwpluirqlTiZyiLN71lmhA4OoMRG2Vnn/BE=; b=KousNlNvgoXO8X/VWyMAGBzg3zUHgMRzG7g05aa2rUlY1swHzOuoVmonf7GV/zdD7em8BtneKYVUO0+0UKsNdxdno3eTJYVTmBhPqTC+4H+dE0GbbYYCsKYgEBuyVe7ynryUT7pz8Benx+cxvHlrresRnJjA/GQhfUiANGKdejw= Received: from PH0PR18MB4425.namprd18.prod.outlook.com (2603:10b6:510:ef::13) by CO6PR18MB3811.namprd18.prod.outlook.com (2603:10b6:5:353::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.14; Wed, 3 Aug 2022 15:34:09 +0000 Received: from PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::55ab:194a:7166:f859]) by PH0PR18MB4425.namprd18.prod.outlook.com ([fe80::55ab:194a:7166:f859%5]) with mapi id 15.20.5504.014; Wed, 3 Aug 2022 15:34:09 +0000 From: Shijith Thotton To: Bruce Richardson , =?iso-8859-1?Q?Morten_Br=F8rup?= CC: "stephen@networkplumber.org" , "olivier.matz@6wind.com" , "dev@dpdk.org" , Jerin Jacob Kollanukkaran , "thomas@monjalon.net" , Honnappa Nagarahalli 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: AQHYjUWFyypxTA6FKUuYCr+jH6nAx61sQyWAgAH/L4CALuanMA== Date: Wed, 3 Aug 2022 15:34:08 +0000 Message-ID: References: <20220630094538.5b27d0c6@hermes.local> <20220701122434.1887783-1-sthotton@marvell.com> <98CBD80474FA8B44BF855DF32C47DC35D871A4@smartserver.smartshare.dk> 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: 298d55a7-183a-4b3c-80db-08da75659b9f x-ms-traffictypediagnostic: CO6PR18MB3811:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: BfA9LddUQMnr8pXJP7gKvvfmxDu1Q9y1wPwldFnMUfCMwOKZwiABhiRJIrH2ePGm03zDws1PD5T08GN68X9ZNM2e3ZlLiownLZMNBhynLmfRrYH2HeExeBodZRjh1BLSjmcT2i4p2rxRN07ZwLxCmXhG00Je3UIKBVxgXFNzWV9Dr/7/DNz28e7ub6Nzgsa3NdM/Qun4T5XKyAqe0ZYOs2w9sZyJ3zjCMvEeOIuavMhfbbCIfAtaqHbUKvorsFYb9cF5nwCTtE72r3nvVxTmqWZyzpXZPBs6eyT8nm47TsARUXF2dt+d20Roeu3kuqCdAbBICJQnzWG3mj9d8IPOYkdS2wwpaqf7/u07YM9IICKnaX1qZgJJ9cuyuk+leEiCo2rJFJ8fTNiVWant0KRJOjsSD6Oxt+nDzrMPqERPyRbXk8EuVdwaAIEZ9HReiULxmuAgLIENzyZzL8yXDtGs9yl1yffVQjx1YoTfOSGic69XPBybrCSJrNgpLEwdRgbIu/eMURXr/V9701ZrEgJ5YYfqBfewFjo6E1ptJDdcB1xVl7HTMCtUOjpdXcooCfikGSCQAuwHOF0GLSYwTT6jR/qkdZcpD+XNmALtdC6K5ulesO88dwmcvCP/zNytI7hp7JfEH/3k2D9qqyAmtVDtzBSjAhIMTg8KzWSb5zWB9SQ97CNmZOO0lJ6v4Ph9CJavjcBH/XKe2pOa/KKvc50C1FmZWbNJ2q6bhpTTk+dxnNTBRc3gWLcD4q0Qx7huHenYvwLfQzFWaEujv3zVwnKZb3jzP0m16mtmDGIk6z2eX83mBoDmOVfCAXRRow6+FYze 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)(376002)(396003)(136003)(39860400002)(366004)(346002)(38070700005)(9686003)(41300700001)(5660300002)(122000001)(55016003)(33656002)(26005)(186003)(2906002)(6506007)(83380400001)(7696005)(71200400001)(76116006)(8676002)(66556008)(66476007)(66946007)(64756008)(4326008)(316002)(66446008)(478600001)(110136005)(54906003)(86362001)(8936002)(38100700002)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?3AguupxkEeTO3x1BAjHvJ7xUGdpWM/IdvOg5UiLIsp5qQEmgVdo8wRL/L4?= =?iso-8859-1?Q?dejmo1xlh7M8t4XpbXlbiLWKjROIu0ipr/RCFVx4B3bBlPN67QKaIx0Obs?= =?iso-8859-1?Q?3Tfd8/WwlCIhX45JxTNPUSIZI64l2wClIGYbegfn90WJAHG596cSOyI344?= =?iso-8859-1?Q?tDbb3BWf27LQM9driNXHQMDtTQMQE390R/jnaOLhpJRxQDK3gzweeDmjfm?= =?iso-8859-1?Q?WWeTg9S/I+f/XrN8AZLw8SIW0sp2l3Mx620AuoQhRfzvZ2lT+l1Ash5wcp?= =?iso-8859-1?Q?Scr79bicDcbinNwtI92Vr3XAq0jS9wtemfkPnX3n3mSkQc1K8Q0vygWlwB?= =?iso-8859-1?Q?/x161qewiISiy3DNNbFXsh2I3q+b+/M9IPgZ9Tg5D4CDsqrd0lx4GC3MGw?= =?iso-8859-1?Q?X3fkFxnox4X7JgHgsTYgiuxKwOlE/EbKtnWiUWlUfiv3I118/0sgVIXX7R?= =?iso-8859-1?Q?RAHveLgQ4sLwKxICmkmQINq2NkiySewPscgHQpEedHujxy4zS1okKp2Dif?= =?iso-8859-1?Q?DDrjls4cisiVsHtN32hbaiWlArVVMscmusho6Nv9yfudDxb6TX77oDPsSq?= =?iso-8859-1?Q?h3tmITfZbqijFANcwm8fDlB2Z3bqTyrPI9tJ6Zwd3lPDJCfRCMxjE1gvxa?= =?iso-8859-1?Q?a+/yVcKcdZevkkan4/SkzNt8oKBE2PrK75IXEKAukXuKgB22m0DMB5h5eJ?= =?iso-8859-1?Q?OGjk1EtaBwW5v8AWciekAGflLkFh9KwxORDieBK+n91qxEQp22W7dBM9he?= =?iso-8859-1?Q?pzGBnXweFORixuvxHnVB53hS88dfprvr85qv0Pt0ul6JzMjbxrwX332ak3?= =?iso-8859-1?Q?ia1WocduG2/dO4PQrY2D3fVBty+DTdoaLXV19O+Taa8ydacdSfgVIWhh1P?= =?iso-8859-1?Q?kyCQX6hJtmPfSGhqtUFR4AbYPuQIeFfgXoa6VHuBdnUGl7tcNGgbtdvRUY?= =?iso-8859-1?Q?SO9PRBKQi2JGu3CpPDcpuan4bQ10PebCXYtt9JWdJdK5yMV1g4pUStAGGy?= =?iso-8859-1?Q?zjLSDGuok7ghW+nhkbVgiwnT1fCBCn+idQxo7Xe8nTk2d0+oGJC3fzp0y3?= =?iso-8859-1?Q?LQJ0a/YC2YVkrZcQcAVjIxnIyJ7xsbfdNMor0mvnckvrUA/cq4riXmI7Ag?= =?iso-8859-1?Q?gca8BpAkmqAyoED/nalmvG0LAcjs9GOtpdMCfpKVecNQ8hYElyEwkC2lvL?= =?iso-8859-1?Q?66O/j3cmGjPcTJA0eJQ0l/390IJr6a4fUgk3IOztCMWsDZUx9oOoUq/8+y?= =?iso-8859-1?Q?YkAmJHX2tvtf9ZwvY52hwDgZPYw/VuVvp0hNqjAXRX5RjiSfvsvRAtSKS/?= =?iso-8859-1?Q?49UOShpaADU4I42KyL3KRMB6xdvNKVMGY8qZx4EWnc2Wm0KURP+kA00mjU?= =?iso-8859-1?Q?N9jL9X6xxG1uZJuH8Ujxz+4CJJHRqIURsvSCaz1d6qaG214/TJts7U5RcV?= =?iso-8859-1?Q?pa260jpxWChhIcz5mpCNB4ViC9D5RFcCmHzLGxLgImlLyDEXXnRvfyVxBe?= =?iso-8859-1?Q?0CZjVTp6G95wFZNu/7cCN6K+v0umo88khKmcsAT85hLxCaPvaLE/xmo6Or?= =?iso-8859-1?Q?6sVFDrbkCkmqEVLU9dG345he1KRr5TJkGD+74QuINWENMABDjcgIRowiAH?= =?iso-8859-1?Q?DAanbRDa4OQUA27JX7ojTuatU4nwaO4NxV?= Content-Type: text/plain; charset="iso-8859-1" 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: 298d55a7-183a-4b3c-80db-08da75659b9f X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Aug 2022 15:34:08.9102 (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: IuU2R6aotCoMq6U8cpIIpeb5U15p2sgvrGV/HyD56JyBpuFD1+n4OEJWPCweulR/KcaC6jyWwnLdTHLADhw+NQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR18MB3811 X-Proofpoint-GUID: Vx4Vk7nvsWpjogkucDFxuyWpBWTkbw5_ X-Proofpoint-ORIG-GUID: Vx4Vk7nvsWpjogkucDFxuyWpBWTkbw5_ 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-08-03_03,2022-08-02_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 Hi Bruce, >> > >> If all devices are configured to run in IOVA mode as VA, physical >> > >> address field of mbuf (buf_iova) won't be used. >> >> Will some of the hardware vendors please comment on this: Has IOVA VA mo= de >become common over time, or is it still an exotic bleeding edge feature? >> >> If it has become common, we should let DPDK evolve accordingly, and cons= ider >PA (non-VA) mode legacy, treating it as such. Don't get stuck in the past. >> > >IOVA as VA mode is indeed common and we are constantly encouraging users t= o >switch to using vfio to try and take advantage of this. > >However, in my experience IOVA as PA is still very, very common too. We >cannot drop support for this mode just yet, unfortunately. > >> > >> In such cases, >> > buf_iova >> > >> 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 >> > the >> > >> mbuf that can use dynfield2. >> > >> >> > >> Signed-off-by: Shijith Thotton >> > > >> > > This seems like a complex and potentially error prone way to do this= . >> >> Perhaps this optimization should be a compile time option instead? >> > >It could indeed be, and probably could be done very safely, in that we cou= ld >mark as disabled all drivers when the mode is enabled for a build. >Thereafter, drivers could be marked as VA-only safe as they are updated as >necessary, i.e. use the build system to enforce that only drivers known to >work with the mode are built when the mode is enabled. > I will prepare a patch to enable VA-only build. >That said, verifying all drivers to work with this mode is a decent effort= . >Do we have indications of the perf benefit we would get from doing this fo= r >some real-world app? > =20