get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 77869,
    "url": "http://patches.dpdk.org/api/patches/77869/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200916081747.124520-2-mb@smartsharesystems.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": "<20200916081747.124520-2-mb@smartsharesystems.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200916081747.124520-2-mb@smartsharesystems.com",
    "date": "2020-09-16T08:17:47",
    "name": "[1/1] mbuf: minor cleanup",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e89a841a67d7cc2c516ed4da6a87d4675e74970f",
    "submitter": {
        "id": 591,
        "url": "http://patches.dpdk.org/api/people/591/?format=api",
        "name": "Morten Brørup",
        "email": "mb@smartsharesystems.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200916081747.124520-2-mb@smartsharesystems.com/mbox/",
    "series": [
        {
            "id": 12264,
            "url": "http://patches.dpdk.org/api/series/12264/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12264",
            "date": "2020-09-16T08:17:46",
            "name": "mbuf: minor cleanup",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/12264/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/77869/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/77869/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 49CB8A04C7;\n\tWed, 16 Sep 2020 10:18:01 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E129C1C1E3;\n\tWed, 16 Sep 2020 10:17:56 +0200 (CEST)",
            "from smartserver.smartsharesystems.com\n (smartserver.smartsharesystems.com [77.243.40.215])\n by dpdk.org (Postfix) with ESMTP id C37E21C1CC\n for <dev@dpdk.org>; Wed, 16 Sep 2020 10:17:53 +0200 (CEST)",
            "from dkrd2.smartsharesys.local ([192.168.4.12]) by\n smartserver.smartsharesystems.com with Microsoft SMTPSVC(6.0.3790.4675);\n Wed, 16 Sep 2020 10:17:52 +0200"
        ],
        "From": "=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>",
        "To": "olivier.matz@6wind.com,\n\tthomas@monjalon.net",
        "Cc": "dev@dpdk.org, =?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>",
        "Date": "Wed, 16 Sep 2020 10:17:47 +0200",
        "Message-Id": "<20200916081747.124520-2-mb@smartsharesystems.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200916081747.124520-1-mb@smartsharesystems.com>",
        "References": "<20200916081747.124520-1-mb@smartsharesystems.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-OriginalArrivalTime": "16 Sep 2020 08:17:52.0789 (UTC)\n FILETIME=[DF941C50:01D68C01]",
        "Subject": "[dpdk-dev] [PATCH 1/1] mbuf: minor cleanup",
        "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": "The mbuf header files had some commenting style errors that affected the\nAPI documentation.\nAlso, the RTE_ prefix was missing on a macro and a definition.\n\nNote: This patch does not touch the offload and attachment flags that are\nalso missing the RTE_ prefix.\n\nChanges only affecting documentation:\n* Removed the MBUF_INVALID_PORT definition from rte_mbuf.h; it is\n  already defined in rte_mbuf_core.h.\n  This removal also reestablished the description of the\n  rte_pktmbuf_reset() function.\n* Corrected the comment related to RTE_MBUF_MAX_NB_SEGS.\n* Corrected the comment related to PKT_TX_QINQ_PKT.\n\nChanges regarding missing RTE_ prefix:\n* Converted the MBUF_RAW_ALLOC_CHECK() macro to an\n  __rte_mbuf_raw_sanity_check() inline function.\n  Added backwards compatible macro with the original name.\n* Renamed the MBUF_INVALID_PORT definition to RTE_MBUF_PORT_INVALID.\n  Added backwards compatible definition with the original name.\n\nSigned-off-by: Morten Brørup <mb@smartsharesystems.com>\n---\n lib/librte_mbuf/rte_mbuf.h      | 47 ++++++++++++++++++++-------------\n lib/librte_mbuf/rte_mbuf_core.h |  9 ++++---\n 2 files changed, 35 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\nindex 7259575a7..ec48da67d 100644\n--- a/lib/librte_mbuf/rte_mbuf.h\n+++ b/lib/librte_mbuf/rte_mbuf.h\n@@ -554,12 +554,28 @@ __rte_experimental\n int rte_mbuf_check(const struct rte_mbuf *m, int is_header,\n \t\t   const char **reason);\n \n-#define MBUF_RAW_ALLOC_CHECK(m) do {\t\t\t\t\\\n-\tRTE_ASSERT(rte_mbuf_refcnt_read(m) == 1);\t\t\\\n-\tRTE_ASSERT((m)->next == NULL);\t\t\t\t\\\n-\tRTE_ASSERT((m)->nb_segs == 1);\t\t\t\t\\\n-\t__rte_mbuf_sanity_check(m, 0);\t\t\t\t\\\n-} while (0)\n+/**\n+ * Sanity checks on a reinitialized mbuf.\n+ *\n+ * Check the consistency of the given reinitialized mbuf.\n+ * The function will cause a panic if corruption is detected.\n+ *\n+ * Check that the mbuf is properly reinitialized (refcnt=1, next=NULL,\n+ * nb_segs=1), as done by rte_pktmbuf_prefree_seg().\n+ *\n+ * @param m\n+ *   The mbuf to be checked.\n+ */\n+static __rte_always_inline void\n+__rte_mbuf_raw_sanity_check(const struct rte_mbuf *m)\n+{\n+\tRTE_ASSERT(rte_mbuf_refcnt_read(m) == 1);\n+\tRTE_ASSERT(m->next == NULL);\n+\tRTE_ASSERT(m->nb_segs == 1);\n+\t__rte_mbuf_sanity_check(m, 0);\n+}\n+/** For backwards compatibility. */\n+#define MBUF_RAW_ALLOC_CHECK(m) __rte_mbuf_raw_sanity_check(m)\n \n /**\n  * Allocate an uninitialized mbuf from mempool *mp*.\n@@ -586,7 +602,7 @@ static inline struct rte_mbuf *rte_mbuf_raw_alloc(struct rte_mempool *mp)\n \n \tif (rte_mempool_get(mp, (void **)&m) < 0)\n \t\treturn NULL;\n-\tMBUF_RAW_ALLOC_CHECK(m);\n+\t__rte_mbuf_raw_sanity_check(m);\n \treturn m;\n }\n \n@@ -609,10 +625,7 @@ rte_mbuf_raw_free(struct rte_mbuf *m)\n {\n \tRTE_ASSERT(!RTE_MBUF_CLONED(m) &&\n \t\t  (!RTE_MBUF_HAS_EXTBUF(m) || RTE_MBUF_HAS_PINNED_EXTBUF(m)));\n-\tRTE_ASSERT(rte_mbuf_refcnt_read(m) == 1);\n-\tRTE_ASSERT(m->next == NULL);\n-\tRTE_ASSERT(m->nb_segs == 1);\n-\t__rte_mbuf_sanity_check(m, 0);\n+\t__rte_mbuf_raw_sanity_check(m);\n \trte_mempool_put(m->pool, m);\n }\n \n@@ -858,8 +871,6 @@ static inline void rte_pktmbuf_reset_headroom(struct rte_mbuf *m)\n  * @param m\n  *   The packet mbuf to be reset.\n  */\n-#define MBUF_INVALID_PORT UINT16_MAX\n-\n static inline void rte_pktmbuf_reset(struct rte_mbuf *m)\n {\n \tm->next = NULL;\n@@ -868,7 +879,7 @@ static inline void rte_pktmbuf_reset(struct rte_mbuf *m)\n \tm->vlan_tci = 0;\n \tm->vlan_tci_outer = 0;\n \tm->nb_segs = 1;\n-\tm->port = MBUF_INVALID_PORT;\n+\tm->port = RTE_MBUF_PORT_INVALID;\n \n \tm->ol_flags &= EXT_ATTACHED_MBUF;\n \tm->packet_type = 0;\n@@ -931,22 +942,22 @@ static inline int rte_pktmbuf_alloc_bulk(struct rte_mempool *pool,\n \tswitch (count % 4) {\n \tcase 0:\n \t\twhile (idx != count) {\n-\t\t\tMBUF_RAW_ALLOC_CHECK(mbufs[idx]);\n+\t\t\t__rte_mbuf_raw_sanity_check(mbufs[idx]);\n \t\t\trte_pktmbuf_reset(mbufs[idx]);\n \t\t\tidx++;\n \t\t\t/* fall-through */\n \tcase 3:\n-\t\t\tMBUF_RAW_ALLOC_CHECK(mbufs[idx]);\n+\t\t\t__rte_mbuf_raw_sanity_check(mbufs[idx]);\n \t\t\trte_pktmbuf_reset(mbufs[idx]);\n \t\t\tidx++;\n \t\t\t/* fall-through */\n \tcase 2:\n-\t\t\tMBUF_RAW_ALLOC_CHECK(mbufs[idx]);\n+\t\t\t__rte_mbuf_raw_sanity_check(mbufs[idx]);\n \t\t\trte_pktmbuf_reset(mbufs[idx]);\n \t\t\tidx++;\n \t\t\t/* fall-through */\n \tcase 1:\n-\t\t\tMBUF_RAW_ALLOC_CHECK(mbufs[idx]);\n+\t\t\t__rte_mbuf_raw_sanity_check(mbufs[idx]);\n \t\t\trte_pktmbuf_reset(mbufs[idx]);\n \t\t\tidx++;\n \t\t\t/* fall-through */\ndiff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h\nindex 8cd7137ac..4ac5609e3 100644\n--- a/lib/librte_mbuf/rte_mbuf_core.h\n+++ b/lib/librte_mbuf/rte_mbuf_core.h\n@@ -272,7 +272,7 @@ extern \"C\" {\n  * mbuf 'vlan_tci' & 'vlan_tci_outer' must be valid when this flag is set.\n  */\n #define PKT_TX_QINQ        (1ULL << 49)\n-/* this old name is deprecated */\n+/** This old name is deprecated. */\n #define PKT_TX_QINQ_PKT    PKT_TX_QINQ\n \n /**\n@@ -686,7 +686,7 @@ struct rte_mbuf_ext_shared_info {\n \t};\n };\n \n-/**< Maximum number of nb_segs allowed. */\n+/** Maximum number of nb_segs allowed. */\n #define RTE_MBUF_MAX_NB_SEGS\tUINT16_MAX\n \n /**\n@@ -714,7 +714,10 @@ struct rte_mbuf_ext_shared_info {\n #define RTE_MBUF_DIRECT(mb) \\\n \t(!((mb)->ol_flags & (IND_ATTACHED_MBUF | EXT_ATTACHED_MBUF)))\n \n-#define MBUF_INVALID_PORT UINT16_MAX\n+/** NULL value for the uint16_t port type. */\n+#define RTE_MBUF_PORT_INVALID UINT16_MAX\n+/** For backwards compatibility. */\n+#define MBUF_INVALID_PORT RTE_MBUF_PORT_INVALID\n \n /**\n  * A macro that points to an offset into the data in the mbuf.\n",
    "prefixes": [
        "1/1"
    ]
}