get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 32458,
    "url": "https://patches.dpdk.org/api/patches/32458/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/f049a881a3132830cacb815c746864af9d4bf58e.1513681966.git.anatoly.burakov@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": "<f049a881a3132830cacb815c746864af9d4bf58e.1513681966.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/f049a881a3132830cacb815c746864af9d4bf58e.1513681966.git.anatoly.burakov@intel.com",
    "date": "2017-12-19T11:14:36",
    "name": "[dpdk-dev,RFC,v2,09/23] eal: add \"legacy memory\" option",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e70d4849d0b391a9bb9b6c0b6e5e0eb9fa118917",
    "submitter": {
        "id": 4,
        "url": "https://patches.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/f049a881a3132830cacb815c746864af9d4bf58e.1513681966.git.anatoly.burakov@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/32458/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/32458/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 125011B1A8;\n\tTue, 19 Dec 2017 12:15:11 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id A51A41B019\n\tfor <dev@dpdk.org>; Tue, 19 Dec 2017 12:14:55 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Dec 2017 03:14:54 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga001.fm.intel.com with ESMTP; 19 Dec 2017 03:14:52 -0800",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tvBJBEqiD003110; Tue, 19 Dec 2017 11:14:52 GMT",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id vBJBEqbR010237;\n\tTue, 19 Dec 2017 11:14:52 GMT",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id vBJBEqHC010233;\n\tTue, 19 Dec 2017 11:14:52 GMT"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.45,426,1508828400\"; d=\"scan'208\";a=\"14827539\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "andras.kovacs@ericsson.com, laszlo.vadkeri@ericsson.com,\n\tkeith.wiles@intel.com, benjamin.walker@intel.com,\n\tbruce.richardson@intel.com, thomas@monjalon.net",
        "Date": "Tue, 19 Dec 2017 11:14:36 +0000",
        "Message-Id": "<f049a881a3132830cacb815c746864af9d4bf58e.1513681966.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<cover.1513681966.git.anatoly.burakov@intel.com>",
            "<cover.1513681966.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1513681966.git.anatoly.burakov@intel.com>",
            "<cover.1513681966.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [RFC v2 09/23] eal: add \"legacy memory\" option",
        "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": "This adds a \"--legacy-mem\" command-line switch. It will be used to\ngo back to the old memory behavior, one where we can't dynamically\nallocate/free memory (the downside), but one where the user can\nget physically contiguous memory, like before (the upside).\n\nFor now, nothing but the legacy behavior exists, non-legacy\nmemory init sequence will be added later.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n lib/librte_eal/common/eal_common_options.c |  4 ++++\n lib/librte_eal/common/eal_internal_cfg.h   |  3 +++\n lib/librte_eal/common/eal_options.h        |  2 ++\n lib/librte_eal/linuxapp/eal/eal.c          |  1 +\n lib/librte_eal/linuxapp/eal/eal_memory.c   | 22 ++++++++++++++++++----\n 5 files changed, 28 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c\nindex c3f7c41..88ff35a 100644\n--- a/lib/librte_eal/common/eal_common_options.c\n+++ b/lib/librte_eal/common/eal_common_options.c\n@@ -99,6 +99,7 @@ eal_long_options[] = {\n \t{OPT_VFIO_INTR,         1, NULL, OPT_VFIO_INTR_NUM        },\n \t{OPT_VMWARE_TSC_MAP,    0, NULL, OPT_VMWARE_TSC_MAP_NUM   },\n \t{OPT_SINGLE_FILE_SEGMENTS, 0, NULL, OPT_SINGLE_FILE_SEGMENTS_NUM},\n+\t{OPT_LEGACY_MEM,        0, NULL, OPT_LEGACY_MEM_NUM       },\n \t{0,                     0, NULL, 0                        }\n };\n \n@@ -1162,6 +1163,9 @@ eal_parse_common_option(int opt, const char *optarg,\n \tcase OPT_SINGLE_FILE_SEGMENTS_NUM:\n \t\tconf->single_file_segments = 1;\n \t\tbreak;\n+\tcase OPT_LEGACY_MEM_NUM:\n+\t\tconf->legacy_mem = 1;\n+\t\tbreak;\n \n \t/* don't know what to do, leave this to caller */\n \tdefault:\ndiff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h\nindex 484a32e..62ab15b 100644\n--- a/lib/librte_eal/common/eal_internal_cfg.h\n+++ b/lib/librte_eal/common/eal_internal_cfg.h\n@@ -79,6 +79,9 @@ struct internal_config {\n \tvolatile unsigned single_file_segments;\n \t/**< true if storing all pages within single files (per-page-size,\n \t * per-node). */\n+\tvolatile unsigned legacy_mem;\n+\t/**< true to enable legacy memory behavior (no dynamic allocation,\n+\t * contiguous segments). */\n \tvolatile int syslog_facility;\t  /**< facility passed to openlog() */\n \t/** default interrupt mode for VFIO */\n \tvolatile enum rte_intr_mode vfio_intr_mode;\ndiff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h\nindex 26a682a..d09b034 100644\n--- a/lib/librte_eal/common/eal_options.h\n+++ b/lib/librte_eal/common/eal_options.h\n@@ -85,6 +85,8 @@ enum {\n \tOPT_VMWARE_TSC_MAP_NUM,\n #define OPT_SINGLE_FILE_SEGMENTS    \"single-file-segments\"\n \tOPT_SINGLE_FILE_SEGMENTS_NUM,\n+#define OPT_LEGACY_MEM    \"legacy-mem\"\n+\tOPT_LEGACY_MEM_NUM,\n \tOPT_LONG_MAX_NUM\n };\n \ndiff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c\nindex 2a3127f..37ae8e0 100644\n--- a/lib/librte_eal/linuxapp/eal/eal.c\n+++ b/lib/librte_eal/linuxapp/eal/eal.c\n@@ -367,6 +367,7 @@ eal_usage(const char *prgname)\n \t       \"  --\"OPT_CREATE_UIO_DEV\"    Create /dev/uioX (usually done by hotplug)\\n\"\n \t       \"  --\"OPT_VFIO_INTR\"         Interrupt mode for VFIO (legacy|msi|msix)\\n\"\n \t       \"  --\"OPT_SINGLE_FILE_SEGMENTS\" Put all hugepage memory in single files\\n\"\n+\t       \"  --\"OPT_LEGACY_MEM\"        Legacy memory mode (no dynamic allocation, contiguous segments)\\n\"\n \t       \"\\n\");\n \t/* Allow the application to print its usage message too if hook is set */\n \tif ( rte_application_usage_hook ) {\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c\nindex dd18d98..5b18af9 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_memory.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c\n@@ -940,8 +940,8 @@ huge_recover_sigbus(void)\n  *  6. unmap the first mapping\n  *  7. fill memsegs in configuration with contiguous zones\n  */\n-int\n-rte_eal_hugepage_init(void)\n+static int\n+eal_legacy_hugepage_init(void)\n {\n \tstruct rte_mem_config *mcfg;\n \tstruct hugepage_file *hugepage = NULL, *tmp_hp = NULL;\n@@ -1283,8 +1283,8 @@ getFileSize(int fd)\n  * configuration and finds the hugepages which form that segment, mapping them\n  * in order to form a contiguous block in the virtual memory space\n  */\n-int\n-rte_eal_hugepage_attach(void)\n+static int\n+eal_legacy_hugepage_attach(void)\n {\n \tconst struct rte_mem_config *mcfg = rte_eal_get_configuration()->mem_config;\n \tstruct hugepage_file *hp = NULL;\n@@ -1435,6 +1435,20 @@ rte_eal_hugepage_attach(void)\n }\n \n int\n+rte_eal_hugepage_init(void) {\n+\tif (internal_config.legacy_mem)\n+\t\treturn eal_legacy_hugepage_init();\n+\treturn -1;\n+}\n+\n+int\n+rte_eal_hugepage_attach(void) {\n+\tif (internal_config.legacy_mem)\n+\t\treturn eal_legacy_hugepage_attach();\n+\treturn -1;\n+}\n+\n+int\n rte_eal_using_phys_addrs(void)\n {\n \treturn phys_addrs_available;\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "v2",
        "09/23"
    ]
}