Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/34799/?format=api
http://patches.dpdk.org/api/patches/34799/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1517447902-4166-1-git-send-email-changpeng.liu@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": "<1517447902-4166-1-git-send-email-changpeng.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1517447902-4166-1-git-send-email-changpeng.liu@intel.com", "date": "2018-02-01T01:18:22", "name": "[dpdk-dev] pci/uio: enable prefetchable resources mapping", "commit_ref": null, "pull_url": null, "state": "rejected", "archived": true, "hash": "80d56ba45d0f0bf23aa63cad090575df742a4b9b", "submitter": { "id": 565, "url": "http://patches.dpdk.org/api/people/565/?format=api", "name": "Liu, Changpeng", "email": "changpeng.liu@intel.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1517447902-4166-1-git-send-email-changpeng.liu@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/34799/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/34799/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 85E071B886;\n\tThu, 1 Feb 2018 02:13:13 +0100 (CET)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id EB9101B885\n\tfor <dev@dpdk.org>; Thu, 1 Feb 2018 02:13:11 +0100 (CET)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t31 Jan 2018 17:13:07 -0800", "from fedora.sh.intel.com ([10.67.114.176])\n\tby orsmga002.jf.intel.com with ESMTP; 31 Jan 2018 17:13:06 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.46,442,1511856000\"; d=\"scan'208\";a=\"31060455\"", "From": "Changpeng Liu <changpeng.liu@intel.com>", "To": "dev@dpdk.org", "Cc": "changpeng.liu@intel.com,\n\tferruh.yigit@intel.com", "Date": "Thu, 1 Feb 2018 09:18:22 +0800", "Message-Id": "<1517447902-4166-1-git-send-email-changpeng.liu@intel.com>", "X-Mailer": "git-send-email 1.9.3", "Subject": "[dpdk-dev] [PATCH] pci/uio: enable prefetchable resources mapping", "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "For PCI prefetchable resources, Linux will create a\nwrite combined file as well, the library will try\nto map resourceX_wc file first, if the file does\nnot exist, then it will map resourceX as usual.\n\nSigned-off-by: Changpeng Liu <changpeng.liu@intel.com>\n---\n drivers/bus/pci/linux/pci_uio.c | 19 ++++++++++++++-----\n 1 file changed, 14 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/bus/pci/linux/pci_uio.c b/drivers/bus/pci/linux/pci_uio.c\nindex d423e4b..2957a5f 100644\n--- a/drivers/bus/pci/linux/pci_uio.c\n+++ b/drivers/bus/pci/linux/pci_uio.c\n@@ -293,7 +293,7 @@\n \n \t/* update devname for mmap */\n \tsnprintf(devname, sizeof(devname),\n-\t\t\t\"%s/\" PCI_PRI_FMT \"/resource%d\",\n+\t\t\t\"%s/\" PCI_PRI_FMT \"/resource%d_wc\",\n \t\t\trte_pci_get_sysfs_path(),\n \t\t\tloc->domain, loc->bus, loc->devid,\n \t\t\tloc->function, res_idx);\n@@ -307,13 +307,22 @@\n \t}\n \n \t/*\n-\t * open resource file, to mmap it\n+\t * open prefetchable resource file first, try to mmap it\n \t */\n \tfd = open(devname, O_RDWR);\n \tif (fd < 0) {\n-\t\tRTE_LOG(ERR, EAL, \"Cannot open %s: %s\\n\",\n-\t\t\t\tdevname, strerror(errno));\n-\t\tgoto error;\n+\t\tsnprintf(devname, sizeof(devname),\n+\t\t\t\t\"%s/\" PCI_PRI_FMT \"/resource%d\",\n+\t\t\t\trte_pci_get_sysfs_path(),\n+\t\t\t\tloc->domain, loc->bus, loc->devid,\n+\t\t\t\tloc->function, res_idx);\n+\t\t/* then try to map resource file */\n+\t\tfd = open(devname, O_RDWR);\n+\t\tif (fd < 0) {\n+\t\t\tRTE_LOG(ERR, EAL, \"Cannot open %s: %s\\n\",\n+\t\t\t\t\tdevname, strerror(errno));\n+\t\t\tgoto error;\n+\t\t}\n \t}\n \n \t/* try mapping somewhere close to the end of hugepages */\n", "prefixes": [ "dpdk-dev" ] }{ "id": 34799, "url": "