Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/44420/?format=api
https://patches.dpdk.org/api/patches/44420/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180907155843.96465-1-dariusz.stojaczyk@intel.com/", "project": { "id": 1, "url": "https://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": "<20180907155843.96465-1-dariusz.stojaczyk@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180907155843.96465-1-dariusz.stojaczyk@intel.com", "date": "2018-09-07T15:58:43", "name": "[v2] eal/bus: use RTE_IOVA_PA only if phys addresses are available", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "cdc7b7b86e9429cce0f2d26b28c68ea96d6f932e", "submitter": { "id": 1123, "url": "https://patches.dpdk.org/api/people/1123/?format=api", "name": "Stojaczyk, Dariusz", "email": "dariusz.stojaczyk@intel.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180907155843.96465-1-dariusz.stojaczyk@intel.com/mbox/", "series": [ { "id": 1231, "url": "https://patches.dpdk.org/api/series/1231/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1231", "date": "2018-09-07T15:58:43", "name": "[v2] eal/bus: use RTE_IOVA_PA only if phys addresses are available", "version": 2, "mbox": "https://patches.dpdk.org/series/1231/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/44420/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/44420/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 999F8493D;\n\tFri, 7 Sep 2018 18:00:34 +0200 (CEST)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 9DA1C493D\n\tfor <dev@dpdk.org>; Fri, 7 Sep 2018 18:00:33 +0200 (CEST)", "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Sep 2018 09:00:32 -0700", "from violet.igk.intel.com ([10.102.17.58])\n\tby orsmga006.jf.intel.com with ESMTP; 07 Sep 2018 09:00:11 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.53,343,1531810800\"; d=\"scan'208\";a=\"72433109\"", "From": "Darek Stojaczyk <dariusz.stojaczyk@intel.com>", "To": "dev@dpdk.org, Santosh Shukla <santosh.shukla@caviumnetworks.com>,\n\tHemant Agrawal <hemant.agrawal@nxp.com>,\n\tJerin Jacob <jerin.jacob@caviumnetworks.com>", "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>,\n\tAnatoly Burakov <anatoly.burakov@intel.com>,\n\tChas Williams <chas3@att.com>, \n\tDarek Stojaczyk <dariusz.stojaczyk@intel.com>", "Date": "Fri, 7 Sep 2018 17:58:43 +0200", "Message-Id": "<20180907155843.96465-1-dariusz.stojaczyk@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20180907154703.83316-1-dariusz.stojaczyk@intel.com>", "References": "<20180907154703.83316-1-dariusz.stojaczyk@intel.com>", "Subject": "[dpdk-dev] [PATCH v2] eal/bus: use RTE_IOVA_PA only if phys\n\taddresses are available", "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 neither RTE_IOVA_VA nor RTE_IOVA_PA was explicitly\nrequested, DPDK would currently fallback to the default\nRTE_IOVA_PA mode and possibly encounter a failure later\non if running as a non-priviledged user. Attempting to\nuse RTE_IOVA_VA if no phys addresses are available may\nhelp in this case.\n\nSigned-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>\n---\nChanges since v1:\n * added a missing rte_memory.h include\n\n lib/librte_eal/common/eal_common_bus.c | 19 +++++++++++++++----\n 1 file changed, 15 insertions(+), 4 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c\nindex 0943851cc..68c581b8a 100644\n--- a/lib/librte_eal/common/eal_common_bus.c\n+++ b/lib/librte_eal/common/eal_common_bus.c\n@@ -37,6 +37,7 @@\n #include <rte_bus.h>\n #include <rte_debug.h>\n #include <rte_string_fns.h>\n+#include <rte_memory.h>\n \n #include \"eal_private.h\"\n \n@@ -236,9 +237,19 @@ rte_bus_get_iommu_class(void)\n \t\t\tmode |= bus->get_iommu_class();\n \t}\n \n-\tif (mode != RTE_IOVA_VA) {\n-\t\t/* Use default IOVA mode */\n-\t\tmode = RTE_IOVA_PA;\n+\tif (mode == RTE_IOVA_VA)\n+\t\treturn RTE_IOVA_VA;\n+\n+\tif (mode & RTE_IOVA_PA) {\n+\t\t/* Not all buses support RTE_IOVA_VA, fallback to RTE_IOVA_PA */\n+\t\treturn RTE_IOVA_PA;\n+\t}\n+\n+\tif (rte_eal_using_phys_addrs()) {\n+\t\t/* Default to RTE_IOVA_PA only if it's supported */\n+\t\treturn RTE_IOVA_PA;\n \t}\n-\treturn mode;\n+\n+\t/* Since RTE_IOVA_PA is unsupported, fallback to RTE_IOVA_VA */\n+\treturn RTE_IOVA_VA;\n }\n", "prefixes": [ "v2" ] }{ "id": 44420, "url": "