Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/44417/?format=api
https://patches.dpdk.org/api/patches/44417/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180907154703.83316-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": "<20180907154703.83316-1-dariusz.stojaczyk@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180907154703.83316-1-dariusz.stojaczyk@intel.com", "date": "2018-09-07T15:47:03", "name": "eal/bus: use RTE_IOVA_PA only if phys addresses are available", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "8139dfd565e1ea30d52bef8bf897297aa88b5fd8", "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/20180907154703.83316-1-dariusz.stojaczyk@intel.com/mbox/", "series": [ { "id": 1229, "url": "https://patches.dpdk.org/api/series/1229/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1229", "date": "2018-09-07T15:47:03", "name": "eal/bus: use RTE_IOVA_PA only if phys addresses are available", "version": 1, "mbox": "https://patches.dpdk.org/series/1229/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/44417/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/44417/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 DB131325F;\n\tFri, 7 Sep 2018 17:48:28 +0200 (CEST)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 008783256\n\tfor <dev@dpdk.org>; Fri, 7 Sep 2018 17:48:26 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Sep 2018 08:48:26 -0700", "from violet.igk.intel.com ([10.102.17.58])\n\tby fmsmga001.fm.intel.com with ESMTP; 07 Sep 2018 08:48:23 -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,342,1531810800\"; d=\"scan'208\";a=\"88060879\"", "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:47:03 +0200", "Message-Id": "<20180907154703.83316-1-dariusz.stojaczyk@intel.com>", "X-Mailer": "git-send-email 2.17.1", "Subject": "[dpdk-dev] [PATCH] eal/bus: use RTE_IOVA_PA only if phys addresses\n\tare 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---\n lib/librte_eal/common/eal_common_bus.c | 18 ++++++++++++++----\n 1 file changed, 14 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..8b56979d7 100644\n--- a/lib/librte_eal/common/eal_common_bus.c\n+++ b/lib/librte_eal/common/eal_common_bus.c\n@@ -236,9 +236,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": [] }{ "id": 44417, "url": "