Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/54875/?format=api
http://patches.dpdk.org/api/patches/54875/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190617155537.36144-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": "<20190617155537.36144-24-jerinj@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190617155537.36144-24-jerinj@marvell.com", "date": "2019-06-17T15:55:33", "name": "[v3,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": { "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/20190617155537.36144-24-jerinj@marvell.com/mbox/", "series": [ { "id": 5036, "url": "http://patches.dpdk.org/api/series/5036/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5036", "date": "2019-06-17T15:55:10", "name": "OCTEON TX2 common and mempool driver", "version": 3, "mbox": "http://patches.dpdk.org/series/5036/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/54875/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/54875/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 37B261BFE4;\n\tMon, 17 Jun 2019 17:57:26 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n\t[67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 9DA0A1BF8C\n\tfor <dev@dpdk.org>; Mon, 17 Jun 2019 17:57:01 +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\tx5HFprCZ001049 for <dev@dpdk.org>; Mon, 17 Jun 2019 08:57:01 -0700", "from sc-exch03.marvell.com ([199.233.58.183])\n\tby mx0b-0016f401.pphosted.com with ESMTP id 2t506hyb3j-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n\tfor <dev@dpdk.org>; Mon, 17 Jun 2019 08:57:00 -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\tMon, 17 Jun 2019 08:56:59 -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; Mon, 17 Jun 2019 08:56:59 -0700", "from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14])\n\tby maili.marvell.com (Postfix) with ESMTP id 952543F703F;\n\tMon, 17 Jun 2019 08:56:57 -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=hj0MkQ157sGtN6J6n/BGADtHAQf1FGXxY4mBv98qZ9v3VLPZXC9tqeswNi3ABldC0Arr\n\trkrdeT5nuH3QsxWnuqY/+t6Sa3jNBYbE+rNTKYaA3iZi8Pjhrh6O+zzwlj0sx/ViYKrh\n\t/GNOnO6OxCYQN428psVTf7iWK0gBagFtBPvh/NjFy86lh3hwmt7YD1uZneGBmPlTs67B\n\tdiR7V1deFvyBrD7dB6FYSQYpdE6sXPphT9D6kJQLSnIyR4UvJYlAgdeD/raOlnFrGsKE\n\tS9qoOqF/DrSm9KEB/KDzoA/pKitsU6P7DrKopa9T0a/NCUW8KUfB45Wn5ofW5pOtNynr\n\tPA== ", "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": "Pavan Nikhilesh <pbhagavatula@marvell.com>", "Date": "Mon, 17 Jun 2019 21:25:33 +0530", "Message-ID": "<20190617155537.36144-24-jerinj@marvell.com>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190617155537.36144-1-jerinj@marvell.com>", "References": "<20190601014905.45531-1-jerinj@marvell.com>\n\t<20190617155537.36144-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-17_07:, , signatures=0", "Subject": "[dpdk-dev] [PATCH v3 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": [ "v3", "23/27" ] }{ "id": 54875, "url": "