get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105574,
    "url": "http://patches.dpdk.org/api/patches/105574/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211223100741.21292-1-chenzhiheng0227@gmail.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": "<20211223100741.21292-1-chenzhiheng0227@gmail.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211223100741.21292-1-chenzhiheng0227@gmail.com",
    "date": "2021-12-23T10:07:41",
    "name": "[v3] mempool: fix the description of some function return values",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "74b8f1a4df8b2f6941c7bb0c954b4c246fe1a111",
    "submitter": {
        "id": 2459,
        "url": "http://patches.dpdk.org/api/people/2459/?format=api",
        "name": "Zhiheng Chen",
        "email": "chenzhiheng0227@gmail.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/20211223100741.21292-1-chenzhiheng0227@gmail.com/mbox/",
    "series": [
        {
            "id": 21051,
            "url": "http://patches.dpdk.org/api/series/21051/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21051",
            "date": "2021-12-23T10:07:41",
            "name": "[v3] mempool: fix the description of some function return values",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/21051/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/105574/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/105574/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 27279A04A3;\n\tMon,  3 Jan 2022 15:31:24 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id BE32440042;\n\tMon,  3 Jan 2022 15:31:23 +0100 (CET)",
            "from mail-pj1-f48.google.com (mail-pj1-f48.google.com\n [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id D507840DDA\n for <dev@dpdk.org>; Thu, 23 Dec 2021 11:08:20 +0100 (CET)",
            "by mail-pj1-f48.google.com with SMTP id\n rj2-20020a17090b3e8200b001b1944bad25so5197372pjb.5\n for <dev@dpdk.org>; Thu, 23 Dec 2021 02:08:20 -0800 (PST)",
            "from localhost.localdomain ([223.223.179.210])\n by smtp.gmail.com with ESMTPSA id h5sm5339011pfi.46.2021.12.23.02.08.17\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 23 Dec 2021 02:08:19 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n h=from:to:cc:subject:date:message-id:in-reply-to:references;\n bh=VpdOoId11OHwprolO3yIi9c8U1/x2B7wfDsfQ0jXwD0=;\n b=K9U5mrh+i2khvsAe3WrA7oJhewP9qCdIUtw7WoIyoTdobTDO60wDYvlvkeWzltEF3z\n ERq926WsgopgQg6rJBapyAW311th32JlP65hZsAPjOTDP8eRKdbbeBA/dYEybFU8ty2g\n yHST1f91yKRJXQzCQH4xqM5s4Mb9gAwc7KJgekIQkdql4m5Qw9iA2AX1yK3RTN+t1hXe\n D48t2tZFLGx/0jA1SpKF1Xit5dfugEvgYMsH5o6UECetIK4Pvxhcxllor3V93xdjUiKc\n V3nOM86QTmoHVw2kC1GNyoZUeHDvoERuN+ohsiOFiKZqOCyJOHQyseTiyX+e0qrW7FUK\n m7Ew==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references;\n bh=VpdOoId11OHwprolO3yIi9c8U1/x2B7wfDsfQ0jXwD0=;\n b=qP+nc1qDRzTRt1SW13tRUtFeYSuYtyZfV7fuo2Pfhej6erY7qaodk5/GNsGrDU0Ir/\n Ezlss1I3Wh1xenO5roEArEm8x5P4UxUQpsVrVVyDDks+3qR3F1gyHjvki99biUWHAA5X\n H3JGFYvT1crMFty06IaCYfQD0jahVywUZTzfyjpygUlXn5bvCpMA/JtT1RXnDRSjDVmw\n jvgDTy8qcjkY3NrpBTNdkHXKB7RKZ6rGGls152dhMSdAwMftNfeADixtG8JTZHlvn152\n g/WWKnvembqACJ2C9k5p4ei4l9nS/V/C5duZr8vP4QcqDrCmkObS/FcoEBnEllCduvSU\n 8zhw==",
        "X-Gm-Message-State": "AOAM532VlelS5LJN95AYQnwx+Un86KHjzbwKD4acYqExJLMiDXijhcgs\n Ff9+Gy3fnmI2FZpm9VIAeyA=",
        "X-Google-Smtp-Source": "\n ABdhPJzaEKqGWfgG9GvoGcVUsVJ15ucpNsBRCh+amkDfzDp53PulxKaKT9HBVwkoDyfpafvVThgPLQ==",
        "X-Received": "by 2002:a17:903:244e:b0:149:21a5:6033 with SMTP id\n l14-20020a170903244e00b0014921a56033mr1703349pls.37.1640254099914;\n Thu, 23 Dec 2021 02:08:19 -0800 (PST)",
        "From": "Zhiheng Chen <chenzhiheng0227@gmail.com>",
        "To": "Olivier Matz <olivier.matz@6wind.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "Cc": "dev@dpdk.org,\n\tZhiheng Chen <chenzhiheng0227@gmail.com>",
        "Subject": "[PATCH v3] mempool: fix the description of some function return\n values",
        "Date": "Thu, 23 Dec 2021 10:07:41 +0000",
        "Message-Id": "<20211223100741.21292-1-chenzhiheng0227@gmail.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20211222082550.436-1-chenzhiheng0227@gmail.com>",
        "References": "<20211222082550.436-1-chenzhiheng0227@gmail.com>",
        "X-Mailman-Approved-At": "Mon, 03 Jan 2022 15:31:22 +0100",
        "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": "In rte_mempool_ring.c, the committer uses the symbol ENOBUFS to\ndescribe the return value of function common_ring_sc_dequeue,\nbut in rte_mempool.h, the symbol ENOENT is used to describe\nthe return value of function rte_mempool_get. If the user of\ndpdk uses the symbol ENOENT as the judgment condition of\nthe return value, it may cause some abnormal phenomena\nin their own programs, such as when the mempool space is exhausted.\n\nv2:\n* Update the descriptions of underlying functions.\n\nv3:\n* Correct the description that the return value cannot be greater than 0\n* Update the description of the dequeue function prototype\n\nSigned-off-by: Zhiheng Chen <chenzhiheng0227@gmail.com>\n---\n lib/mempool/rte_mempool.h | 34 ++++++++++++++++++++++------------\n 1 file changed, 22 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h\nindex 1e7a3c1527..cae81d8a32 100644\n--- a/lib/mempool/rte_mempool.h\n+++ b/lib/mempool/rte_mempool.h\n@@ -447,6 +447,16 @@ typedef int (*rte_mempool_enqueue_t)(struct rte_mempool *mp,\n \n /**\n  * Dequeue an object from the external pool.\n+ *\n+ * @param mp\n+ *   Pointer to the memory pool.\n+ * @param obj_table\n+ *   Pointer to a table of void * pointers (objects).\n+ * @param n\n+ *   Number of objects to get.\n+ * @return\n+ *   - 0: Success; got n objects.\n+ *   - -ENOBUFS: Not enough entries in the mempool; no object is retrieved.\n  */\n typedef int (*rte_mempool_dequeue_t)(struct rte_mempool *mp,\n \t\tvoid **obj_table, unsigned int n);\n@@ -738,7 +748,7 @@ rte_mempool_ops_alloc(struct rte_mempool *mp);\n  *   Number of objects to get.\n  * @return\n  *   - 0: Success; got n objects.\n- *   - <0: Error; code of dequeue function.\n+ *   - -ENOBUFS: Not enough entries in the mempool; no object is retrieved.\n  */\n static inline int\n rte_mempool_ops_dequeue_bulk(struct rte_mempool *mp,\n@@ -1452,8 +1462,8 @@ rte_mempool_put(struct rte_mempool *mp, void *obj)\n  * @param cache\n  *   A pointer to a mempool cache structure. May be NULL if not needed.\n  * @return\n- *   - >=0: Success; number of objects supplied.\n- *   - <0: Error; code of ring dequeue function.\n+ *   - 0: Success; got n objects.\n+ *   - -ENOBUFS: Not enough entries in the mempool; no object is retrieved.\n  */\n static __rte_always_inline int\n rte_mempool_do_generic_get(struct rte_mempool *mp, void **obj_table,\n@@ -1521,7 +1531,7 @@ rte_mempool_do_generic_get(struct rte_mempool *mp, void **obj_table,\n  * Get several objects from the mempool.\n  *\n  * If cache is enabled, objects will be retrieved first from cache,\n- * subsequently from the common pool. Note that it can return -ENOENT when\n+ * subsequently from the common pool. Note that it can return -ENOBUFS when\n  * the local cache and common pool are empty, even if cache from other\n  * lcores are full.\n  *\n@@ -1534,8 +1544,8 @@ rte_mempool_do_generic_get(struct rte_mempool *mp, void **obj_table,\n  * @param cache\n  *   A pointer to a mempool cache structure. May be NULL if not needed.\n  * @return\n- *   - 0: Success; objects taken.\n- *   - -ENOENT: Not enough entries in the mempool; no object is retrieved.\n+ *   - 0: Success; got n objects.\n+ *   - -ENOBUFS: Not enough entries in the mempool; no object is retrieved.\n  */\n static __rte_always_inline int\n rte_mempool_generic_get(struct rte_mempool *mp, void **obj_table,\n@@ -1557,7 +1567,7 @@ rte_mempool_generic_get(struct rte_mempool *mp, void **obj_table,\n  * mempool creation time (see flags).\n  *\n  * If cache is enabled, objects will be retrieved first from cache,\n- * subsequently from the common pool. Note that it can return -ENOENT when\n+ * subsequently from the common pool. Note that it can return -ENOBUFS when\n  * the local cache and common pool are empty, even if cache from other\n  * lcores are full.\n  *\n@@ -1568,8 +1578,8 @@ rte_mempool_generic_get(struct rte_mempool *mp, void **obj_table,\n  * @param n\n  *   The number of objects to get from the mempool to obj_table.\n  * @return\n- *   - 0: Success; objects taken\n- *   - -ENOENT: Not enough entries in the mempool; no object is retrieved.\n+ *   - 0: Success; got n objects.\n+ *   - -ENOBUFS: Not enough entries in the mempool; no object is retrieved.\n  */\n static __rte_always_inline int\n rte_mempool_get_bulk(struct rte_mempool *mp, void **obj_table, unsigned int n)\n@@ -1588,7 +1598,7 @@ rte_mempool_get_bulk(struct rte_mempool *mp, void **obj_table, unsigned int n)\n  * mempool creation (see flags).\n  *\n  * If cache is enabled, objects will be retrieved first from cache,\n- * subsequently from the common pool. Note that it can return -ENOENT when\n+ * subsequently from the common pool. Note that it can return -ENOBUFS when\n  * the local cache and common pool are empty, even if cache from other\n  * lcores are full.\n  *\n@@ -1597,8 +1607,8 @@ rte_mempool_get_bulk(struct rte_mempool *mp, void **obj_table, unsigned int n)\n  * @param obj_p\n  *   A pointer to a void * pointer (object) that will be filled.\n  * @return\n- *   - 0: Success; objects taken.\n- *   - -ENOENT: Not enough entries in the mempool; no object is retrieved.\n+ *   - 0: Success; got n objects.\n+ *   - -ENOBUFS: Not enough entries in the mempool; no object is retrieved.\n  */\n static __rte_always_inline int\n rte_mempool_get(struct rte_mempool *mp, void **obj_p)\n",
    "prefixes": [
        "v3"
    ]
}