get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1139,
    "url": "https://patches.dpdk.org/api/patches/1139/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1415189477-19994-1-git-send-email-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": "<1415189477-19994-1-git-send-email-anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1415189477-19994-1-git-send-email-anatoly.burakov@intel.com",
    "date": "2014-11-05T12:11:17",
    "name": "[dpdk-dev] Fix regression for eal_flags_autotest introduced by tailq rework",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a507173c5e34210d773b1318039182297ea754a9",
    "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/1415189477-19994-1-git-send-email-anatoly.burakov@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/1139/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/1139/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 274845947;\n\tWed,  5 Nov 2014 13:02:01 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 55DAB2E89\n\tfor <dev@dpdk.org>; Wed,  5 Nov 2014 13:01:58 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga101.fm.intel.com with ESMTP; 05 Nov 2014 04:11:20 -0800",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga001.fm.intel.com with ESMTP; 05 Nov 2014 04:11:18 -0800",
            "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tsA5CBIpl019626; Wed, 5 Nov 2014 12:11:18 GMT",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id sA5CBHNY020029;\n\tWed, 5 Nov 2014 12:11:17 GMT",
            "(from aburakov@localhost)\n\tby sivswdev02.ir.intel.com with  id sA5CBH4I020025;\n\tWed, 5 Nov 2014 12:11:17 GMT"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.07,319,1413270000\"; d=\"scan'208\";a=\"617505469\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Wed,  5 Nov 2014 12:11:17 +0000",
        "Message-Id": "<1415189477-19994-1-git-send-email-anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "Subject": "[dpdk-dev] [PATCH] Fix regression for eal_flags_autotest introduced\n\tby tailq rework",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://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": "<http://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": "As a result of moving tailq's into local memory, some tailq data\nis now reserved in rte_malloc heaps (because it needs to be\nshared across DPDK processes). The first thing DPDK initializes\nis a log mempool, and since it creates a tailq, it reserves\nspace in rte_malloc heap before allocating the mempool itself.\nBy default, rte_malloc allocates way more space than is necessary,\nso under some conditions (namely, overall memory available is low)\nthis results in malloc heap eating up so much memory that log\nmempool is not able to allocate its memzone.\n\nThis patch fixes the unit tests to account for that change.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n app/test/test_eal_flags.c | 43 +++++++++++++++++++++----------------------\n 1 file changed, 21 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c\nindex 21e6cca..9541619 100644\n--- a/app/test/test_eal_flags.c\n+++ b/app/test/test_eal_flags.c\n@@ -52,6 +52,11 @@\n \n #include \"process.h\"\n \n+#ifdef RTE_LIBRTE_XEN_DOM0\n+#define DEFAULT_MEM_SIZE \"30\"\n+#else\n+#define DEFAULT_MEM_SIZE \"8\"\n+#endif\n #define mp_flag \"--proc-type=secondary\"\n #define no_hpet \"--no-hpet\"\n #define no_huge \"--no-huge\"\n@@ -616,14 +621,15 @@ test_no_huge_flag(void)\n \t/* With --no-huge */\n \tconst char *argv1[] = {prgname, prefix, no_huge, \"-c\", \"1\", \"-n\", \"2\"};\n \t/* With --no-huge and -m */\n-\tconst char *argv2[] = {prgname, prefix, no_huge, \"-c\", \"1\", \"-n\", \"2\", \"-m\", \"2\"};\n+\tconst char *argv2[] = {prgname, prefix, no_huge, \"-c\", \"1\", \"-n\", \"2\",\n+\t\t\t\"-m\", DEFAULT_MEM_SIZE};\n \n \t/* With --no-huge and --socket-mem */\n \tconst char *argv3[] = {prgname, prefix, no_huge, \"-c\", \"1\", \"-n\", \"2\",\n-\t\t\t\"--socket-mem=2\"};\n+\t\t\t\"--socket-mem=\" DEFAULT_MEM_SIZE};\n \t/* With --no-huge, -m and --socket-mem */\n \tconst char *argv4[] = {prgname, prefix, no_huge, \"-c\", \"1\", \"-n\", \"2\",\n-\t\t\t\"-m\", \"2\", \"--socket-mem=2\"};\n+\t\t\t\"-m\", DEFAULT_MEM_SIZE, \"--socket-mem=\" DEFAULT_MEM_SIZE};\n \tif (launch_proc(argv1) != 0) {\n \t\tprintf(\"Error - process did not run ok with --no-huge flag\\n\");\n \t\treturn -1;\n@@ -789,20 +795,20 @@ test_misc_flags(void)\n \t/* With invalid --syslog */\n \tconst char *argv5[] = {prgname, prefix, mp_flag, \"-c\", \"1\", \"--syslog\", \"error\"};\n \t/* With no-sh-conf */\n-\tconst char *argv6[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", \"2\",\n+\tconst char *argv6[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", DEFAULT_MEM_SIZE,\n \t\t\tno_shconf, nosh_prefix };\n \n #ifdef RTE_EXEC_ENV_BSDAPP\n \treturn 0;\n #endif\n \t/* With --huge-dir */\n-\tconst char *argv7[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", \"2\",\n+\tconst char *argv7[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", DEFAULT_MEM_SIZE,\n \t\t\t\"--file-prefix=hugedir\", \"--huge-dir\", hugepath};\n \t/* With empty --huge-dir (should fail) */\n-\tconst char *argv8[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", \"2\",\n+\tconst char *argv8[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", DEFAULT_MEM_SIZE,\n \t\t\t\"--file-prefix=hugedir\", \"--huge-dir\"};\n \t/* With invalid --huge-dir */\n-\tconst char *argv9[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", \"2\",\n+\tconst char *argv9[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", DEFAULT_MEM_SIZE,\n \t\t\t\"--file-prefix=hugedir\", \"--huge-dir\", \"invalid\"};\n \t/* Secondary process with invalid --huge-dir (should run as flag has no\n \t * effect on secondary processes) */\n@@ -923,15 +929,15 @@ test_file_prefix(void)\n #endif\n \n \t/* this should fail unless the test itself is run with \"memtest\" prefix */\n-\tconst char *argv0[] = {prgname, mp_flag, \"-c\", \"1\", \"-n\", \"2\", \"-m\", \"2\",\n+\tconst char *argv0[] = {prgname, mp_flag, \"-c\", \"1\", \"-n\", \"2\", \"-m\", DEFAULT_MEM_SIZE,\n \t\t\t\"--file-prefix=\" memtest };\n \n \t/* primary process with memtest1 */\n-\tconst char *argv1[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", \"2\",\n+\tconst char *argv1[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", DEFAULT_MEM_SIZE,\n \t\t\t\t\"--file-prefix=\" memtest1 };\n \n \t/* primary process with memtest2 */\n-\tconst char *argv2[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", \"2\",\n+\tconst char *argv2[] = {prgname, \"-c\", \"1\", \"-n\", \"2\", \"-m\", DEFAULT_MEM_SIZE,\n \t\t\t\t\"--file-prefix=\" memtest2 };\n \n \tchar prefix[32];\n@@ -1025,7 +1031,6 @@ test_file_prefix(void)\n static int\n test_memory_flags(void)\n {\n-\tconst char* mem_size = NULL;\n #ifdef RTE_EXEC_ENV_BSDAPP\n \t/* BSD target doesn't support prefixes at this point */\n \tconst char * prefix = \"\";\n@@ -1037,20 +1042,14 @@ test_memory_flags(void)\n \t}\n \tsnprintf(prefix, sizeof(prefix), \"--file-prefix=%s\", tmp);\n #endif\n-#ifdef RTE_LIBRTE_XEN_DOM0\n-\tmem_size = \"30\";\n-#else\n-\tmem_size = \"2\";\n-#endif\n-\n \n \t/* valid -m flag and mp flag */\n \tconst char *argv0[] = {prgname, prefix, mp_flag, \"-c\", \"10\",\n-\t\t\t\"-n\", \"2\", \"-m\", mem_size};\n+\t\t\t\"-n\", \"2\", \"-m\", DEFAULT_MEM_SIZE};\n \n \t/* valid -m flag */\n \tconst char *argv1[] = {prgname, \"-c\", \"10\", \"-n\", \"2\",\n-\t\t\t\"--file-prefix=\" memtest, \"-m\", mem_size};\n+\t\t\t\"--file-prefix=\" memtest, \"-m\", DEFAULT_MEM_SIZE};\n \n \t/* invalid (zero) --socket-mem flag */\n \tconst char *argv2[] = {prgname, \"-c\", \"10\", \"-n\", \"2\",\n@@ -1078,7 +1077,7 @@ test_memory_flags(void)\n \n \t/* valid --socket-mem specified together with -m flag */\n \tconst char *argv8[] = {prgname, \"-c\", \"10\", \"-n\", \"2\",\n-\t\t\t\"--file-prefix=\" memtest, \"-m\", \"2\", \"--socket-mem=2,2\"};\n+\t\t\t\"--file-prefix=\" memtest, \"-m\", DEFAULT_MEM_SIZE, \"--socket-mem=2,2\"};\n \n \t/* construct an invalid socket mask with 2 megs on each socket plus\n \t * extra 2 megs on socket that doesn't exist on current system */\n@@ -1100,7 +1099,7 @@ test_memory_flags(void)\n \n \t/* add one extra socket */\n \tfor (i = 0; i < num_sockets + 1; i++) {\n-\t\tsnprintf(buf, sizeof(buf), \"%s2\", invalid_socket_mem);\n+\t\tsnprintf(buf, sizeof(buf), \"%s%s\", invalid_socket_mem, DEFAULT_MEM_SIZE);\n \t\tsnprintf(invalid_socket_mem, sizeof(invalid_socket_mem), \"%s\", buf);\n \n \t\tif (num_sockets + 1 - i > 1) {\n@@ -1116,7 +1115,7 @@ test_memory_flags(void)\n \n \t/* add one extra socket */\n \tfor (i = 0; i < num_sockets; i++) {\n-\t\tsnprintf(buf, sizeof(buf), \"%s2\", valid_socket_mem);\n+\t\tsnprintf(buf, sizeof(buf), \"%s%s\", valid_socket_mem, DEFAULT_MEM_SIZE);\n \t\tsnprintf(valid_socket_mem, sizeof(valid_socket_mem), \"%s\", buf);\n \n \t\tif (num_sockets - i > 1) {\n",
    "prefixes": [
        "dpdk-dev"
    ]
}