get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 61897,
    "url": "http://patches.dpdk.org/api/patches/61897/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/ea8457f47a25f20f59bb1f37dcf2a1f0bf340c9d.1571920604.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": "<ea8457f47a25f20f59bb1f37dcf2a1f0bf340c9d.1571920604.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/ea8457f47a25f20f59bb1f37dcf2a1f0bf340c9d.1571920604.git.anatoly.burakov@intel.com",
    "date": "2019-10-24T12:36:49",
    "name": "[v5,1/2] eal: make base address hint OS-specific",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "668b64deba8a8707705f16d1bbcefb9998a9f2d5",
    "submitter": {
        "id": 4,
        "url": "http://patches.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/ea8457f47a25f20f59bb1f37dcf2a1f0bf340c9d.1571920604.git.anatoly.burakov@intel.com/mbox/",
    "series": [
        {
            "id": 7043,
            "url": "http://patches.dpdk.org/api/series/7043/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7043",
            "date": "2019-10-24T12:36:49",
            "name": "[v5,1/2] eal: make base address hint OS-specific",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/7043/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/61897/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/61897/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 37F661E9F5;\n\tThu, 24 Oct 2019 14:36:56 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 3E7711E9F5;\n\tThu, 24 Oct 2019 14:36:54 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Oct 2019 05:36:53 -0700",
            "from silpixa00399498.ir.intel.com (HELO\n\tsilpixa00399498.ger.corp.intel.com) ([10.237.223.151])\n\tby orsmga007.jf.intel.com with ESMTP; 24 Oct 2019 05:36:51 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.68,224,1569308400\"; d=\"scan'208\";a=\"188576330\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>, david.marchand@redhat.com,\n\tstephen@networkplumber.org, han.li1@zte.com.cn, stable@dpdk.org",
        "Date": "Thu, 24 Oct 2019 13:36:49 +0100",
        "Message-Id": "<ea8457f47a25f20f59bb1f37dcf2a1f0bf340c9d.1571920604.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<09c3f9d74e1e49aa5b3608d4bf4a773d086e83ff.1564577214.git.anatoly.burakov@intel.com>",
        "References": "<09c3f9d74e1e49aa5b3608d4bf4a773d086e83ff.1564577214.git.anatoly.burakov@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v5 1/2] eal: make base address hint OS-specific",
        "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": "Not all OS's follow Linux's memory layout, which may lead to\nproblems following the suggested common address hint absent\nof a base-virtaddr flag. Make this address hint OS-specific.\n\nCc: stable@dpdk.org\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n\nNotes:\n    v5:\n    - Add ULL suffix as per Stephen's comment\n\n lib/librte_eal/common/eal_common_memory.c | 19 +------------------\n lib/librte_eal/common/eal_private.h       |  6 ++++++\n lib/librte_eal/freebsd/eal/eal_memory.c   | 10 ++++++++++\n lib/librte_eal/linux/eal/eal_memory.c     | 20 ++++++++++++++++++++\n 4 files changed, 37 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c\nindex 19ea47570b..4a9cc1f19a 100644\n--- a/lib/librte_eal/common/eal_common_memory.c\n+++ b/lib/librte_eal/common/eal_common_memory.c\n@@ -40,23 +40,6 @@\n static void *next_baseaddr;\n static uint64_t system_page_sz;\n \n-#ifdef RTE_ARCH_64\n-/*\n- * Linux kernel uses a really high address as starting address for serving\n- * mmaps calls. If there exists addressing limitations and IOVA mode is VA,\n- * this starting address is likely too high for those devices. However, it\n- * is possible to use a lower address in the process virtual address space\n- * as with 64 bits there is a lot of available space.\n- *\n- * Current known limitations are 39 or 40 bits. Setting the starting address\n- * at 4GB implies there are 508GB or 1020GB for mapping the available\n- * hugepages. This is likely enough for most systems, although a device with\n- * addressing limitations should call rte_mem_check_dma_mask for ensuring all\n- * memory is within supported range.\n- */\n-static uint64_t baseaddr = 0x100000000;\n-#endif\n-\n #define MAX_MMAP_WITH_DEFINED_ADDR_TRIES 5\n void *\n eal_get_virtual_area(void *requested_addr, size_t *size,\n@@ -85,7 +68,7 @@ eal_get_virtual_area(void *requested_addr, size_t *size,\n #ifdef RTE_ARCH_64\n \tif (next_baseaddr == NULL && internal_config.base_virtaddr == 0 &&\n \t\t\trte_eal_process_type() == RTE_PROC_PRIMARY)\n-\t\tnext_baseaddr = (void *) baseaddr;\n+\t\tnext_baseaddr = (void *) eal_get_baseaddr();\n #endif\n \tif (requested_addr == NULL && next_baseaddr != NULL) {\n \t\trequested_addr = next_baseaddr;\ndiff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h\nindex 798ede553b..31eae22787 100644\n--- a/lib/librte_eal/common/eal_private.h\n+++ b/lib/librte_eal/common/eal_private.h\n@@ -381,4 +381,10 @@ rte_option_init(void);\n void\n rte_option_usage(void);\n \n+/**\n+ * Get OS-specific EAL mapping base address.\n+ */\n+uint64_t\n+eal_get_baseaddr(void);\n+\n #endif /* _EAL_PRIVATE_H_ */\ndiff --git a/lib/librte_eal/freebsd/eal/eal_memory.c b/lib/librte_eal/freebsd/eal/eal_memory.c\nindex cd31827c2b..98d65fde0a 100644\n--- a/lib/librte_eal/freebsd/eal/eal_memory.c\n+++ b/lib/librte_eal/freebsd/eal/eal_memory.c\n@@ -21,6 +21,16 @@\n \n #define EAL_PAGE_SIZE (sysconf(_SC_PAGESIZE))\n \n+uint64_t eal_get_baseaddr(void)\n+{\n+\t/*\n+\t * FreeBSD may allocate something in the space we will be mapping things\n+\t * before we get a chance to do that, so use a base address that's far\n+\t * away from where malloc() et al usually map things.\n+\t */\n+\treturn 0x1000000000ULL;\n+}\n+\n /*\n  * Get physical address of any mapped virtual address in the current process.\n  */\ndiff --git a/lib/librte_eal/linux/eal/eal_memory.c b/lib/librte_eal/linux/eal/eal_memory.c\nindex 8f62c343d6..fa598b21a4 100644\n--- a/lib/librte_eal/linux/eal/eal_memory.c\n+++ b/lib/librte_eal/linux/eal/eal_memory.c\n@@ -69,6 +69,26 @@ static int phys_addrs_available = -1;\n \n #define RANDOMIZE_VA_SPACE_FILE \"/proc/sys/kernel/randomize_va_space\"\n \n+uint64_t eal_get_baseaddr(void)\n+{\n+\t/*\n+\t * Linux kernel uses a really high address as starting address for\n+\t * serving mmaps calls. If there exists addressing limitations and IOVA\n+\t * mode is VA, this starting address is likely too high for those\n+\t * devices. However, it is possible to use a lower address in the\n+\t * process virtual address space as with 64 bits there is a lot of\n+\t * available space.\n+\t *\n+\t * Current known limitations are 39 or 40 bits. Setting the starting\n+\t * address at 4GB implies there are 508GB or 1020GB for mapping the\n+\t * available hugepages. This is likely enough for most systems, although\n+\t * a device with addressing limitations should call\n+\t * rte_mem_check_dma_mask for ensuring all memory is within supported\n+\t * range.\n+\t */\n+\treturn 0x100000000ULL;\n+}\n+\n /*\n  * Get physical address of any mapped virtual address in the current process.\n  */\n",
    "prefixes": [
        "v5",
        "1/2"
    ]
}