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 1EFD2A0032; Wed, 13 Jul 2022 09:28:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0D38A4282B; Wed, 13 Jul 2022 09:28:01 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id D69484069D for ; Wed, 13 Jul 2022 09:27:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657697279; x=1689233279; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=r0izb3RZPTQkOHsbXeDOr7nMM4qIhewttJJ6SM5rsf0=; b=gqIssPT2aRNurtJN/XdpbRDNeQ7sYkErbgUUaW63bFpRWrwmWbZWd4iT ZLSh3CG+kHimbsFX2SV+F/+y/Uf5W+OIiDHP9K+1nVDLqge/dhuwUehSk JknSPrIX0nlVCRrOOoQMk+6dnXRbYLZ46C8qbjVX0XQfB5y4Ss8+joynp S694hmSAWBTAnWeKGkz9LO18oSOqH4jD5DxAgmcBFgXHaupCdrc+6TQHM 6xqpTmMfent+uRWZFOoYZITVD1FaO37tFI9SUSyXlOdmlKerMIjSDhHvN e2kQxMykHcPVs1xLdEpzZzIF/zwYpligy5XcolwmGjpSoEt59TYv+IyJE A==; X-IronPort-AV: E=McAfee;i="6400,9594,10406"; a="285880933" X-IronPort-AV: E=Sophos;i="5.92,267,1650956400"; d="scan'208";a="285880933" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2022 00:27:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,267,1650956400"; d="scan'208";a="685061999" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by FMSMGA003.fm.intel.com with ESMTP; 13 Jul 2022 00:27:46 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 13 Jul 2022 00:27:46 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 13 Jul 2022 00:27:46 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Wed, 13 Jul 2022 00:27:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fyfr0reYbN3f8dqG61/idPn21eFmxVsf/9AKd4H1XhfRUIA11vHi7ocQ8l7Lx3gyv80pz7CaXMdmthk9b3fzUZY6a5hyI/M398V+DkHWXeqJKjHV08bzwbjx1YaVC8qtrDhtaqBgop8BGFJjlFtlbkPGOijNMTHgswY0/xMOakCobuEHIEMlmrIr17zANVcct3SD0uZgOELuncfb6x6DPtAR8suSdRybRFgeJSenl+CO62XVHR9S/CrIsKLnwRZK2DUHUx0fgvZ/z3nhUw/O4obPgSVm5eAgXnqLezkn/4g89DbAn0qvILhNBl0FpwNgM0GMQCuTnufsd6DSvOS1sw== 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=A4QjsfUMP9sDyWh7R7/qV88lugKE64oiVEREEOydDJw=; b=SiIc+YjjGUE4pIYZn8YWjSz9UKS2ud9+OTSLyNk75llwaru/dFLuA9xaf+s6jgjBEbrR7LtYSNty71bi0Kq+bwDHP8/k9dpaWnVPFxnA/VccZo8kVRc1h5sVMpBjpN++HZmWrNhWc5jxwDNvdBRyk8v47msjgS37pr6iN6HoylyiFz8/E85Gt8YyZuD5QuuEyh/hloWNojE1MHJZdMNPvH+aDxQg+jBv31pz4iCYQQtEt6SoN9F3LmQStIJT1t9Wr4rHK9o7wbmjvnlaLVdhSkrDvJN/21h8Tv443j0q6ECXQW4wMQ14p9XPttzd0NDho+0z3LyDFcNoWN/aOMZdFA== 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 SN6PR11MB3504.namprd11.prod.outlook.com (2603:10b6:805:d0::17) by BYAPR11MB2743.namprd11.prod.outlook.com (2603:10b6:a02:c7::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.25; Wed, 13 Jul 2022 07:27:44 +0000 Received: from SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::54a0:2dbc:18b7:2aa9]) by SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::54a0:2dbc:18b7:2aa9%7]) with mapi id 15.20.5417.026; Wed, 13 Jul 2022 07:27:44 +0000 From: "Xia, Chenbo" To: Sunil Kumar Kori , 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: AQHYivbVUnO/SoGyzUmQFt8nfsio5q1y5hQQgAkRUwCAAARCAA== Date: Wed, 13 Jul 2022 07:27:44 +0000 Message-ID: References: <20220628135339.2882914-1-skori@marvell.com> In-Reply-To: Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: e12ec143-2868-42ac-cc5c-08da64a12d77 x-ms-traffictypediagnostic: BYAPR11MB2743:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dkt8mHB7OFJhLDyn9wOIShQZm6CKolT113+oLCz+zuUQUISxLJKgqwlNI6e08UxZVzr24TNBXH/U3IFNdtk7FQ7zYCLBzt2ozhIBvg0vPpd89A1h/m+MXEZPx9VaCOkdb/eTn8J0IC1s/K8Dzykl7qQWatKpVdA4rte98/LwJKZzECoq1KtZEL9AqypDLInsglGefE7eKA4FgJ6M9IGjT5UjBSIfZ4ccGGEDaCWYJNFraNDDSCiWgqnW5JOlay6Nw9OGy7fIPeBqnGJZ+pvHldj6QZCFHyF4vho+ZQnWAyCi78F2aXC4aGSCqwCqPKEAPrKNofT4CS8+S88BYEPQaxLIa4aW7hNB9o3ohTGSnygQjV20OgTHwc+deR5klFWt+la1QBL85epVfARssFAm9oEWK/CQjPfscsD4ZN8mCIvnROtkg9QkvC5PCXnskklMnCwShh7Z/wAjLobQA24FDlpXKk5WjXrHjgi/0CJCeonxY4krMMb2ZyyhIrM+Js+PIUM19vU1CwRJPz4LNzzdseN7eEVyrsRzzoDDVdwSimeGmY3Qcg+sSjvsSQru8NkugZOPSkxOiO0RuhE45sUE307feFvEqSYuKSgi2/3QuWWzbVkmDRoqG168/mPLMhsISJH9f22jsCR6ToDd4Lj9sw4oY37eFHwQIth8a/gTY8T6eGzdXaBxE3gDoSkV8oWV+sp5HbfgHoCm9q6APfX503o7AUGcDGTKY/n6GBoLXflTK2bZm+GBXyts+BBrF7g1aCBR9cko6Id5//ndqow2u3LSerGofDRUL9QMt/fbkEK3NFKW5e5MOXaEeDfckS+E x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3504.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(39860400002)(346002)(366004)(396003)(376002)(136003)(8676002)(53546011)(2906002)(64756008)(76116006)(86362001)(186003)(55016003)(66946007)(4326008)(7696005)(9686003)(6506007)(66556008)(66476007)(478600001)(82960400001)(26005)(71200400001)(66446008)(54906003)(38070700005)(110136005)(41300700001)(83380400001)(38100700002)(122000001)(33656002)(8936002)(5660300002)(52536014)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?+9kiGEwLf5Pyq63gRIaFvSoSTEqi4xF/XqmIzz7864Or9CknQhe4Q9BOLAvZ?= =?us-ascii?Q?05Hxb1sZdcuVopt24Hc/Qoaz/eyxpvEwChh56Vm+eGO+ES6PyIELcH7s3WWd?= =?us-ascii?Q?4sGiiANwqgTfVy455bSTTW7ad3oWYA0MYiEKiX+BeVJZ1oTTL3dBwJqjwCYo?= =?us-ascii?Q?3d0lKvnXY9KDPyNt3rpWZZ4S2ZTh4Z7eTarl7zDqDttXSLHoS+62K02anYts?= =?us-ascii?Q?u9Ho7+1dk1JDX2AFCP45LRRbcfaPcyFGjMquyCbeizA7QyLD3oIPPfnJ9AS+?= =?us-ascii?Q?B0+yr8IIH9iuPwmd3tA+7tPh74DKxMsv6ZfA0yy07/i/IUU7kbhnSKVHuIW3?= =?us-ascii?Q?R7PKBnAGyqDe7roYYTO9yapIS2wiivphhf7IJZezDizaHEkzvuKCkfDAgNdi?= =?us-ascii?Q?Zrbhzyb72qV/weHZ7kqL2HVoXUYOVVRxdGDkXbidc1rqCgzXs8rPnQRljDiN?= =?us-ascii?Q?0alHO3g9yAUGJjPX3ignLrD2+xgdj7+tmCpGyTxDNyT4iH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dzQGvMnhEBa735+USfiB983RHPBDhfg/BrxalSQPonrPQY?= =?us-ascii?Q?0HO0PnX0SE9AqvqzFIys3moY4rwiMesDtDAp8TY5k8V3rfQJRffded9wMela?= =?us-ascii?Q?ImSzvYYQr/GcwzceC5V6KpOzvYI+GkEPeMXKzTZ61BPTCFHkvmElpLxGAe71?= =?us-ascii?Q?5VcVGZgDJD4QPLNvkeqMthw/VnEt593yAmwmY8IQ?= 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: SN6PR11MB3504.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e12ec143-2868-42ac-cc5c-08da64a12d77 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jul 2022 07:27:44.1215 (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: BsiGuhFaiabPAXHItz9xISqFKfUjmkY3xuab1igWQEz1LNpOrkCqxFa5dwz7T2jaoMyYMR+7+K5w8k+6EXpapg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2743 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 Hi Sunil, > -----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 suppor= t >=20 > Hi Chenbo, >=20 > 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. This problem statement makes sense to me. About the solution, pls check bel= ow. >=20 > Yes, it is similar to sparse mmap in vfio but I didn't find any support i= n > DPDK for sparse mmap. > So I picked this approach but in either case, ABI change notification is > needed, Right? For ABI, David & I already mentioned in another email that your notice is n= ot needed anymore. What if you send the patchset to support sparse mmap in DPDK, to me, that s= eems more generic. Could sparse mmap solve your problem? Thanks, Chenbo >=20 > Regards > Sunil Kumar Kori >=20 > > -----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 mappin= g > > 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 suppor= t > > > > > > 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 BA= R > > can be fully mmapped. I thought you want to enable something like spars= e > > 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 regio= n > > > 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