get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 34902,
    "url": "http://patches.dpdk.org/api/patches/34902/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1517627510-60932-1-git-send-email-malleshx.koujalagi@intel.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": "<1517627510-60932-1-git-send-email-malleshx.koujalagi@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1517627510-60932-1-git-send-email-malleshx.koujalagi@intel.com",
    "date": "2018-02-03T03:11:50",
    "name": "[dpdk-dev] net/null: Support bulk alloc and free.",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ff8ee3c3f16d90f0bb940ec8220b40246a82d2e0",
    "submitter": {
        "id": 967,
        "url": "http://patches.dpdk.org/api/people/967/?format=api",
        "name": "Mallesh Koujalagi",
        "email": "malleshx.koujalagi@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1517627510-60932-1-git-send-email-malleshx.koujalagi@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/34902/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/34902/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 4AA2E1E34;\n\tSat,  3 Feb 2018 04:43:22 +0100 (CET)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 89D2D1B19\n\tfor <dev@dpdk.org>; Sat,  3 Feb 2018 04:43:20 +0100 (CET)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t02 Feb 2018 19:43:19 -0800",
            "from dna-skx3.jf.intel.com ([10.54.81.137])\n\tby orsmga008.jf.intel.com with ESMTP; 02 Feb 2018 19:43:18 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.46,452,1511856000\"; d=\"scan'208\";a=\"15123315\"",
        "From": "Mallesh Koujalagi <malleshx.koujalagi@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "mtetsuyah@gmail.com, ferruh.yigit@intel.com, malleshx.koujalagi@intel.com",
        "Date": "Fri,  2 Feb 2018 19:11:50 -0800",
        "Message-Id": "<1517627510-60932-1-git-send-email-malleshx.koujalagi@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "Subject": "[dpdk-dev] [PATCH] net/null: Support bulk alloc and free.",
        "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "After bulk allocation and freeing of multiple mbufs increase more than ~2%\nthroughput on single core.\n\nSigned-off-by: Mallesh Koujalagi <malleshx.koujalagi@intel.com>\n---\n drivers/net/null/rte_eth_null.c | 16 +++++++---------\n 1 file changed, 7 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c\nindex 9385ffd..247ede0 100644\n--- a/drivers/net/null/rte_eth_null.c\n+++ b/drivers/net/null/rte_eth_null.c\n@@ -130,10 +130,11 @@ eth_null_copy_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)\n \t\treturn 0;\n \n \tpacket_size = h->internals->packet_size;\n+\n+\tif (rte_pktmbuf_alloc_bulk(h->mb_pool, bufs, nb_bufs) != 0)\n+\t\treturn 0;\n+\n \tfor (i = 0; i < nb_bufs; i++) {\n-\t\tbufs[i] = rte_pktmbuf_alloc(h->mb_pool);\n-\t\tif (!bufs[i])\n-\t\t\tbreak;\n \t\trte_memcpy(rte_pktmbuf_mtod(bufs[i], void *), h->dummy_packet,\n \t\t\t\t\tpacket_size);\n \t\tbufs[i]->data_len = (uint16_t)packet_size;\n@@ -149,18 +150,15 @@ eth_null_copy_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)\n static uint16_t\n eth_null_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)\n {\n-\tint i;\n \tstruct null_queue *h = q;\n \n \tif ((q == NULL) || (bufs == NULL))\n \t\treturn 0;\n \n-\tfor (i = 0; i < nb_bufs; i++)\n-\t\trte_pktmbuf_free(bufs[i]);\n+\trte_mempool_put_bulk(bufs[0]->pool, (void **)bufs, nb_bufs);\n+\trte_atomic64_add(&h->tx_pkts, nb_bufs);\n \n-\trte_atomic64_add(&(h->tx_pkts), i);\n-\n-\treturn i;\n+\treturn nb_bufs;\n }\n \n static uint16_t\n",
    "prefixes": [
        "dpdk-dev"
    ]
}