get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65652,
    "url": "http://patches.dpdk.org/api/patches/65652/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200207031437.9124-10-pallavi.kadam@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": "<20200207031437.9124-10-pallavi.kadam@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200207031437.9124-10-pallavi.kadam@intel.com",
    "date": "2020-02-07T03:14:37",
    "name": "[v8,9/9] eal: add minimum viable code to support parsing",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "649851b08215aea00d799c79342a2406da7bce7e",
    "submitter": {
        "id": 1177,
        "url": "http://patches.dpdk.org/api/people/1177/?format=api",
        "name": "Kadam, Pallavi",
        "email": "pallavi.kadam@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/20200207031437.9124-10-pallavi.kadam@intel.com/mbox/",
    "series": [
        {
            "id": 8457,
            "url": "http://patches.dpdk.org/api/series/8457/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8457",
            "date": "2020-02-07T03:14:28",
            "name": "Windows patchset with additional EAL functionalities",
            "version": 8,
            "mbox": "http://patches.dpdk.org/series/8457/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65652/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65652/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 F3AF8A0541;\n\tFri,  7 Feb 2020 04:17:16 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 21D621C11F;\n\tFri,  7 Feb 2020 04:16:13 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 40F061C06A\n for <dev@dpdk.org>; Fri,  7 Feb 2020 04:16:03 +0100 (CET)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 06 Feb 2020 19:15:54 -0800",
            "from win-dpdk-pallavi.jf.intel.com (HELO localhost.localdomain)\n ([10.166.188.75])\n by orsmga005.jf.intel.com with ESMTP; 06 Feb 2020 19:15:53 -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,411,1574150400\"; d=\"scan'208\";a=\"404693018\"",
        "From": "Pallavi Kadam <pallavi.kadam@intel.com>",
        "To": "dev@dpdk.org,\n\tthomas@monjalon.net",
        "Cc": "Harini.Ramakrishnan@microsoft.com, keith.wiles@intel.com,\n bruce.richardson@intel.com, david.marchand@redhat.com,\n jerinjacobk@gmail.com, ranjit.menon@intel.com,\n antara.ganesh.kolar@intel.com, pallavi.kadam@intel.com",
        "Date": "Thu,  6 Feb 2020 19:14:37 -0800",
        "Message-Id": "<20200207031437.9124-10-pallavi.kadam@intel.com>",
        "X-Mailer": "git-send-email 2.18.0.windows.1",
        "In-Reply-To": "<20200207031437.9124-1-pallavi.kadam@intel.com>",
        "References": "<20200201000406.11060-1-pallavi.kadam@intel.com>\n <20200207031437.9124-1-pallavi.kadam@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v8 9/9] eal: add minimum viable code to support\n\tparsing",
        "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": "Adding specific logic for eal.c to support parsing on\nWindows.\n\nSigned-off-by: Pallavi Kadam <pallavi.kadam@intel.com>\nSigned-off-by: Antara Ganesh Kolar <antara.ganesh.kolar@intel.com>\nReviewed-by: Ranjit Menon <ranjit.menon@intel.com>\nReviewed-by: Keith Wiles <keith.wiles@intel.com>\n---\n lib/librte_eal/windows/eal/eal.c | 133 ++++++++++++++++++++++++++++++-\n 1 file changed, 130 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/lib/librte_eal/windows/eal/eal.c b/lib/librte_eal/windows/eal/eal.c\nindex 6a1208c35..5c8e7f472 100644\n--- a/lib/librte_eal/windows/eal/eal.c\n+++ b/lib/librte_eal/windows/eal/eal.c\n@@ -16,6 +16,9 @@\n #include <eal_options.h>\n #include <eal_private.h>\n \n+ /* Allow the application to print its usage message too if set */\n+static rte_usage_hook_t\trte_application_usage_hook;\n+\n /* define fd variable here, because file needs to be kept open for the\n  * duration of the program, as we hold a write lock on it in the primary proc\n  */\n@@ -83,6 +86,124 @@ eal_proc_type_detect(void)\n \treturn ptype;\n }\n \n+/* display usage */\n+static void\n+eal_usage(const char *prgname)\n+{\n+\tprintf(\"\\nUsage: %s \", prgname);\n+\teal_common_usage();\n+\t/* Allow the application to print its usage message too\n+\t *if hook is set\n+\t */\n+\tif (rte_application_usage_hook) {\n+\t\tprintf(\"===== Application Usage =====\\n\\n\");\n+\t\trte_application_usage_hook(prgname);\n+\t}\n+}\n+\n+/* Parse the arguments for --log-level only */\n+static void\n+eal_log_level_parse(int argc, char **argv)\n+{\n+\tint opt;\n+\tchar **argvopt;\n+\tint option_index;\n+\n+\targvopt = argv;\n+\n+\teal_reset_internal_config(&internal_config);\n+\n+\twhile ((opt = getopt_long(argc, argvopt, eal_short_options,\n+\t\teal_long_options, &option_index)) != EOF) {\n+\n+\t\tint ret;\n+\n+\t\t/* getopt is not happy, stop right now */\n+\t\tif (opt == '?')\n+\t\t\tbreak;\n+\n+\t\tret = (opt == OPT_LOG_LEVEL_NUM) ?\n+\t\t\teal_parse_common_option(opt, optarg,\n+\t\t\t\t&internal_config) : 0;\n+\n+\t\t/* common parser is not happy */\n+\t\tif (ret < 0)\n+\t\t\tbreak;\n+\t}\n+\n+\toptind = 0; /* reset getopt lib */\n+}\n+\n+/* Parse the argument given in the command line of the application */\n+__attribute__((optnone)) static int\n+eal_parse_args(int argc, char **argv)\n+{\n+\tint opt, ret;\n+\tchar **argvopt;\n+\tint option_index;\n+\tchar *prgname = argv[0];\n+\n+\targvopt = argv;\n+\n+\twhile ((opt = getopt_long(argc, argvopt, eal_short_options,\n+\t\teal_long_options, &option_index)) != EOF) {\n+\n+\t\tint ret;\n+\n+\t\t/* getopt is not happy, stop right now */\n+\t\tif (opt == '?') {\n+\t\t\teal_usage(prgname);\n+\t\t\treturn -1;\n+\t\t}\n+\n+\t\tret = eal_parse_common_option(opt, optarg, &internal_config);\n+\t\t/* common parser is not happy */\n+\t\tif (ret < 0) {\n+\t\t\teal_usage(prgname);\n+\t\t\treturn -1;\n+\t\t}\n+\t\t/* common parser handled this option */\n+\t\tif (ret == 0)\n+\t\t\tcontinue;\n+\n+\t\tswitch (opt) {\n+\t\tcase 'h':\n+\t\t\teal_usage(prgname);\n+\t\t\texit(EXIT_SUCCESS);\n+\t\tdefault:\n+\t\t\tif (opt < OPT_LONG_MIN_NUM && isprint(opt)) {\n+\t\t\t\tRTE_LOG(ERR, EAL, \"Option %c is not supported \"\n+\t\t\t\t\t\"on Windows\\n\", opt);\n+\t\t\t} else if (opt >= OPT_LONG_MIN_NUM &&\n+\t\t\t\topt < OPT_LONG_MAX_NUM) {\n+\t\t\t\tRTE_LOG(ERR, EAL, \"Option %s is not supported \"\n+\t\t\t\t\t\"on Windows\\n\",\n+\t\t\t\t\teal_long_options[option_index].name);\n+\t\t\t} else {\n+\t\t\t\tRTE_LOG(ERR, EAL, \"Option %d is not supported \"\n+\t\t\t\t\t\"on Windows\\n\", opt);\n+\t\t\t}\n+\t\t\teal_usage(prgname);\n+\t\t\treturn -1;\n+\t\t}\n+\t}\n+\n+\tif (eal_adjust_config(&internal_config) != 0)\n+\t\treturn -1;\n+\n+\t/* sanity checks */\n+\tif (eal_check_common_options(&internal_config) != 0) {\n+\t\teal_usage(prgname);\n+\t\treturn -1;\n+\t}\n+\n+\tif (optind >= 0)\n+\t\targv[optind - 1] = prgname;\n+\tret = optind - 1;\n+\toptind = 0; /* reset getopt lib */\n+\treturn ret;\n+}\n+\n static int\n sync_func(void *arg __rte_unused)\n {\n@@ -98,9 +219,11 @@ rte_eal_init_alert(const char *msg)\n \n  /* Launch threads, called at application init(). */\n int\n-rte_eal_init(int argc __rte_unused, char **argv __rte_unused)\n+rte_eal_init(int argc, char **argv)\n {\n-\tint i;\n+\tint i, fctret;\n+\n+\teal_log_level_parse(argc, argv);\n \n \t/* create a map of all processors in the system */\n \teal_create_cpu_map();\n@@ -111,6 +234,10 @@ rte_eal_init(int argc __rte_unused, char **argv __rte_unused)\n \t\treturn -1;\n \t}\n \n+\tfctret = eal_parse_args(argc, argv);\n+\tif (fctret < 0)\n+\t\texit(1);\n+\n \teal_thread_init_master(rte_config.master_lcore);\n \n \tRTE_LCORE_FOREACH_SLAVE(i) {\n@@ -139,5 +266,5 @@ rte_eal_init(int argc __rte_unused, char **argv __rte_unused)\n \t */\n \trte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);\n \trte_eal_mp_wait_lcore();\n-\treturn 0;\n+\treturn fctret;\n }\n",
    "prefixes": [
        "v8",
        "9/9"
    ]
}