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 2263DA0032; Wed, 13 Jul 2022 09:40:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0AE1D4282D; Wed, 13 Jul 2022 09:40:50 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id D2B424069D for ; Wed, 13 Jul 2022 09:40:48 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26D2MGFc026753; Wed, 13 Jul 2022 00:38:45 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2177.outbound.protection.outlook.com [104.47.55.177]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3h9n6n0vev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Jul 2022 00:38:45 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZyFcsy9VItBqP/P3Y5mUGdKmck6sVzZ5upMTqZ0sqGlnTIpDiWt/WiCr48pK9NSDGB33KioD+KK2IoOvs+H5JsdjYb5k8fpD/e9I99gbztztQYldxM2j7yHFwcaLPwMzpcH1BCUtBJ8sCwnoFnZJgLTg8Zg/VuhpeCe53ruiHzs7wMb0a8EQlyJiV76dAXZ8i0ixZlVsxqJ1miEM7znWAccFTVTj0qlb5Ktp8TZ32Y3Uo2dqmp8yzs9TUXiMI6gHdBuKfsZPw9aiq8SVoucBwD75MHQjA2bUV2yiWdhKSi4YuCOwkN833+0D+fddNt/3IiuPbfebZh+s12DLPgk7GQ== 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=xiwE3WQwmXgH2rmclJoXT3v+hlNbCPKDJyS4AHQ0+vQ=; b=n/DxfXBMUzmI699jd6aVE41su4vUd1n0uXg7hCGP53+HkqoyunasV5Ud5Ls2FU8WzQu4/Bpx7IUOEuNLKxbbHe9+LuEpWHWMNxjlo6sgeJ+kWRNmJQ6gtjpRt6mZR3wzhz2TeE15Xvv6xqfhVLZpEvTHikkzWYHlntzuc9qmNeJK3XnVmo2ZrPFlItmjVQixmiCs7InE/TCgzlfaA24UyphMgfnLLtT3xyjlkhIJuE/NQOzY7exq48yFRWf2Vn6fPiqkum/XZP4lteceKs5YyOFhOSzVvOk2GjwUj3sB8t7HUicloCTdspSz8YhQ0+LqF2uolrP/UkK1yGW/fXub8w== 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=xiwE3WQwmXgH2rmclJoXT3v+hlNbCPKDJyS4AHQ0+vQ=; b=ioernyAlHcwuv3tRUNgXszHTC5wIiKO250aec8dbZmZhoEBUsSZnhYlSX46pcVWEdcFDaoOueyiCk/32fBEdj5CMk6D8QKlVN4KGa8ymiUDCvM5oApor1yLY2AdPyNpGKJ29gz+Ser6IKJ+ENeyYqQ7BtZdzyeiMXWdS6xkSvjI= Received: from CO6PR18MB3860.namprd18.prod.outlook.com (2603:10b6:5:34d::12) by BN9PR18MB4122.namprd18.prod.outlook.com (2603:10b6:408:133::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12; Wed, 13 Jul 2022 07:38:42 +0000 Received: from CO6PR18MB3860.namprd18.prod.outlook.com ([fe80::f5e4:a8db:557d:8c07]) by CO6PR18MB3860.namprd18.prod.outlook.com ([fe80::f5e4:a8db:557d:8c07%4]) with mapi id 15.20.5438.012; Wed, 13 Jul 2022 07:38:42 +0000 From: Sunil Kumar Kori To: "Xia, Chenbo" , Ray Kinsella CC: "dev@dpdk.org" , David Marchand Subject: RE: [PATCH 1/2] doc: announce region based device mapping support Thread-Topic: [PATCH 1/2] doc: announce region based device mapping support Thread-Index: AQHYivaAFwpfwrLHMUaraBHXTFPEG61y5zQAgAdy87CAAaQBAIAAAnVw Date: Wed, 13 Jul 2022 07:38:42 +0000 Message-ID: References: <20220628135339.2882914-1-skori@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: 649869e0-0a67-4354-faa7-08da64a2b600 x-ms-traffictypediagnostic: BN9PR18MB4122:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: u94rueWLsHGg+44XoHpOe3ewDgGLcrhoaIXju7wvo53X9y2MvaabY/89U2V8DDFNHU0TTWVA5TNwwVQd6Ri+CtI20nZAYih6z1ZAXoC0FpZ2hc4qbfXcy45Aj3TqOsRjh3xHiNAdPbLSuP1vhBuMYNAP1d4BUhUA/SYxgs7r1YWoHrwTh+GaQ+hcDKc2xBPZXlwN8gZ1e87X4hd3P7KzITWNGPcmF54QgVfXnIKimd/qtpeuEqE4arfTbXulurMu8HepB8hskk1fwstv25dTZi/d/KmA5sv465WuUxg5hBfGamUDI5JHmOxMzEWs42HAi4kgv8mzWvYDPeVJ0qGUgRJB/TDoK40bGNecO1M/+26FKdDXqIHR+wscpixXwE3f7EU1LhrpAXrSmH0WM0mSmDVrPIHid+08S3sEQ8R31Sao7e8t5env/a/ZyZVHVrZZ0ylfby+S8tySCzEQM/yWMzP0IFPM4D+WhCxwkOpFBifYJ8Wv7O7ZQz52cYDicaT634vbH6C1y3Ld7rtu4YMwnTGdzJF6PjTPmaBUsKYMB2TgRoMnQUS6D4yYDSW4x74lkCTV5E/ahnbxlxpB50orlVJPMNvQGUHaPK6w/j89wHLTD80ijjDyqrE23wSRp8z7YDZtHCRAZb6DQJGIfZNsD+vWcfRuUiVjPVgGQbHDMrdaxBPaPjfngpmRzq6ngLZqkRkGIvmxDBRBqcsVV30RB3p1YKsAbf23VcuuOVkSmXtIu4YVh5R9+/LFqw/Qns7XjZK6GmffbEZ+NpwAaRC6h+zz15YSmw3Gmjvgq924mpXBzQA6G9MQb5lQq4zQbklW x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB3860.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(366004)(39860400002)(376002)(136003)(396003)(346002)(110136005)(316002)(71200400001)(2906002)(41300700001)(54906003)(26005)(7696005)(6506007)(66476007)(66556008)(66946007)(76116006)(66446008)(8676002)(4326008)(64756008)(9686003)(53546011)(186003)(122000001)(38070700005)(86362001)(55016003)(83380400001)(8936002)(52536014)(478600001)(5660300002)(38100700002)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?6+QOXorjk9LUfXdPUB8FK/5Z3Bezu/I2TdTxWEAO0hyNfdnq8+1slKSi8m7k?= =?us-ascii?Q?bA+E+At9X6XTW7I+vR3M6JNAMTvk6G3AklLEd1Pc6YPikTTirWfyC2sO3Yd2?= =?us-ascii?Q?LvXqc3TX3PNFRsuoPoq9gfYCohbEVJmXm03i5PphXqwZJyyu2EeEgBfZefUM?= =?us-ascii?Q?nILXp/Zd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Lir1oxASaLFUF2?= =?us-ascii?Q?HtiRShsodFybiZJk5qNGRwQecvM8qZbKJcqsZA1bluqUa9MWxn4xujJcbhDz?= =?us-ascii?Q?tWWlyx8l4zbzn5U8KU1y0lhHplYwo9FHhsb8Wp1DICqDKRthP/pbvniapGlI?= =?us-ascii?Q?L5SSsw5efiemXHLfZ43d9gg3zKaFvao6r5bC97MvKZd9xuBqQL/dQfqVO1xG?= =?us-ascii?Q?9JEnS0fp14qXtxNl8XTVhV5J2UnP+oOhVCMJXljoSVJ+uQPbfB4zA18YR7wH?= =?us-ascii?Q?t6fY1JUQZRPMRfckRdayB1yhTxJBQ1DIGXgYpw7kEOjZ/NY014I2yqo60PGV?= =?us-ascii?Q?HO9AfGdz4Ffr7vscShcgz5kkAbP87SWNlklaLmqFunLFr4MXEKvKHAaXp+x3?= =?us-ascii?Q?ckLdkUwLwDHxBRA7c6GnNWLNl9Wt3J1LEwoah0Ii5mcKSwAegtWon21bvSk7?= =?us-ascii?Q?jE9MSpzImoRpj4fJJ1v614MxDodpXrkYhcII61L/Mnkd1VK8VGZgx5xgh5RP?= =?us-ascii?Q?6cZq9waKHj74ntP8srD5LRGeIe/FLVr9JoN+jymS?= 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: CO6PR18MB3860.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 649869e0-0a67-4354-faa7-08da64a2b600 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jul 2022 07:38:42.7187 (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: RfFyKAR5nlx+xMSmN9KdBrUBT1rlR+fMvahrBAflqyuR8SbPXc4qzviNJWPvvgd7KCoG2PGNIaQFSjOUMJYcnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR18MB4122 X-Proofpoint-ORIG-GUID: 6kYbUyIZTCq1sxFE_Z-Cki7oT7WGaMAN X-Proofpoint-GUID: 6kYbUyIZTCq1sxFE_Z-Cki7oT7WGaMAN 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-12_14,2022-07-13_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 Regards Sunil Kumar Kori > -----Original Message----- > From: Xia, Chenbo > Sent: Wednesday, July 13, 2022 12:58 PM > To: Sunil Kumar Kori ; Ray Kinsella > Cc: dev@dpdk.org; David Marchand > Subject: [EXT] RE: [PATCH 1/2] doc: announce region based device mapping > support >=20 > External Email >=20 > ---------------------------------------------------------------------- > Hi Sunil, >=20 > > -----Original Message----- > > From: Sunil Kumar Kori > > Sent: Wednesday, July 13, 2022 3:04 PM > > To: Xia, Chenbo ; Ray Kinsella > > Cc: dev@dpdk.org > > Subject: RE: [PATCH 1/2] doc: announce region based device mapping > > support > > > > Hi Chenbo, > > > > There are pci devices which has huge BAR memory but might not be used > > completely. > > Like PCIe device DDR memory is exposed over BAR with 32Gb or so. > > So in that case user might have a requirement to mmap only areas of > > its interest. > > Also avoid wasting of extra memory for each pages when kernel mmaps it. >=20 > This problem statement makes sense to me. About the solution, pls check > below. >=20 > > > > Yes, it is similar to sparse mmap in vfio but I didn't find any > > support in DPDK for sparse mmap. > > So I picked this approach but in either case, ABI change notification > > is needed, Right? >=20 > For ABI, David & I already mentioned in another email that your notice is= not > needed anymore. >=20 > What if you send the patchset to support sparse mmap in DPDK, to me, that > seems more generic. Could sparse mmap solve your problem? I will look into sparse mmap and analyze its feasibility to solve my proble= m. Will update accordingly.=20 Thanks Chenbo and David. >=20 > Thanks, > Chenbo >=20 > > > > Regards > > Sunil Kumar Kori > > > > > -----Original Message----- > > > From: Xia, Chenbo > > > Sent: Thursday, July 7, 2022 6:09 PM > > > To: Sunil Kumar Kori ; Ray Kinsella > > > > > > Cc: dev@dpdk.org > > > Subject: [EXT] RE: [PATCH 1/2] doc: announce region based device > > > mapping support > > > > > > External Email > > > > > > -------------------------------------------------------------------- > > > -- > > > Hi Sunil, > > > > > > > -----Original Message----- > > > > From: skori@marvell.com > > > > Sent: Tuesday, June 28, 2022 9:54 PM > > > > To: Ray Kinsella > > > > Cc: dev@dpdk.org; Sunil Kumar Kori > > > > Subject: [PATCH 1/2] doc: announce region based device mapping > > > > support > > > > > > > > From: Sunil Kumar Kori > > > > > > > > Adding region based device mapping support, which enables pci > > > > device to map only required memory region instead of mapping full > BAR. > > > > > > Why there will be such requirement to mmap only part of BAR when the > > > BAR can be fully mmapped. I thought you want to enable something > > > like sparse mmap feature in VFIO, but seems it's a feature that let > > > driver ask for > > specific > > > mmap option. Could you explain the use case here? > > > > > > Thanks, > > > Chenbo > > > > > > > > > > > Signed-off-by: Sunil Kumar Kori > > > > --- > > > > doc/guides/rel_notes/deprecation.rst | 13 +++++++++++++ > > > > 1 file changed, 13 insertions(+) > > > > > > > > diff --git a/doc/guides/rel_notes/deprecation.rst > > > > b/doc/guides/rel_notes/deprecation.rst > > > > index 4e5b23c53d..8800a3eb41 100644 > > > > --- a/doc/guides/rel_notes/deprecation.rst > > > > +++ b/doc/guides/rel_notes/deprecation.rst > > > > @@ -125,3 +125,16 @@ Deprecation Notices > > > > applications should be updated to use the ``dmadev`` library > > instead, > > > > with the underlying HW-functionality being provided by the > > > > ``ioat`` > > or > > > > ``idxd`` dma drivers > > > > + > > > > +* pci: Update ``rte_pci_device`` and ``rte_pci_driver`` to add > > > > +region > > > > based > > > > + memory mapping support. There could be a requirement to mmap > > > > + specific > > > > memory > > > > + region only. Using this mechanism, pci device can be mapped for > > > > + a given BAR at a given offset of given size. > > > > + > > > > + ``rte_pci_device`` will be added with following field > > > > + ``regions[PCI_MAX_RESOURCE][PCI_MAX_REGION_PER_RESOURCE];``. > > > This > > > > + field > > > > will > > > > + specify the regions which are mapped for a given BAR. > > > > + > > > > + ``rte_pci_driver`` will be added with ``rte_pci_region_map > > > > + *regions`` > > > > and > > > > + ``valid_bars[PCI_MAX_RESOURCE]``. Using these fields, driver > > > > + can > > > > propagate > > > > + its region information which are required to be mmap. > > > > -- > > > > 2.25.1