Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/56960/?format=api
http://patches.dpdk.org/api/patches/56960/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/6ee9d8ddb5de3b2de880ad42c37b012888a6facd.1563876069.git.anatoly.burakov@intel.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<6ee9d8ddb5de3b2de880ad42c37b012888a6facd.1563876069.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/6ee9d8ddb5de3b2de880ad42c37b012888a6facd.1563876069.git.anatoly.burakov@intel.com", "date": "2019-07-23T10:01:20", "name": "vfio: use contiguous mapping for IOVA as VA mode", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "03f37ddb6341d3b7a4637daf42b517eefd7bc6ac", "submitter": { "id": 4, "url": "http://patches.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "email": "anatoly.burakov@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/6ee9d8ddb5de3b2de880ad42c37b012888a6facd.1563876069.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 5668, "url": "http://patches.dpdk.org/api/series/5668/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5668", "date": "2019-07-23T10:01:20", "name": "vfio: use contiguous mapping for IOVA as VA mode", "version": 1, "mbox": "http://patches.dpdk.org/series/5668/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/56960/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/56960/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4DD981B9A5;\n\tTue, 23 Jul 2019 12:01:24 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id 8D7321B951;\n\tTue, 23 Jul 2019 12:01:22 +0200 (CEST)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t23 Jul 2019 03:01:21 -0700", "from silpixa00399498.ir.intel.com (HELO\n\tsilpixa00399498.ger.corp.intel.com) ([10.237.223.125])\n\tby fmsmga005.fm.intel.com with ESMTP; 23 Jul 2019 03:01:20 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.64,298,1559545200\"; d=\"scan'208\";a=\"368323192\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "andrius.sirvys@intel.com,\n\tstable@dpdk.org", "Date": "Tue, 23 Jul 2019 11:01:20 +0100", "Message-Id": "<6ee9d8ddb5de3b2de880ad42c37b012888a6facd.1563876069.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 2.17.1", "Subject": "[dpdk-dev] [PATCH] vfio: use contiguous mapping for IOVA as VA mode", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "When using IOVA as VA mode, there is no need to map segments\npage by page. This normally isn't a problem, but it becomes one\nwhen attempting to use DPDK in no-huge mode, where VFIO subsystem\nsimply runs out of space to store mappings.\n\nFix this for x86 by triggering different callbacks based on whether\nIOVA as VA mode is enabled.\n\nFixes: 73a639085938 (\"vfio: allow to map other memory regions\")\nCc: stable@dpdk.org\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/linux/eal/eal_vfio.c | 20 ++++++++++++++++++++\n 1 file changed, 20 insertions(+)", "diff": "diff --git a/lib/librte_eal/linux/eal/eal_vfio.c b/lib/librte_eal/linux/eal/eal_vfio.c\nindex ed04231b1..501c74f23 100644\n--- a/lib/librte_eal/linux/eal/eal_vfio.c\n+++ b/lib/librte_eal/linux/eal/eal_vfio.c\n@@ -1231,6 +1231,19 @@ rte_vfio_get_group_num(const char *sysfs_base,\n \treturn 1;\n }\n \n+static int\n+type1_map_contig(const struct rte_memseg_list *msl, const struct rte_memseg *ms,\n+\t\tsize_t len, void *arg)\n+{\n+\tint *vfio_container_fd = arg;\n+\n+\tif (msl->external)\n+\t\treturn 0;\n+\n+\treturn vfio_type1_dma_mem_map(*vfio_container_fd, ms->addr_64, ms->iova,\n+\t\t\tlen, 1);\n+}\n+\n static int\n type1_map(const struct rte_memseg_list *msl, const struct rte_memseg *ms,\n \t\tvoid *arg)\n@@ -1300,6 +1313,13 @@ vfio_type1_dma_mem_map(int vfio_container_fd, uint64_t vaddr, uint64_t iova,\n static int\n vfio_type1_dma_map(int vfio_container_fd)\n {\n+\tif (rte_eal_iova_mode() == RTE_IOVA_VA) {\n+\t\t/* with IOVA as VA mode, we can get away with mapping contiguous\n+\t\t * chunks rather than going page-by-page.\n+\t\t */\n+\t\treturn rte_memseg_contig_walk(type1_map_contig,\n+\t\t\t\t&vfio_container_fd);\n+\t}\n \treturn rte_memseg_walk(type1_map, &vfio_container_fd);\n }\n \n", "prefixes": [] }{ "id": 56960, "url": "