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 CCCD8A0032; Wed, 13 Jul 2022 09:05:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F6254282D; Wed, 13 Jul 2022 09:05:42 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 255814282B for ; Wed, 13 Jul 2022 09:05:40 +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 26D3a7xA006812; Wed, 13 Jul 2022 00:03:37 -0700 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3h9d0majmu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Jul 2022 00:03:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Icc/PFr8ufGnByIFLMUN8jChlDUHPPmL+rTtBdtT4un9pxF6CFNvK05gsVIfAtFRpLBZ/cNZTqpTsAWHMf+MwBY7Z+KivyRr7bdzcnluG6p+WD8axmkYoCqoewt/N4+1sVCAEyVAWlomuTfdESj8hZcHojhSsIPpePJaHG1bJvUbtLjhMF/jSLlmQIKJDUTLFcW9AKOXM4P9YSvKZf6ht9sFZBqS07vHRX4PwGH5TVP+2NLCJfR/VgfauinSi7aWLBYB7pvS3a9ct7D7JMprarknw70dtHpmf3IleEG8tWiBF+JilH8cqi1lU6oQFZZZWL6jE6ztYhovMxoBni68GA== 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=k/yFOQQhE7Tr+xAdYxInUm7mbCFNqzY1IQBz7NCi00M=; b=FfNoLigcbD2rZI1DTf0YXnbEGw//OY62ClCtdmO4lq2LUfgl4jfYJg4JJHtDN5hX1ZKtQDrhQP7ZR3Q8v+yLjCzboFS2cyDIiCRuSFvZ6gUla8uydwkLK2sAbXJkp8fELiQY94dEv30LDSIljxqTTM01osMJUz/ksXYynFHLYoChwHoHV0K90ayW5/4B2gLdVok3bZ9Y5/ZQHNGodXR96wKSe+LgJBYTwQhDhLTsPLMGGStqz6xksioi3tAeCX9GNxzlAp7wHCknIXrHQWACQcNXO4lAeFipVLrLxd1Vhuq6c8O6PWkU44b+j6Pt37uU8tUH4v3bH1gDhkHY7T4WTw== 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=k/yFOQQhE7Tr+xAdYxInUm7mbCFNqzY1IQBz7NCi00M=; b=n5PCH9PX8gNct+W3VWov+OhwRUir6zsJQxfbjj1OoAeqXKEUX5tGVKly8fOVLiB0p/rGLTZ63Qtf6Rj+B29nK/3p0B3CUr5F/Izw/LaIOvkSxYHvYXwfcHLaczi6G0davKGmziZYXXEItmFffHiu6sAPp9W2NffTqcQ+0joxNGI= Received: from CO6PR18MB3860.namprd18.prod.outlook.com (2603:10b6:5:34d::12) by CO6PR18MB4433.namprd18.prod.outlook.com (2603:10b6:303:13b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.26; Wed, 13 Jul 2022 07:03:34 +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:03:34 +0000 From: Sunil Kumar Kori To: "Xia, Chenbo" , Ray Kinsella CC: "dev@dpdk.org" 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: AQHYivaAFwpfwrLHMUaraBHXTFPEG61y5zQAgAdy87A= Date: Wed, 13 Jul 2022 07:03:34 +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: 4f2bbf29-743d-4c14-aaa9-08da649dcd6a x-ms-traffictypediagnostic: CO6PR18MB4433:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ySes4O22GNOG+9qCBMPdcdDqW6doXTAPL9MB8X/czCzxh/dpyBXxOeGzTKYCyH792AOcO5R0KI9M7k7llF3nyjp4YxQXtrphVRdeJeErIg3TQjvdBTfVT+MKs9jnbLNh1yp6Hr9hR2GOM0LHeo2Nj76Q5T3kTo/rua6ncBUphpK46izN4Mvw/ny7JYUBEzkidx/0Th6qqNG55qOOk062aZYO0fgaUuv9KfJ9W+HT4W/zGqj5GSTRi0dmS4TPsGAREK42czh7H0eSqCdu/G+ALZeznU3gNFYmtZ7wXWR9H0x6OQJqn1A41bO9Nc0QcgxdIVzzAd2fo0pEz5YuiwG2KVn6XrLzh7L0xNMv2TqZbXWNcGj/AmWBqBgOiAsEVYzntTxzLR3sq4f6wW6xQCIkibbQj+btMsHVL1ois8zqnRpmNels81kQ9Zit303jYLH+YUMjWiTvnUFRsmOT5wtnNUX9s2iWw3S2FxhXdliv2L5NXHkzEjqr7ShnCYXShqOFMthYl0VSoIjX5okXOTnVHXcQXR/8Ww8Sw9xl86wopg7sGKrG3mM3UIFWshDdHYWKpEjfrkTSZ3JVWu94xAIvA+Haod5Cc/5Lie7/sFugq03ZP8WROfzWps4UHKmpIvP4oD56fhcOAw6xchGt4PXp4IWzJ5sh748mMzecB87zHHwP4AkNtKFazqP8KQe/z1pXAT3HYqCGT0MOzKz+ZCCRNF4xDpp7P2U2hx/yh+iYqkNJpOEQS2qHIGhphRQw63A0sS29PlVAnPwt1PttHBsvtAzO3hz3Ec9U/w2N8ZxNw2liqOYyPH4gNm8OpVGYVgyz 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)(346002)(136003)(396003)(376002)(39860400002)(366004)(478600001)(110136005)(83380400001)(86362001)(38070700005)(122000001)(71200400001)(7696005)(316002)(53546011)(41300700001)(6506007)(55016003)(76116006)(9686003)(66946007)(64756008)(33656002)(66446008)(66476007)(66556008)(8936002)(8676002)(2906002)(26005)(186003)(4326008)(5660300002)(52536014)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?EzJvE1oSURuQozByhAhT4vWqjhQOKhFwLay62iXEVhhjcokmUN6wc6fTyfUQ?= =?us-ascii?Q?+rxNqILW21ZYtAvtfnqZozsKi/5uUJFpRmtQaChq1Q+e+FRWhwrXldR/PhQv?= =?us-ascii?Q?xgOY4sO+Jm8DWafrR3m6P9o8ao2iF/HIz8WaHEkmMZBKFIno9C+ahyeWFHS5?= =?us-ascii?Q?aDOsiI2c00cNRa6E32lmbJM7lhedkI7rzOfmq162FRoQ7tL7twWCIv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LHJZq7GvYuEmsFZxtFnXlr+wkZN6tY?= =?us-ascii?Q?r/7JsnpkBwro9bDYpF/dZipwRGdT6MVWItO8lGcEc9kCcOgr4J9/y7xtTpVV?= =?us-ascii?Q?WE02GigHyRz9VvQpmBZ1dmni86vq69EJDIt7eOTy8TzNOxj5xZYhyz2YteAz?= =?us-ascii?Q?9xVAPd77ncQmSfiCyI4MpSHli6YNr+wX2TMzLgzlpJ2BRCkOViI4qBmT+MGi?= =?us-ascii?Q?J/1cPbPjBJWgcD9gn6RP/SG030GlR5CVxCF/2/egkLS6lA02EFUv4sS72yJX?= =?us-ascii?Q?IoXIygKxuIVeSbzRJnCNIuxVGMces4uQym/FmqUrPImwN3TURB67VM9m1jsW?= =?us-ascii?Q?+GJEoHINEB7DT8Bwl2Kj8Drway7R2P7bF8CWjjmm1I7c1nrXt5YVyi19LQZE?= =?us-ascii?Q?L6gIE+MZzpUPUKe0HuyQBE9Lo68so/UUtokNvCBD+Zzbqts+4arzmY2Nk53x?= =?us-ascii?Q?z9kRV+ZGWTQcL/MJHvQ=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: CO6PR18MB3860.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f2bbf29-743d-4c14-aaa9-08da649dcd6a X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jul 2022 07:03:34.4841 (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: 8z2z0nQoIQDl3CSLB0lfPiyUqCPtRfSfU8lPCJn7ipa10tv9mTTVfah8BvckebUihMEluzaEHQNr/KLr4m76uA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR18MB4433 X-Proofpoint-GUID: ZJvF1gVlOmzSDjY1rf8sBBPXyVvszFmF X-Proofpoint-ORIG-GUID: ZJvF1gVlOmzSDjY1rf8sBBPXyVvszFmF 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 Hi Chenbo, There are pci devices which has huge BAR memory but might not be used compl= etely. 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 int= erest. Also avoid wasting of extra memory for each pages when kernel mmaps it. Yes, it is similar to sparse mmap in vfio but I didn't find any support in = DPDK for sparse mmap.=20 So I picked this approach but in either case, ABI change notification is ne= eded, Right? 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 >=20 > External Email >=20 > ---------------------------------------------------------------------- > Hi Sunil, >=20 > > -----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. >=20 > 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 sp= ecific > mmap option. Could you explain the use case here? >=20 > Thanks, > Chenbo >=20 > > > > 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