From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00074.outbound.protection.outlook.com [40.107.0.74]) by dpdk.org (Postfix) with ESMTP id EE721201 for ; Mon, 15 Oct 2018 14:02:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j5IZ/LCXiV8j/cWxKke4VQKgkoQoqrE5UaAg69F35g4=; b=ATyGZHss1ul52lLK2hIIYafbfQ4xTr3T5lUy11s1SRVAMBlOD9DtY6LXjKYvAcZzAHcuPPD3ujz8B2tL9PuqX3FHFiPJIj0mIrFrVTUX1lFltyuut7qtNbVIpXMohB9Zskguqm+kOQLMQylFytgH+kwcpTLrqNg+ZPQvfadmXVg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from Tophie.ap.freescale.net (14.142.187.166) by DB7PR04MB4683.eurprd04.prod.outlook.com (2603:10a6:5:37::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.26; Mon, 15 Oct 2018 12:02:40 +0000 From: Shreyansh Jain To: thomas@monjalon.net Cc: ferruh.yigit@intel.com, anatoly.burakov@intel.com, pbhagavatula@caviumnetworks.com, dev@dpdk.org, Shreyansh Jain Date: Mon, 15 Oct 2018 17:31:51 +0530 Message-Id: <20181015120156.27793-1-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181015064202.20802-1-shreyansh.jain@nxp.com> References: <20181015064202.20802-1-shreyansh.jain@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BM1PR01CA0102.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::18) To DB7PR04MB4683.eurprd04.prod.outlook.com (2603:10a6:5:37::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 940e8d88-1bcf-4707-cda8-08d632961c12 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR04MB4683; X-Microsoft-Exchange-Diagnostics: 1; DB7PR04MB4683; 3:LGnT4TmDyynw6N01H5blAEZufD77mqeyowhCW6wH0gAuiSUGyBERZRcS5XjjYSBfiypcambOTFPlBU4dBQbbYmCTCZlYdn2uvXrmWtXEGlv+7R1pTX9x/3dbYjntU1Hn/aKcp8gR8nBrVAltzF3MH3pYhM3FU/Huf0AS8Mk7X6cPWVQOeZmlxSSQNic0RRAP32LXYgjtJiRRGqcCboWX7cQyk3hwAJpvlt4Kqydh4krpuDRa3zIYSbqh+jNZPZha; 25:n8C4+BHqJ37Brh7aVpFKN07G3cg4jo3PORhdnl3Mb/8ig/6Et+ZlNBd46dWcuzujca5DHd7AZi21CYLv4p7RWEof6gzd6yxPYk7BDw6HGhrreD7Uv/E8FqQur3bd2923s/vIOvaqn4oXA4fSH7r12IMmlywnSctiJr3HO0cI/GbOmho1GDQ3TaDtaE7b22lHG9zTETEfpv/t2Y2IsTrPInaYdNjg/BOx77KSSvhtW4tAyCxmsAPIluVAvw25lOx47Xd7xQbVkdw6DaItrAqtYsySPRXtaEwg01mfGqCaV0HVqz7RunMkOFkcn698xB5HVxvzVjlM4uDKFc6xHwc5im7GqXUoVONfZQxgSKv+VJ4=; 31:rgVqBWoHay4NzCJaDmPn34mYJpA4JYi/n90J6fVmJ3XsBFB3s0JWVUa5DNcNBMY+TZMt7P5o4eRcPTyNPmRByLYAkb//wDOeEPezcaL0g325GVeezAN4+QSBweiJh3JZeB9rDUc5ZpX0Tk0oP//ZLcvCGISLUwbXVarLAcK7KxwxtFd+/bYcXtbG2sDVFXcryqpo7RpNzCZ2HsdhvPATzggCeuYYzUAG0wvccLvCwjg= X-MS-TrafficTypeDiagnostic: DB7PR04MB4683: X-Microsoft-Exchange-Diagnostics: 1; DB7PR04MB4683; 20:3Zoe/SrnlER8CYRBghRNkCueDgi5oheEWi/t3xqmRwCUJI/VIgx1VyWdOxx048siyAeQ2EpQ3DQDgT7N1cAVxGteOLPU02pfRp7S6HrWqqzzlLTGu6EplMhSY3Rtd0AuP1w0SAFEWFSXEoSfFnNLvJB+8QSt81YuawT5vWfkr8sTZP9y5izB2LVSI4VoF8PEWYOOd/A0Y6RCPYSZ+Yfgnu8JgCzdsWn7muFSfALtEMAhbJSWP7aIPCyIGJKtARnhEzrGFKjbp99/Nqo9f5j7gZhCy5Nmt++pPYcZJynwenWjEL3r01VSRKZfJvevgKS6+pF2wCGXaFg/4ddrt76I/zrgv46g9lAxkf36tHbLYtvSE38kdLd6WAz9t9ExQjy7kzXIObFXCzvi8Izm3nNQHeSBQWy0niM+icIdwfu+BY0HDlYdWMAaOv0Y6vpLSWaQYwV5BiEpVr6W8TEo1DdWyeXCQI0sFVEJ1xsrrB2d+dNWcNZB8OoiEl2rLZlCtLWb; 4:TITohdHkc/B7j2S/mN1LNlt64cpfAdLuEYVJT/pu5p5yFGBaDVcuA9dWMb8puZyk8rcSxMU2hZway3zjlPJIc3bC7hAPrQz3A9MaHmA3MG2Pu8u6627u4A1msC0dx2lRWYnGWSezHOeOq0HgkhlrgOtmXVNXEcmm6XD3RZTJMGxKjV4mWCG8S9X6jKnNi0rBiheyg/zmopkWahBQpC2XWdasxVrdE/TBQ11t9EXGbp83wXjZwaXw8pG5VDIKvv5ag15z4XsmVmuRy/lsxVcMRo9lFWgd6lt/XuegCUE+Xq450j27QRxFeV4ELRJeGiYE8S2E3WOtvdvBGpaT8lG3v5/5V7wZM1VIa9aydC9MRXQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(211171220733660)(275809806118684); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(201708071742011)(7699051)(76991067); SRVR:DB7PR04MB4683; BCL:0; PCL:0; RULEID:; SRVR:DB7PR04MB4683; X-Forefront-PRVS: 0826B2F01B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(346002)(136003)(39860400002)(376002)(366004)(199004)(189003)(6666004)(68736007)(2361001)(50226002)(186003)(16526019)(26005)(106356001)(47776003)(305945005)(105586002)(316002)(14444005)(2351001)(66066001)(16586007)(4326008)(2906002)(97736004)(6916009)(36756003)(8676002)(5660300001)(8936002)(78486010)(81166006)(81156014)(1076002)(3846002)(575784001)(86362001)(6486002)(6116002)(1006002)(2616005)(53936002)(478600001)(51416003)(52116002)(55236004)(6506007)(386003)(76176011)(48376002)(446003)(11346002)(44832011)(956004)(50466002)(25786009)(6512007)(4743002)(476003)(486006)(7736002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR04MB4683; H:Tophie.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB7PR04MB4683; 23:1P/BZBjeyrzHn6bd6uNkoxAaAEPDWOBfxcWBOj8vw?= =?us-ascii?Q?5k/jdQyDdBZpFvYJoeUkaxuQPrXYBgPX0nZF63rkQYutlFkugqdziyCLDa8D?= =?us-ascii?Q?K8gDoQi6G/CnRywqK67+Ja/aZI3pYkSF5iI7yo//d+UV0Olryq8sbNJEthLx?= =?us-ascii?Q?HfBxwriTP3CgYmGaqpy2Z3bpE/1kN1U4k7aA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qosXPN/jf5s65WMrWM4m0NbxAMbI5Z0kUQesKeW1+kVeLlhrTDkTAQM5r+z8hIskn6fUOPIhiZ7QVNpRxYhio4zEPa3IKKkuwMT0/CbB9KMulUC1pUpnolrPR5/2ExQx2gnCTPKXEGzqiNeNFMWtmGqxb5Il7PG2fRvuFPY5791DZXLimlO/QAtQnmFqHvlE9KRKSFIgiMitITgeegkbketQ==; 5:amR50CdGnqB9Pb9juM+d5keSO93JAau6eE9YNfUpzWGmOG8vRkBf02H9uwcClLaf55K0irqkBpBp8VxvtP4cSL7mDf3+2CQNucaAyGf4xTRPd5PcLY/R5fTZTljPFi4Oq3Kr3wY0/tKuhjnXGws2J7GNpRRL7N7ClJ2d3dbNQvg=; 7:taRnSnM22ETB3vfILwgjmGfB8DUtpI6ELHpNFDNpTzmWaE49eLdbUvBhMs8mYyen4tHzhySy1xLB4T2QECubJf9FbYCfUzptSU2hq+685cToGBoaI8fa9d+h9QsGICRQd0P3ECMJmlhNaWoPWpEUqPwIIfc0r9gjHyRYd3dR+LzE8mC5yWe9QhhNReLQH3Ax6YhxqWKJQTA2As6mAe6jG8BQ2nRqXjF4egj0UVgAKNsyhiFdiaIs6iWDARfvCFEU SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2018 12:02:40.3461 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 940e8d88-1bcf-4707-cda8-08d632961c12 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4683 Subject: [dpdk-dev] [PATCH v5 0/5] X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2018 12:02:43 -0000 ::Background:: After the restructuring of memory in last release(s), one of the major impact on fslmc/dpaa bus (and its devices) was the performance drop when using physical addressing. Previously, it was assumed that physical range was contiguous for any given request for hugepage memory. That way, whenever a virtual address was returned, it was easy to fetch physical equivalent, in almost constant time. But, with memory hotplug series, that assumption was negated. Every call that device drivers made for rte_mem_virt2iova or rte_mem_virt2phy were expensive. (Using IOVA_CONTIG is an app dependency which is not a practical option). For fslmc, working on Physical or Virtual (IOMMU supported) address is an optional thing. For dpaa bus, it is not optional and only physical addressing is supported. Thus, it impacted dpaa bus the most. ::DPAAX PA-VA Table:: - A simple table containing entries for all physical memory range available on a particular SoC (in this case, NXP's LS104x and LS20xx series, which are handled by dpaa and fslmc bus, respectively). As of now, this is SoC dependent for fetching range. - We populate the table either through the mempool handler (for mempool pinned memory) or through the memory event callbacks (for cases where working memory is allocated by application). - Though aim is only to translate addresses for descriptors which are Rx'd from devices, this is a generic layer which should work in other cases as well (though, not the target of current testing). ::About patches:: Patch 1: There was an issue in existing PA/VA mode reporting being done by fslmc bus. This patch fixes it. Patch 2: Common libraries/commponents can be dependency for the bus thus, blocking parallel compilation Patch 3: Add the library in common/dpaax. This is a single patch as functions are mostly inter-linked. Patch 4~5: Add support in dpaa and fslmc bus, respectively. It is not possible to unlink the bus and device drivers, thus, these patches have blanket change across all drivers. ::Next Steps:: - Some optimization are required to tune the access pattern of the table. These would be posted as additional patches. - In case there is any possible split of patches, I will post another version. But until then, this is the layout. ::Version History:: v4->v5: - Fixed a shared build error appearing on CI (couldn't reproduce locally so, moved the shared build sections in makefile) v3->v4: - Fixed missing rework against review comment from Pavan: shift the IOVA mode detection code in bus/fslmc - Rebased over master (abe92131c92) v2->v3: - Added back del operation (update) for mem-events, which was removed in v2 - Change IOMMU(PA) detection for FSLMC Bus (review comment: Pavan) - Rebase on master (6673fe0ce2) v1->v2: - Rework of review comments on v1 - Removed dpaax_iova_table_del API - that is redundant - Changed paax_iova_table_add to paax_iova_table_update to make it more relevant - Previous patch removed an advertised API (rte_dpaa2_memsegs). This is fixed. A deprecation notice would now be sent for removal in next release. - Rebase on master (5f73c2670f); Also verified on net-next/mater (317f8b01f) Shreyansh Jain (5): bus/fslmc: fix physical addressing check drivers: common as dependency for bus common/dpaax: add library for PA VA translation table dpaa: enable dpaax library fslmc: enable dpaax library config/common_base | 5 + config/common_linuxapp | 5 + drivers/Makefile | 1 + drivers/bus/dpaa/Makefile | 1 + drivers/bus/dpaa/dpaa_bus.c | 4 + drivers/bus/dpaa/meson.build | 2 +- drivers/bus/dpaa/rte_dpaa_bus.h | 6 + drivers/bus/fslmc/Makefile | 1 + drivers/bus/fslmc/fslmc_bus.c | 24 + drivers/bus/fslmc/meson.build | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 21 +- drivers/common/Makefile | 4 + drivers/common/dpaax/Makefile | 31 ++ drivers/common/dpaax/dpaax_iova_table.c | 461 ++++++++++++++++++ drivers/common/dpaax/dpaax_iova_table.h | 103 ++++ drivers/common/dpaax/dpaax_logs.h | 39 ++ drivers/common/dpaax/meson.build | 12 + .../common/dpaax/rte_common_dpaax_version.map | 11 + drivers/common/meson.build | 2 +- drivers/crypto/dpaa2_sec/Makefile | 1 + drivers/crypto/dpaa_sec/Makefile | 1 + drivers/crypto/dpaa_sec/dpaa_sec.c | 6 + drivers/event/dpaa/Makefile | 1 + drivers/event/dpaa2/Makefile | 1 + drivers/mempool/dpaa/Makefile | 1 + drivers/mempool/dpaa/dpaa_mempool.c | 4 + drivers/mempool/dpaa/dpaa_mempool.h | 4 +- drivers/mempool/dpaa2/Makefile | 1 + drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 29 +- drivers/net/dpaa/Makefile | 1 + drivers/net/dpaa2/Makefile | 1 + drivers/raw/dpaa2_cmdif/Makefile | 1 + drivers/raw/dpaa2_qdma/Makefile | 1 + mk/rte.app.mk | 7 + 34 files changed, 753 insertions(+), 42 deletions(-) create mode 100644 drivers/common/dpaax/Makefile create mode 100644 drivers/common/dpaax/dpaax_iova_table.c create mode 100644 drivers/common/dpaax/dpaax_iova_table.h create mode 100644 drivers/common/dpaax/dpaax_logs.h create mode 100644 drivers/common/dpaax/meson.build create mode 100644 drivers/common/dpaax/rte_common_dpaax_version.map -- 2.17.1