get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 60017,
    "url": "http://patchwork.dpdk.org/api/patches/60017/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190927100513.105674-3-mb@smartsharesystems.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20190927100513.105674-3-mb@smartsharesystems.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190927100513.105674-3-mb@smartsharesystems.com",
    "date": "2019-09-27T10:05:12",
    "name": "[v3,2/3] mbuf: add bulk free function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2ba4e688745e9789f6c943e941669eb686d4837c",
    "submitter": {
        "id": 591,
        "url": "http://patchwork.dpdk.org/api/people/591/?format=api",
        "name": "Morten Brørup",
        "email": "mb@smartsharesystems.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20190927100513.105674-3-mb@smartsharesystems.com/mbox/",
    "series": [
        {
            "id": 6580,
            "url": "http://patchwork.dpdk.org/api/series/6580/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=6580",
            "date": "2019-09-27T10:05:10",
            "name": "mbuf: add bulk free function",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/6580/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/60017/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/60017/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 07B391BEE3;\n\tFri, 27 Sep 2019 12:05:36 +0200 (CEST)",
            "from smartserver.smartsharesystems.com\n\t(smartserver.smartsharesystems.com [77.243.40.215])\n\tby dpdk.org (Postfix) with ESMTP id BFAF51BECB\n\tfor <dev@dpdk.org>; Fri, 27 Sep 2019 12:05:28 +0200 (CEST)",
            "from dkrd2.smartsharesys.local ([192.168.4.12]) by\n\tsmartserver.smartsharesystems.com with Microsoft\n\tSMTPSVC(6.0.3790.4675); Fri, 27 Sep 2019 12:05:28 +0200"
        ],
        "From": "=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>",
        "To": "olivier.matz@6wind.com",
        "Cc": "stephen@networkplumber.org, harry.van.haaren@intel.com,\n\tkonstantin.ananyev@intel.com, mattias.ronnblom@ericsson.com, \n\tbruce.richardson@intel.com, arybchenko@solarflare.com, dev@dpdk.org, \n\t=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>",
        "Date": "Fri, 27 Sep 2019 10:05:12 +0000",
        "Message-Id": "<20190927100513.105674-3-mb@smartsharesystems.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190927100513.105674-1-mb@smartsharesystems.com>",
        "References": "<20190927100513.105674-1-mb@smartsharesystems.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-OriginalArrivalTime": "27 Sep 2019 10:05:28.0283 (UTC)\n\tFILETIME=[16B512B0:01D5751B]",
        "Subject": "[dpdk-dev] [PATCH v3 2/3] mbuf: add bulk free function",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add function for freeing a bulk of mbufs.\n\nSigned-off-by: Morten Brørup <mb@smartsharesystems.com>\n---\n lib/librte_mbuf/rte_mbuf.c | 35 +++++++++++++++++++++++++++++++++++\n lib/librte_mbuf/rte_mbuf.h | 16 +++++-----------\n 2 files changed, 40 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c\nindex 37718d49c..b63a0eced 100644\n--- a/lib/librte_mbuf/rte_mbuf.c\n+++ b/lib/librte_mbuf/rte_mbuf.c\n@@ -245,6 +245,41 @@ int rte_mbuf_check(const struct rte_mbuf *m, int is_header,\n \treturn 0;\n }\n \n+/**\n+ * Maximum bulk of mbufs rte_pktmbuf_free_bulk() returns to mempool.\n+ */\n+#define RTE_PKTMBUF_FREE_BULK_SZ 64\n+\n+/* Free a bulk of mbufs back into their original mempools. */\n+void rte_pktmbuf_free_bulk(struct rte_mbuf **mbufs, unsigned int count)\n+{\n+\tstruct rte_mbuf *m, *free[RTE_PKTMBUF_FREE_BULK_SZ];\n+\tunsigned int idx, nb_free = 0;\n+\n+\tfor (idx = 0; idx < count; idx++) {\n+\t\tm = mbufs[idx];\n+\t\tif (unlikely(m == NULL))\n+\t\t\tcontinue;\n+\n+\t\t__rte_mbuf_sanity_check(m, 1);\n+\t\tm = rte_pktmbuf_prefree_seg(m);\n+\t\tif (unlikely(m == NULL))\n+\t\t\tcontinue;\n+\n+\t\tif (nb_free >= RTE_PKTMBUF_FREE_BULK_SZ ||\n+\t\t    (nb_free > 0 && m->pool != free[0]->pool)) {\n+\t\t\trte_mempool_put_bulk(free[0]->pool,\n+\t\t\t                     (void **)free, nb_free);\n+\t\t\tnb_free = 0;\n+\t\t}\n+\n+\t\tfree[nb_free++] = m;\n+\t}\n+\n+\tif (nb_free > 0)\n+\t\trte_mempool_put_bulk(free[0]->pool, (void **)free, nb_free);\n+}\n+\n /* dump a mbuf on console */\n void\n rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)\ndiff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\nindex f2e174da1..6910b3fe6 100644\n--- a/lib/librte_mbuf/rte_mbuf.h\n+++ b/lib/librte_mbuf/rte_mbuf.h\n@@ -1908,21 +1908,15 @@ static inline void rte_pktmbuf_free(struct rte_mbuf *m)\n }\n \n /**\n- * Free a bulk of mbufs back into their original mempool.\n+ * Free a bulk of mbufs back into their original mempools.\n  *\n  *  @param mbufs\n- *    Array of pointers to mbufs\n+ *    Array of pointers to mbufs.\n+ *    The array may contain NULL pointers.\n  *  @param count\n- *    Array size\n+ *    Array size.\n  */\n-static inline void\n-rte_pktmbuf_free_bulk(struct rte_mbuf **mbufs, unsigned count)\n-{\n-\tunsigned idx = 0;\n-\n-\tfor (idx = 0; idx < count; idx++)\n-\t\trte_pktmbuf_free(mbufs[idx]);\n-}\n+void rte_pktmbuf_free_bulk(struct rte_mbuf **mbufs, unsigned int count);\n \n /**\n  * Creates a \"clone\" of the given packet mbuf.\n",
    "prefixes": [
        "v3",
        "2/3"
    ]
}