get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 53995,
    "url": "http://patches.dpdk.org/api/patches/53995/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190601014905.45531-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": "<20190601014905.45531-25-jerinj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190601014905.45531-25-jerinj@marvell.com",
    "date": "2019-06-01T01:49:02",
    "name": "[v2,24/27] mempool/octeontx2: add fast path mempool ops",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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/20190601014905.45531-25-jerinj@marvell.com/mbox/",
    "series": [
        {
            "id": 4844,
            "url": "http://patches.dpdk.org/api/series/4844/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4844",
            "date": "2019-06-01T01:48:38",
            "name": "OCTEON TX2 common and mempool driver",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/4844/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/53995/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/53995/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 DBF501BA42;\n\tSat,  1 Jun 2019 03:50:29 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n\t[67.231.156.173]) by dpdk.org (Postfix) with ESMTP id A60901B9A8\n\tfor <dev@dpdk.org>; Sat,  1 Jun 2019 03:50:28 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n\tby mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id\n\tx511lgs1003158; Fri, 31 May 2019 18:50:27 -0700",
            "from sc-exch03.marvell.com ([199.233.58.183])\n\tby mx0b-0016f401.pphosted.com with ESMTP id 2su5xh2bwd-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tFri, 31 May 2019 18:50:27 -0700",
            "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com\n\t(10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tFri, 31 May 2019 18:50:25 -0700",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com\n\t(10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n\tTransport; Fri, 31 May 2019 18:50:25 -0700",
            "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n\tby maili.marvell.com (Postfix) with ESMTP id 667A03F7041;\n\tFri, 31 May 2019 18:50:24 -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=VUGR2xQ6/HGLqCPpQaNu/MAlsOUCswbFUEhDiJ0BZ38/vhw5XIbWXfLvdhgyjW8ypsEB\n\tT+dHCog+e3LrXS6bpJdBsYAuPZoEy8UzTmo+pIb/wnAKnsr6o3ApLeYcofDiQDLFSEqr\n\tco99QMsLcnKYivGi9SJ27Lx88rGxCIFOnRaxKX6mOQYMyCsNLCNu1Sfp4RX3ij6fsWk4\n\tIjz3ZDWiZTLPKRy1VZ5OOXRTh85PP5MyqrxSdWsPxLp2Ss1iNhbrbAgg+HqggceMkl9S\n\toLdZmVfGbl8UUig5Sy5uE0dfhEVKAtJgV2lzNk9gWnN76Ig0Onj+YVftrr80hLn/VPO3\n\twQ== ",
        "From": "<jerinj@marvell.com>",
        "To": "<dev@dpdk.org>, Jerin Jacob <jerinj@marvell.com>, Nithin Dabilpuram\n\t<ndabilpuram@marvell.com>, Vamsi Attunuru <vattunuru@marvell.com>",
        "CC": "Olivier Matz <olivier.matz@6wind.com>, Pavan Nikhilesh\n\t<pbhagavatula@marvell.com>",
        "Date": "Sat, 1 Jun 2019 07:19:02 +0530",
        "Message-ID": "<20190601014905.45531-25-jerinj@marvell.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190601014905.45531-1-jerinj@marvell.com>",
        "References": "<20190523081339.56348-1-jerinj@marvell.com>\n\t<20190601014905.45531-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-01_02:, , signatures=0",
        "Subject": "[dpdk-dev] [PATCH v2 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": [
        "v2",
        "24/27"
    ]
}