get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 123632,
    "url": "http://patches.dpdk.org/api/patches/123632/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230210010724.890413-8-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": "<20230210010724.890413-8-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230210010724.890413-8-stephen@networkplumber.org",
    "date": "2023-02-10T01:07:15",
    "name": "[v3,07/16] ring: replace RTE_LOGTYPE_RING with dynamic type",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "dd9db4bebbde099cf8cf0fcfc518c62e8b9df510",
    "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/20230210010724.890413-8-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 26935,
            "url": "http://patches.dpdk.org/api/series/26935/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=26935",
            "date": "2023-02-10T01:07:08",
            "name": "Replace use of static logtypes",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/26935/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/123632/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/123632/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 8D12241C58;\n\tFri, 10 Feb 2023 02:08:42 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7C36442D32;\n\tFri, 10 Feb 2023 02:08:15 +0100 (CET)",
            "from mail-pj1-f42.google.com (mail-pj1-f42.google.com\n [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 4726142BC9\n for <dev@dpdk.org>; Fri, 10 Feb 2023 02:08:10 +0100 (CET)",
            "by mail-pj1-f42.google.com with SMTP id mi9so3717038pjb.4\n for <dev@dpdk.org>; Thu, 09 Feb 2023 17:08:10 -0800 (PST)",
            "from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218])\n by smtp.gmail.com with ESMTPSA id\n jd9-20020a170903260900b0019625428cefsm2103023plb.281.2023.02.09.17.08.08\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 09 Feb 2023 17:08:08 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20210112.gappssmtp.com; s=20210112;\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=TGI+362xtBNoVKpNbOlux/TIyZ9au9Qd1CJOZexwK04=;\n b=MVB1ny/eBuG0kTLB38PU7gYex/gj53ulFRuTKhjloOXHSLtjoTy6PVDqtP/qQEpgMD\n ADIb4DUmM7jVvrmnj/QXWo/NX6kgOVzHGv6RPfaMyZIYQSE7P2v0/JQZXjlqyExIkeiD\n ai7Tj55MU+ocWm3JK43YSA4lvs6UEs439XtFSU0ge01wxEd8ZT+uYIfx2lkFwknczXNx\n mnHdPa9YeQuwLddxc4LL2LZn5qvLGlDZtElMDiTTP66SA6rbhkqTc6MLWfVjE7RoC9dC\n qFmCkPNQpiy4zJ9NavKUHshDcHbIPOhJzinMNAen1ByUutnQIzFLMa1vC+rj7vWTcAKq\n 9P3A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\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=TGI+362xtBNoVKpNbOlux/TIyZ9au9Qd1CJOZexwK04=;\n b=K2/6WBwMC1dz/wa6sT3OIT/H3d28l1gtRmhHg+ZtglZqS81eFA555+Opt1Luo47zDu\n AYV13BscD1e2RMrfbnogylSUyGeZtcFBSGOlxnO6uBiI79TZBN4Wxm6jL6YXv6paIYwT\n e9l/NBh1hI5xebF4djLfvlAiES7IsSYXu+e12UvJxqYzjIM8C17NUIfCYKlZfJDGRV+B\n vXJV4pz2j5+KIUvfEoGSZvFIJ4NctH9FtrdqOOiH1dH6+SgGEaIK32kQIMNzzjroUwe6\n EuriRa5OzYNFzMfsNffNCJz7wwgrZipvSh/klAVCKw3M5OUoa+c+kqzCflfogeVub31W\n gBRg==",
        "X-Gm-Message-State": "AO0yUKVpV7B919bBcGjDI0IQs48hr7m++g+i4kHHO0Sg46WL8p+PLjLh\n HLpvKfP9zGpKN20OJmmbGG7X5tLTsvBY0G04N+k=",
        "X-Google-Smtp-Source": "\n AK7set8KIMlrQh4z667t+qg0ESX2H8URtn+ZI8g//vnX3oG/PdKY0GGW1fj59kS/aDnMVdSky7Jjhg==",
        "X-Received": "by 2002:a17:902:ec90:b0:198:dae9:5f58 with SMTP id\n x16-20020a170902ec9000b00198dae95f58mr7997508plg.14.1675991289350;\n Thu, 09 Feb 2023 17:08:09 -0800 (PST)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,\n Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>",
        "Subject": "[PATCH v3 07/16] ring: replace RTE_LOGTYPE_RING with dynamic type",
        "Date": "Thu,  9 Feb 2023 17:07:15 -0800",
        "Message-Id": "<20230210010724.890413-8-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.39.1",
        "In-Reply-To": "<20230210010724.890413-1-stephen@networkplumber.org>",
        "References": "<20230207204151.1503491-1-stephen@networkplumber.org>\n <20230210010724.890413-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 logtype for ring only used in library.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/eal/common/eal_common_log.c |  1 -\n lib/eal/include/rte_log.h       |  2 +-\n lib/ring/rte_ring.c             | 31 +++++++++++++++++++------------\n 3 files changed, 20 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/lib/eal/common/eal_common_log.c b/lib/eal/common/eal_common_log.c\nindex 7dbf1df3b979..04c9d43351da 100644\n--- a/lib/eal/common/eal_common_log.c\n+++ b/lib/eal/common/eal_common_log.c\n@@ -349,7 +349,6 @@ struct logtype {\n \n static const struct logtype logtype_strings[] = {\n \t{RTE_LOGTYPE_EAL,        \"lib.eal\"},\n-\t{RTE_LOGTYPE_RING,       \"lib.ring\"},\n \t{RTE_LOGTYPE_MEMPOOL,    \"lib.mempool\"},\n \t{RTE_LOGTYPE_PMD,        \"pmd\"},\n \t{RTE_LOGTYPE_HASH,       \"lib.hash\"},\ndiff --git a/lib/eal/include/rte_log.h b/lib/eal/include/rte_log.h\nindex 5b7850af4e2b..a99fe383c89b 100644\n--- a/lib/eal/include/rte_log.h\n+++ b/lib/eal/include/rte_log.h\n@@ -28,7 +28,7 @@ extern \"C\" {\n /* SDK log type */\n #define RTE_LOGTYPE_EAL        0 /**< Log related to eal. */\n \t\t\t\t /* was RTE_LOGTYPE_MALLOC */\n-#define RTE_LOGTYPE_RING       2 /**< Log related to ring. */\n+\t\t\t\t /* was RTE_LOGTYPE_RING */\n #define RTE_LOGTYPE_MEMPOOL    3 /**< Log related to mempool. */\n \t\t\t\t /* was RTE_LOGTYPE_TIMER */\n #define RTE_LOGTYPE_PMD        5 /**< Log related to poll mode driver. */\ndiff --git a/lib/ring/rte_ring.c b/lib/ring/rte_ring.c\nindex cddaf6b2876f..1b4633468a2a 100644\n--- a/lib/ring/rte_ring.c\n+++ b/lib/ring/rte_ring.c\n@@ -26,6 +26,13 @@\n #include \"rte_ring.h\"\n #include \"rte_ring_elem.h\"\n \n+RTE_LOG_REGISTER_DEFAULT(ring_logtype, INFO);\n+\n+#define RING_LOG(level, fmt, args...)\t\t\t\\\n+\trte_log(RTE_LOG_ ## level, ring_logtype,\t\\\n+\t\t\"%s(): \" fmt \"\\n\", __func__, ##args)\n+\n+\n TAILQ_HEAD(rte_ring_list, rte_tailq_entry);\n \n static struct rte_tailq_elem rte_ring_tailq = {\n@@ -52,15 +59,15 @@ rte_ring_get_memsize_elem(unsigned int esize, unsigned int count)\n \n \t/* Check if element size is a multiple of 4B */\n \tif (esize % 4 != 0) {\n-\t\tRTE_LOG(ERR, RING, \"element size is not a multiple of 4\\n\");\n+\t\tRING_LOG(ERR, \"element size is not a multiple of 4\");\n \n \t\treturn -EINVAL;\n \t}\n \n \t/* count must be a power of 2 */\n \tif ((!POWEROF2(count)) || (count > RTE_RING_SZ_MASK )) {\n-\t\tRTE_LOG(ERR, RING,\n-\t\t\t\"Requested number of elements is invalid, must be power of 2, and not exceed %u\\n\",\n+\t\tRING_LOG(ERR,\n+\t\t\t\"Requested number of elements is invalid, must be power of 2, and not exceed %u\",\n \t\t\tRTE_RING_SZ_MASK);\n \n \t\treturn -EINVAL;\n@@ -195,8 +202,8 @@ rte_ring_init(struct rte_ring *r, const char *name, unsigned int count,\n \n \t/* future proof flags, only allow supported values */\n \tif (flags & ~RING_F_MASK) {\n-\t\tRTE_LOG(ERR, RING,\n-\t\t\t\"Unsupported flags requested %#x\\n\", flags);\n+\t\tRING_LOG(ERR,\n+\t\t\t\"Unsupported flags requested %#x\", flags);\n \t\treturn -EINVAL;\n \t}\n \n@@ -216,8 +223,8 @@ rte_ring_init(struct rte_ring *r, const char *name, unsigned int count,\n \t\tr->capacity = count;\n \t} else {\n \t\tif ((!POWEROF2(count)) || (count > RTE_RING_SZ_MASK)) {\n-\t\t\tRTE_LOG(ERR, RING,\n-\t\t\t\t\"Requested size is invalid, must be power of 2, and not exceed the size limit %u\\n\",\n+\t\t\tRING_LOG(ERR,\n+\t\t\t\t\"Requested size is invalid, must be power of 2, and not exceed the size limit %u\",\n \t\t\t\tRTE_RING_SZ_MASK);\n \t\t\treturn -EINVAL;\n \t\t}\n@@ -271,7 +278,7 @@ rte_ring_create_elem(const char *name, unsigned int esize, unsigned int count,\n \n \tte = rte_zmalloc(\"RING_TAILQ_ENTRY\", sizeof(*te), 0);\n \tif (te == NULL) {\n-\t\tRTE_LOG(ERR, RING, \"Cannot reserve memory for tailq\\n\");\n+\t\tRING_LOG(ERR, \"Cannot reserve memory for tailq\");\n \t\trte_errno = ENOMEM;\n \t\treturn NULL;\n \t}\n@@ -295,7 +302,7 @@ rte_ring_create_elem(const char *name, unsigned int esize, unsigned int count,\n \t\tTAILQ_INSERT_TAIL(ring_list, te, next);\n \t} else {\n \t\tr = NULL;\n-\t\tRTE_LOG(ERR, RING, \"Cannot reserve memory\\n\");\n+\t\tRING_LOG(ERR, \"Cannot reserve memory\");\n \t\trte_free(te);\n \t}\n \trte_mcfg_tailq_write_unlock();\n@@ -327,13 +334,13 @@ rte_ring_free(struct rte_ring *r)\n \t * therefore, there is no memzone to free.\n \t */\n \tif (r->memzone == NULL) {\n-\t\tRTE_LOG(ERR, RING,\n-\t\t\t\"Cannot free ring, not created with rte_ring_create()\\n\");\n+\t\tRING_LOG(ERR,\n+\t\t\t \"Cannot free ring, not created with rte_ring_create()\");\n \t\treturn;\n \t}\n \n \tif (rte_memzone_free(r->memzone) != 0) {\n-\t\tRTE_LOG(ERR, RING, \"Cannot free memory\\n\");\n+\t\tRING_LOG(ERR, \"Cannot free memory\");\n \t\treturn;\n \t}\n \n",
    "prefixes": [
        "v3",
        "07/16"
    ]
}