get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 55213,
    "url": "http://patches.dpdk.org/api/patches/55213/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190622132417.32694-25-jerinj@marvell.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": "<20190622132417.32694-25-jerinj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190622132417.32694-25-jerinj@marvell.com",
    "date": "2019-06-22T13:24:14",
    "name": "[v4,24/27] mempool/octeontx2: add fast path mempool ops",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "fe5eadde8b0771e35552e6344d73b63315b58c3b",
    "submitter": {
        "id": 1188,
        "url": "http://patches.dpdk.org/api/people/1188/?format=api",
        "name": "Jerin Jacob Kollanukkaran",
        "email": "jerinj@marvell.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/20190622132417.32694-25-jerinj@marvell.com/mbox/",
    "series": [
        {
            "id": 5124,
            "url": "http://patches.dpdk.org/api/series/5124/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5124",
            "date": "2019-06-22T13:23:50",
            "name": "OCTEON TX2 common and mempool driver",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/5124/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/55213/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/55213/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 01F8D1C5E5;\n\tSat, 22 Jun 2019 15:26:32 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id C59251C5E7\n\tfor <dev@dpdk.org>; Sat, 22 Jun 2019 15:25:42 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n\tby mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id\n\tx5MDOgd0028293; Sat, 22 Jun 2019 06:25:41 -0700",
            "from sc-exch02.marvell.com ([199.233.58.182])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2t9hpnrgh5-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tSat, 22 Jun 2019 06:25:41 -0700",
            "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com\n\t(10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tSat, 22 Jun 2019 06:25:40 -0700",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com\n\t(10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n\tTransport; Sat, 22 Jun 2019 06:25:40 -0700",
            "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n\tby maili.marvell.com (Postfix) with ESMTP id A0FDF3F703F;\n\tSat, 22 Jun 2019 06:25:38 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n\th=from : to : cc :\n\tsubject : date : message-id : in-reply-to : references : mime-version\n\t: content-transfer-encoding : content-type; s=pfpt0818;\n\tbh=jiWT5QHScUCKPMSg/Psb/s+4xwac8obAKtGqZlCFPls=;\n\tb=QCMzEtYs+mfdrR8J4ti8gHXgxF4WC7chyPEu0ZDlZnx/pn2zYkPlXj2TSfVfbT4mCFD2\n\tdFOviDJfaUARzBG+WwdIfBC/9MWBM8LS1pyiPjiYGXdyFmLVzB/U8dg8WSMGU5B+T8cI\n\t6DltrbH/eSLfnLk2RCIbJmT/sSqjfirsoJ3p5PQxeBzmLJ15M2JDSO6Oeoyk6FjUT6cG\n\tvRkK47JzSqOoz/hLRekOd/4dRYawPJSlVsRDfI5QpT5mDhbfNW6aailVN4Sy055ar9cW\n\tgI6rcFf4Vj6qu8VzA4aZ1FEVhK+kyotEIa01sb45AW4BcKZcWikBZHifVEnUeXZ6p1tw\n\thA== ",
        "From": "<jerinj@marvell.com>",
        "To": "Jerin Jacob <jerinj@marvell.com>, Nithin Dabilpuram\n\t<ndabilpuram@marvell.com>, Vamsi Attunuru <vattunuru@marvell.com>",
        "CC": "<dev@dpdk.org>, Olivier Matz <olivier.matz@6wind.com>, Pavan Nikhilesh\n\t<pbhagavatula@marvell.com>",
        "Date": "Sat, 22 Jun 2019 18:54:14 +0530",
        "Message-ID": "<20190622132417.32694-25-jerinj@marvell.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190622132417.32694-1-jerinj@marvell.com>",
        "References": "<20190617155537.36144-1-jerinj@marvell.com>\n\t<20190622132417.32694-1-jerinj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:, ,\n\tdefinitions=2019-06-22_09:, , signatures=0",
        "Subject": "[dpdk-dev] [PATCH v4 24/27] mempool/octeontx2: add fast path\n\tmempool ops",
        "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": "From: Jerin Jacob <jerinj@marvell.com>\n\nAdd enqueue and dequeue mempool fastpath operations.\n\nCc: Olivier Matz <olivier.matz@6wind.com>\n\nSigned-off-by: Jerin Jacob <jerinj@marvell.com>\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n drivers/mempool/octeontx2/otx2_mempool_ops.c | 57 ++++++++++++++++++++\n 1 file changed, 57 insertions(+)",
    "diff": "diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c\nindex 966b7d7f1..c59bd73c0 100644\n--- a/drivers/mempool/octeontx2/otx2_mempool_ops.c\n+++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c\n@@ -7,6 +7,61 @@\n \n #include \"otx2_mempool.h\"\n \n+static int __hot\n+otx2_npa_enq(struct rte_mempool *mp, void * const *obj_table, unsigned int n)\n+{\n+\tunsigned int index; const uint64_t aura_handle = mp->pool_id;\n+\tconst uint64_t reg = npa_lf_aura_handle_to_aura(aura_handle);\n+\tconst uint64_t addr = npa_lf_aura_handle_to_base(aura_handle) +\n+\t\t\t\t NPA_LF_AURA_OP_FREE0;\n+\n+\tfor (index = 0; index < n; index++)\n+\t\totx2_store_pair((uint64_t)obj_table[index], reg, addr);\n+\n+\treturn 0;\n+}\n+\n+static __rte_noinline int\n+npa_lf_aura_op_alloc_one(const int64_t wdata, int64_t * const addr,\n+\t\t\t void **obj_table, uint8_t i)\n+{\n+\tuint8_t retry = 4;\n+\n+\tdo {\n+\t\tobj_table[i] = (void *)otx2_atomic64_add_nosync(wdata, addr);\n+\t\tif (obj_table[i] != NULL)\n+\t\t\treturn 0;\n+\n+\t} while (retry--);\n+\n+\treturn -ENOENT;\n+}\n+\n+static inline int __hot\n+otx2_npa_deq(struct rte_mempool *mp, void **obj_table, unsigned int n)\n+{\n+\tconst int64_t wdata = npa_lf_aura_handle_to_aura(mp->pool_id);\n+\tunsigned int index;\n+\tuint64_t obj;\n+\n+\tint64_t * const addr = (int64_t * const)\n+\t\t\t(npa_lf_aura_handle_to_base(mp->pool_id) +\n+\t\t\t\tNPA_LF_AURA_OP_ALLOCX(0));\n+\tfor (index = 0; index < n; index++, obj_table++) {\n+\t\tobj = npa_lf_aura_op_alloc_one(wdata, addr, obj_table, 0);\n+\t\tif (obj == 0) {\n+\t\t\tfor (; index > 0; index--) {\n+\t\t\t\tobj_table--;\n+\t\t\t\totx2_npa_enq(mp, obj_table, 1);\n+\t\t\t}\n+\t\t\treturn -ENOENT;\n+\t\t}\n+\t\t*obj_table = (void *)obj;\n+\t}\n+\n+\treturn 0;\n+}\n+\n static unsigned int\n otx2_npa_get_count(const struct rte_mempool *mp)\n {\n@@ -404,9 +459,11 @@ static struct rte_mempool_ops otx2_npa_ops = {\n \t.name = \"octeontx2_npa\",\n \t.alloc = otx2_npa_alloc,\n \t.free = otx2_npa_free,\n+\t.enqueue = otx2_npa_enq,\n \t.get_count = otx2_npa_get_count,\n \t.calc_mem_size = otx2_npa_calc_mem_size,\n \t.populate = otx2_npa_populate,\n+\t.dequeue = otx2_npa_deq,\n };\n \n MEMPOOL_REGISTER_OPS(otx2_npa_ops);\n",
    "prefixes": [
        "v4",
        "24/27"
    ]
}