get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 53658,
    "url": "http://patches.dpdk.org/api/patches/53658/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190523081339.56348-24-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": "<20190523081339.56348-24-jerinj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190523081339.56348-24-jerinj@marvell.com",
    "date": "2019-05-23T08:13:35",
    "name": "[v1,23/27] mempool/octeontx2: add remaining slow path ops",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "812aadbe45aa733c6788e0e0321f82faf3cc2ee1",
    "submitter": {
        "id": 1188,
        "url": "http://patches.dpdk.org/api/people/1188/?format=api",
        "name": "Jerin Jacob Kollanukkaran",
        "email": "jerinj@marvell.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190523081339.56348-24-jerinj@marvell.com/mbox/",
    "series": [
        {
            "id": 4754,
            "url": "http://patches.dpdk.org/api/series/4754/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4754",
            "date": "2019-05-23T08:13:12",
            "name": "OCTEON TX2 common and mempool driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4754/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/53658/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/53658/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 1412E1B9ED;\n\tThu, 23 May 2019 10:17:36 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n\t[67.231.156.173]) by dpdk.org (Postfix) with ESMTP id D457D1B993\n\tfor <dev@dpdk.org>; Thu, 23 May 2019 10:17:10 +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\tx4N89evA019037; Thu, 23 May 2019 01:17:10 -0700",
            "from sc-exch02.marvell.com ([199.233.58.182])\n\tby mx0b-0016f401.pphosted.com with ESMTP id 2smnwk0sfp-11\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tThu, 23 May 2019 01:17:10 -0700",
            "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH02.marvell.com\n\t(10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tThu, 23 May 2019 01:16:11 -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; Thu, 23 May 2019 01:16:11 -0700",
            "from jerin-lab.marvell.com (unknown [10.28.34.14])\n\tby maili.marvell.com (Postfix) with ESMTP id B676C3F703F;\n\tThu, 23 May 2019 01:16:10 -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=+ieFtCc0LN3kuuJEFLJaSUFwyQMC0ljtxO5x37SUOsQ=;\n\tb=cASg/guff81+oXVFESsXLhq5T94OUiFW3JEncx46e/GCd8Ex6mwx8r5ZwQOTJ2kL+mjI\n\t+i6M1GyEZijcV3Uwh90pjrr17Mf22+HsNKhfLUcoGiPmxsgJbkHNnINnOYkNhfQjVQbx\n\t+/ohh9dieigiT1L8DVMyJ89nUwpNZW/knv2UB2oq0dcUrFAY3Ku1HukEUp7HgGg6xHZb\n\txaO25yGcmWQgOfoyFFjVa+5AJceteAYF702Ix0qfn7zs8Qw7xLtDaTZDSmN9PmsqubpK\n\tWOjo0Le03WAUREW3S511h23J7HyXWq9IYIPDJuod3sdALtzNaGNx5eMUnC9mt7bQoK/S\n\tQg== ",
        "From": "<jerinj@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<thomas@monjalon.net>, Jerin Jacob <jerinj@marvell.com>, Pavan Nikhilesh\n\t<pbhagavatula@marvell.com>",
        "Date": "Thu, 23 May 2019 13:43:35 +0530",
        "Message-ID": "<20190523081339.56348-24-jerinj@marvell.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "In-Reply-To": "<20190523081339.56348-1-jerinj@marvell.com>",
        "References": "<20190523081339.56348-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-05-23_08:, , signatures=0",
        "Subject": "[dpdk-dev] [PATCH v1 23/27] mempool/octeontx2: add remaining slow\n\tpath 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 remaining get_count(), calc_mem_size() and populate() slow path\nmempool operations.\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 | 62 ++++++++++++++++++++\n 1 file changed, 62 insertions(+)",
    "diff": "diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c b/drivers/mempool/octeontx2/otx2_mempool_ops.c\nindex 94570319a..966b7d7f1 100644\n--- a/drivers/mempool/octeontx2/otx2_mempool_ops.c\n+++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c\n@@ -7,6 +7,12 @@\n \n #include \"otx2_mempool.h\"\n \n+static unsigned int\n+otx2_npa_get_count(const struct rte_mempool *mp)\n+{\n+\treturn (unsigned int)npa_lf_aura_op_available(mp->pool_id);\n+}\n+\n static int\n npa_lf_aura_pool_init(struct otx2_mbox *mbox, uint32_t aura_id,\n \t\t      struct npa_aura_s *aura, struct npa_pool_s *pool)\n@@ -341,10 +347,66 @@ otx2_npa_free(struct rte_mempool *mp)\n \totx2_npa_lf_fini();\n }\n \n+static ssize_t\n+otx2_npa_calc_mem_size(const struct rte_mempool *mp, uint32_t obj_num,\n+\t\t       uint32_t pg_shift, size_t *min_chunk_size, size_t *align)\n+{\n+\tssize_t mem_size;\n+\n+\t/*\n+\t * Simply need space for one more object to be able to\n+\t * fulfill alignment requirements.\n+\t */\n+\tmem_size = rte_mempool_op_calc_mem_size_default(mp, obj_num + 1,\n+\t\t\t\t\t\t\tpg_shift,\n+\t\t\t\t\t\t\tmin_chunk_size, align);\n+\tif (mem_size >= 0) {\n+\t\t/*\n+\t\t * Memory area which contains objects must be physically\n+\t\t * contiguous.\n+\t\t */\n+\t\t*min_chunk_size = mem_size;\n+\t}\n+\n+\treturn mem_size;\n+}\n+\n+static int\n+otx2_npa_populate(struct rte_mempool *mp, unsigned int max_objs, void *vaddr,\n+\t\t  rte_iova_t iova, size_t len,\n+\t\t  rte_mempool_populate_obj_cb_t *obj_cb, void *obj_cb_arg)\n+{\n+\tsize_t total_elt_sz;\n+\tsize_t off;\n+\n+\tif (iova == RTE_BAD_IOVA)\n+\t\treturn -EINVAL;\n+\n+\ttotal_elt_sz = mp->header_size + mp->elt_size + mp->trailer_size;\n+\n+\t/* Align object start address to a multiple of total_elt_sz */\n+\toff = total_elt_sz - ((uintptr_t)vaddr % total_elt_sz);\n+\n+\tif (len < off)\n+\t\treturn -EINVAL;\n+\n+\tvaddr = (char *)vaddr + off;\n+\tiova += off;\n+\tlen -= off;\n+\n+\tnpa_lf_aura_op_range_set(mp->pool_id, iova, iova + len);\n+\n+\treturn rte_mempool_op_populate_default(mp, max_objs, vaddr, iova, len,\n+\t\t\t\t\t       obj_cb, obj_cb_arg);\n+}\n+\n 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.get_count = otx2_npa_get_count,\n+\t.calc_mem_size = otx2_npa_calc_mem_size,\n+\t.populate = otx2_npa_populate,\n };\n \n MEMPOOL_REGISTER_OPS(otx2_npa_ops);\n",
    "prefixes": [
        "v1",
        "23/27"
    ]
}