get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 138985,
    "url": "http://patches.dpdk.org/api/patches/138985/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240330030429.4630-6-stephen@networkplumber.org/",
    "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": "<20240330030429.4630-6-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240330030429.4630-6-stephen@networkplumber.org",
    "date": "2024-03-30T03:00:48",
    "name": "[v19,05/15] eal: make eal_log_level_parse common",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ca98409742e3e76e785c198c6d43dfc2f5d9ca39",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "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/20240330030429.4630-6-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 31647,
            "url": "http://patches.dpdk.org/api/series/31647/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31647",
            "date": "2024-03-30T03:00:44",
            "name": "Logging unification and improvements",
            "version": 19,
            "mbox": "http://patches.dpdk.org/series/31647/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/138985/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/138985/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 5956743D8B;\n\tSat, 30 Mar 2024 04:05:16 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9468B410E3;\n\tSat, 30 Mar 2024 04:04:51 +0100 (CET)",
            "from mail-oa1-f54.google.com (mail-oa1-f54.google.com\n [209.85.160.54]) by mails.dpdk.org (Postfix) with ESMTP id 168CD40608\n for <dev@dpdk.org>; Sat, 30 Mar 2024 04:04:45 +0100 (CET)",
            "by mail-oa1-f54.google.com with SMTP id\n 586e51a60fabf-229b2396180so1462889fac.0\n for <dev@dpdk.org>; Fri, 29 Mar 2024 20:04:45 -0700 (PDT)",
            "from hermes.local (204-195-123-203.wavecable.com. [204.195.123.203])\n by smtp.gmail.com with ESMTPSA id\n o3-20020a056a00214300b006e6288ef4besm3655486pfk.54.2024.03.29.20.04.43\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 29 Mar 2024 20:04:44 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1711767884;\n x=1712372684; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=3fWTOM3e44i9f5Ui4EGaJfHlyx0x5XrATeUx6W8j5PI=;\n b=oylTyprsFpwPpe8phZt+NMrUDlOJl3lOTI0kWg62AlIbORyisH61NrVqyBOYPt9iBz\n 4s6S+KhpzM0yJU81RGal6WKI+0UGWqVKiJguzslkIJS9c6r8h6um8mPOahQbbaiUREKO\n l57GN+82Ue2cDtrqchwC44WoelUw9jbJHT3CODVVPu6Q6vIhFn/VE7S/bm2VlQ4JbNSF\n 6U2dOeNwIS95/O5KNHawirtqLGIkhMjTNGj0U2ZrTOt0nkbBPBVDEEC/qJYvHulcXl8N\n 3z/r4FdFj1xyIWgndOGGZoPbF+S0gpelJkV+vzJb3V5aVR/BvK4nMBGxKhkA5vOYjhba\n ud2g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1711767884; x=1712372684;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=3fWTOM3e44i9f5Ui4EGaJfHlyx0x5XrATeUx6W8j5PI=;\n b=QfUyJ8pNjOr/I5Tmm+Jki2gWPZWGUqL9ppdgiW2XRthg4yBSOvUVBihUzYu57mjcN0\n 00QFbaUKTi9baNRSsTUOV0Ra1zVqlMB+vBMxpSUaB4YIOLifrtJ9HagKZ5Zryj3y6SI/\n WW2DhgKW8LS+P89jQMaBr1T5BjdXYU5s8dpHU57C9XwICnSKuG8Qi8G3Jc2zzHfd1IMP\n KeI+Uf7OVt/qh+swh3jpiXQcVjgZVUs7+jW7uKJrw43Z6ZZSHDQG5eq/oj8GIqRy+xjZ\n 6BGN3sxncKjPsHc7QJYIN9kz3UoUTYzaZiBHTSLtJ9Ar2F09EJScgK7YP6HQ6argM+9e\n gjjQ==",
        "X-Gm-Message-State": "AOJu0Ywi9eGmYcfOwQHZQA/23T194U9yusAsXUPciPs5674brlT0WFXY\n 2O9XTO3OJtrDZPPDzvJmSbF10vEmNxj6v90RBF10oEdjsPcrWC6yksrOIZ+qtbGk0w26KHbZc3a\n /",
        "X-Google-Smtp-Source": "\n AGHT+IF1O1D+ITASAFfZVN2qfMn2MV9+DsiemlCGOOn81VR3mvrdOvryHE30E0Q0lLm+B4CpsaJUJg==",
        "X-Received": "by 2002:a05:6870:3481:b0:221:8a03:6de7 with SMTP id\n n1-20020a056870348100b002218a036de7mr3794304oah.32.1711767884446;\n Fri, 29 Mar 2024 20:04:44 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Tyler Retzlaff <roretzla@linux.microsoft.com>,\n Bruce Richardson <bruce.richardson@intel.com>,\n Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,\n Pallavi Kadam <pallavi.kadam@intel.com>",
        "Subject": "[PATCH v19 05/15] eal: make eal_log_level_parse common",
        "Date": "Fri, 29 Mar 2024 20:00:48 -0700",
        "Message-ID": "<20240330030429.4630-6-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240330030429.4630-1-stephen@networkplumber.org>",
        "References": "<20200814173441.23086-1-stephen@networkplumber.org>\n <20240330030429.4630-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "The code to parse for log-level option should be same on\nall OS variants.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\nAcked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>\n---\n lib/eal/common/eal_common_options.c | 46 +++++++++++++++++++++++++++++\n lib/eal/common/eal_options.h        |  1 +\n lib/eal/freebsd/eal.c               | 42 --------------------------\n lib/eal/linux/eal.c                 | 39 ------------------------\n lib/eal/windows/eal.c               | 35 ----------------------\n 5 files changed, 47 insertions(+), 116 deletions(-)",
    "diff": "diff --git a/lib/eal/common/eal_common_options.c b/lib/eal/common/eal_common_options.c\nindex e541f07939..5435399b85 100644\n--- a/lib/eal/common/eal_common_options.c\n+++ b/lib/eal/common/eal_common_options.c\n@@ -1640,6 +1640,51 @@ eal_parse_huge_unlink(const char *arg, struct hugepage_file_discipline *out)\n \treturn -1;\n }\n \n+/* Parse the all arguments looking for log related ones */\n+int\n+eal_log_level_parse(int argc, char * const argv[])\n+{\n+\tstruct internal_config *internal_conf = eal_get_internal_configuration();\n+\tint option_index, opt;\n+\tconst int old_optind = optind;\n+\tconst int old_optopt = optopt;\n+\tconst int old_opterr = opterr;\n+\tchar *old_optarg = optarg;\n+#ifdef RTE_EXEC_ENV_FREEBSD\n+\tconst int old_optreset = optreset;\n+\toptreset = 1;\n+#endif\n+\n+\toptind = 1;\n+\topterr = 0;\n+\n+\twhile ((opt = getopt_long(argc, argv, eal_short_options,\n+\t\t\t\t  eal_long_options, &option_index)) != EOF) {\n+\n+\t\tswitch (opt) {\n+\t\tcase OPT_LOG_LEVEL_NUM:\n+\t\t\tif (eal_parse_common_option(opt, optarg, internal_conf) < 0)\n+\t\t\t\treturn -1;\n+\t\t\tbreak;\n+\t\tcase '?':\n+\t\t\t/* getopt is not happy, stop right now */\n+\t\t\tgoto out;\n+\t\tdefault:\n+\t\t\tcontinue;\n+\t\t}\n+\t}\n+out:\n+\t/* restore getopt lib */\n+\toptind = old_optind;\n+\toptopt = old_optopt;\n+\toptarg = old_optarg;\n+\topterr = old_opterr;\n+#ifdef RTE_EXEC_ENV_FREEBSD\n+\toptreset = old_optreset;\n+#endif\n+\treturn 0;\n+}\n+\n int\n eal_parse_common_option(int opt, const char *optarg,\n \t\t\tstruct internal_config *conf)\n@@ -2173,6 +2218,7 @@ rte_vect_set_max_simd_bitwidth(uint16_t bitwidth)\n \treturn 0;\n }\n \n+\n void\n eal_common_usage(void)\n {\ndiff --git a/lib/eal/common/eal_options.h b/lib/eal/common/eal_options.h\nindex 3cc9cb6412..f3f2e104f6 100644\n--- a/lib/eal/common/eal_options.h\n+++ b/lib/eal/common/eal_options.h\n@@ -96,6 +96,7 @@ enum {\n extern const char eal_short_options[];\n extern const struct option eal_long_options[];\n \n+int eal_log_level_parse(int argc, char * const argv[]);\n int eal_parse_common_option(int opt, const char *argv,\n \t\t\t    struct internal_config *conf);\n int eal_option_device_parse(void);\ndiff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c\nindex bab77118e9..9825bcea0b 100644\n--- a/lib/eal/freebsd/eal.c\n+++ b/lib/eal/freebsd/eal.c\n@@ -363,48 +363,6 @@ eal_get_hugepage_mem_size(void)\n \treturn (size < SIZE_MAX) ? (size_t)(size) : SIZE_MAX;\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-\tconst int old_optind = optind;\n-\tconst int old_optopt = optopt;\n-\tconst int old_optreset = optreset;\n-\tchar * const old_optarg = optarg;\n-\tstruct internal_config *internal_conf =\n-\t\teal_get_internal_configuration();\n-\n-\targvopt = argv;\n-\toptind = 1;\n-\toptreset = 1;\n-\n-\twhile ((opt = getopt_long(argc, argvopt, eal_short_options,\n-\t\t\t\t  eal_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    eal_parse_common_option(opt, optarg, internal_conf) : 0;\n-\n-\t\t/* common parser is not happy */\n-\t\tif (ret < 0)\n-\t\t\tbreak;\n-\t}\n-\n-\t/* restore getopt lib */\n-\toptind = old_optind;\n-\toptopt = old_optopt;\n-\toptreset = old_optreset;\n-\toptarg = old_optarg;\n-}\n-\n /* Parse the argument given in the command line of the application */\n static int\n eal_parse_args(int argc, char **argv)\ndiff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c\nindex fd422f1f62..bffeb1f34e 100644\n--- a/lib/eal/linux/eal.c\n+++ b/lib/eal/linux/eal.c\n@@ -546,45 +546,6 @@ eal_parse_vfio_vf_token(const char *vf_token)\n \treturn -1;\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-\tconst int old_optind = optind;\n-\tconst int old_optopt = optopt;\n-\tchar * const old_optarg = optarg;\n-\tstruct internal_config *internal_conf =\n-\t\teal_get_internal_configuration();\n-\n-\targvopt = argv;\n-\toptind = 1;\n-\n-\twhile ((opt = getopt_long(argc, argvopt, eal_short_options,\n-\t\t\t\t  eal_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, internal_conf) : 0;\n-\n-\t\t/* common parser is not happy */\n-\t\tif (ret < 0)\n-\t\t\tbreak;\n-\t}\n-\n-\t/* restore getopt lib */\n-\toptind = old_optind;\n-\toptopt = old_optopt;\n-\toptarg = old_optarg;\n-}\n-\n static int\n eal_parse_huge_worker_stack(const char *arg)\n {\ndiff --git a/lib/eal/windows/eal.c b/lib/eal/windows/eal.c\nindex 8ca00c0f95..44e20643f2 100644\n--- a/lib/eal/windows/eal.c\n+++ b/lib/eal/windows/eal.c\n@@ -96,41 +96,6 @@ eal_usage(const char *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-\tstruct internal_config *internal_conf =\n-\t\teal_get_internal_configuration();\n-\n-\targvopt = argv;\n-\n-\teal_reset_internal_config(internal_conf);\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\tinternal_conf) : 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 static int\n eal_parse_args(int argc, char **argv)\n",
    "prefixes": [
        "v19",
        "05/15"
    ]
}