get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/65118/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 65118,
    "url": "http://patches.dpdk.org/api/patches/65118/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/f73a0686eb2a84587874ed66230858b050ac8970.1579884701.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": "<f73a0686eb2a84587874ed66230858b050ac8970.1579884701.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/f73a0686eb2a84587874ed66230858b050ac8970.1579884701.git.anatoly.burakov@intel.com",
    "date": "2020-01-24T17:01:38",
    "name": "eal/mem: preallocate VA space in no-huge mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7086753ee407aa94a28f1ac35c6d2c944463b373",
    "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/f73a0686eb2a84587874ed66230858b050ac8970.1579884701.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 8287,
            "url": "http://patches.dpdk.org/api/series/8287/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8287",
            "date": "2020-01-24T17:01:38",
            "name": "eal/mem: preallocate VA space in no-huge mode",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8287/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65118/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/65118/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1D6E9A0534;\n\tFri, 24 Jan 2020 18:01:44 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 6368B3576;\n\tFri, 24 Jan 2020 18:01:43 +0100 (CET)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by dpdk.org (Postfix) with ESMTP id 9E32534F3;\n Fri, 24 Jan 2020 18:01:41 +0100 (CET)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 24 Jan 2020 09:01:40 -0800",
            "from silpixa00399498.ir.intel.com (HELO\n silpixa00399498.ger.corp.intel.com) ([10.237.223.151])\n by orsmga007.jf.intel.com with ESMTP; 24 Jan 2020 09:01:39 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.70,358,1574150400\"; d=\"scan'208\";a=\"216642896\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "stable@dpdk.org",
        "Date": "Fri, 24 Jan 2020 17:01:38 +0000",
        "Message-Id": "\n <f73a0686eb2a84587874ed66230858b050ac8970.1579884701.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH] eal/mem: preallocate VA space in no-huge 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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When --no-huge mode is used, the memory is currently allocated with\nmmap(NULL, ...). This is fine in most cases, but can fail in cases\nwhere DPDK is run on a machine with an IOMMU that is of more limited\naddress width than that of a VA, because we're not specifying the\naddress hint for mmap() call.\n\nFix it by preallocating VA space before mapping it.\n\nCc: stable@dpdk.org\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n\nNotes:\n    I couldn't figure out which specific commit has introduced\n    the issue, so there's no fix tag. The most likely candidate\n    is one that introduced the DMA mask thing in the first place\n    but i'm not sure.\n\n lib/librte_eal/linux/eal/eal_memory.c | 19 +++++++++++++++++--\n 1 file changed, 17 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c\nindex 43e4ffc757..672f8806dd 100644\n--- a/lib/librte_eal/linux/eal/eal_memory.c\n+++ b/lib/librte_eal/linux/eal/eal_memory.c\n@@ -1340,6 +1340,8 @@ eal_legacy_hugepage_init(void)\n \n \t/* hugetlbfs can be disabled */\n \tif (internal_config.no_hugetlbfs) {\n+\t\tvoid *prealloc_addr;\n+\t\tsize_t mem_sz;\n \t\tstruct rte_memseg_list *msl;\n \t\tint n_segs, cur_seg, fd, flags;\n #ifdef MEMFD_SUPPORTED\n@@ -1395,8 +1397,21 @@ eal_legacy_hugepage_init(void)\n \t\t\t}\n \t\t}\n #endif\n-\t\taddr = mmap(NULL, internal_config.memory, PROT_READ | PROT_WRITE,\n-\t\t\t\tflags, fd, 0);\n+\t\t/* preallocate address space for the memory, so that it can be\n+\t\t * fit into the DMA mask.\n+\t\t */\n+\t\tmem_sz = internal_config.memory;\n+\t\tprealloc_addr = eal_get_virtual_area(\n+\t\t\t\tNULL, &mem_sz, page_sz, 0, 0);\n+\t\tif (prealloc_addr == NULL) {\n+\t\t\tRTE_LOG(ERR, EAL,\n+\t\t\t\t\t\"%s: reserving memory area failed: \"\n+\t\t\t\t\t\"%s\\n\",\n+\t\t\t\t\t__func__, strerror(errno));\n+\t\t\treturn -1;\n+\t\t}\n+\t\taddr = mmap(prealloc_addr, internal_config.memory,\n+\t\t\t\tPROT_READ | PROT_WRITE, flags, fd, MAP_FIXED);\n \t\tif (addr == MAP_FAILED) {\n \t\t\tRTE_LOG(ERR, EAL, \"%s: mmap() failed: %s\\n\", __func__,\n \t\t\t\t\tstrerror(errno));\n",
    "prefixes": []
}