get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 62226,
    "url": "http://patchwork.dpdk.org/api/patches/62226/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20191030143619.4007-4-olivier.matz@6wind.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20191030143619.4007-4-olivier.matz@6wind.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191030143619.4007-4-olivier.matz@6wind.com",
    "date": "2019-10-30T14:36:16",
    "name": "[v2,3/6] mempool: remove optimistic IOVA-contiguous allocation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "889e2018dc96639f4529e706f6c961d350c62936",
    "submitter": {
        "id": 8,
        "url": "http://patchwork.dpdk.org/api/people/8/?format=api",
        "name": "Olivier Matz",
        "email": "olivier.matz@6wind.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20191030143619.4007-4-olivier.matz@6wind.com/mbox/",
    "series": [
        {
            "id": 7161,
            "url": "http://patchwork.dpdk.org/api/series/7161/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=7161",
            "date": "2019-10-30T14:36:15",
            "name": "mempool: avoid objects allocations across pages",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/7161/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/62226/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/62226/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 88127A00BE;\n\tWed, 30 Oct 2019 15:37:08 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0120F1BFE3;\n\tWed, 30 Oct 2019 15:37:02 +0100 (CET)",
            "from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com\n [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 8CB891BF8E\n for <dev@dpdk.org>; Wed, 30 Oct 2019 15:36:57 +0100 (CET)",
            "from glumotte.dev.6wind.com. (unknown [10.16.0.195])\n by proxy.6wind.com (Postfix) with ESMTP id C193C338A4B;\n Wed, 30 Oct 2019 15:36:55 +0100 (CET)"
        ],
        "From": "Olivier Matz <olivier.matz@6wind.com>",
        "To": "dev@dpdk.org",
        "Cc": "Anatoly Burakov <anatoly.burakov@intel.com>,\n Andrew Rybchenko <arybchenko@solarflare.com>,\n Ferruh Yigit <ferruh.yigit@linux.intel.com>,\n \"Giridharan, Ganesan\" <ggiridharan@rbbn.com>,\n Jerin Jacob Kollanukkaran <jerinj@marvell.com>,\n \"Kiran Kumar Kokkilagadda\" <kirankumark@marvell.com>,\n Stephen Hemminger <sthemmin@microsoft.com>,\n Thomas Monjalon <thomas@monjalon.net>,\n Vamsi Krishna Attunuru <vattunuru@marvell.com>",
        "Date": "Wed, 30 Oct 2019 15:36:16 +0100",
        "Message-Id": "<20191030143619.4007-4-olivier.matz@6wind.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20191030143619.4007-1-olivier.matz@6wind.com>",
        "References": "<20190719133845.32432-1-olivier.matz@6wind.com>\n <20191030143619.4007-1-olivier.matz@6wind.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 3/6] mempool: remove optimistic\n\tIOVA-contiguous allocation",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The previous commit reduced the amount of required memory when\npopulating the mempool with non iova-contiguous memory.\n\nSince there is no big advantage to have a fully iova-contiguous mempool\nif it is not explicitly asked, remove this code, it simplifies the\npopulate function.\n\nSigned-off-by: Olivier Matz <olivier.matz@6wind.com>\nReviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n lib/librte_mempool/rte_mempool.c | 47 ++++++--------------------------\n 1 file changed, 8 insertions(+), 39 deletions(-)",
    "diff": "diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c\nindex 4e0d576f5..213e574fc 100644\n--- a/lib/librte_mempool/rte_mempool.c\n+++ b/lib/librte_mempool/rte_mempool.c\n@@ -430,7 +430,6 @@ rte_mempool_populate_default(struct rte_mempool *mp)\n \tunsigned mz_id, n;\n \tint ret;\n \tbool need_iova_contig_obj;\n-\tbool try_iova_contig_mempool;\n \tbool alloc_in_ext_mem;\n \n \tret = mempool_ops_alloc_once(mp);\n@@ -483,9 +482,7 @@ rte_mempool_populate_default(struct rte_mempool *mp)\n \t * We also have to take into account the fact that memory that we're\n \t * going to allocate from can belong to an externally allocated memory\n \t * area, in which case the assumption of IOVA as VA mode being\n-\t * synonymous with IOVA contiguousness will not hold. We should also try\n-\t * to go for contiguous memory even if we're in no-huge mode, because\n-\t * external memory may in fact be IOVA-contiguous.\n+\t * synonymous with IOVA contiguousness will not hold.\n \t */\n \n \t/* check if we can retrieve a valid socket ID */\n@@ -494,7 +491,6 @@ rte_mempool_populate_default(struct rte_mempool *mp)\n \t\treturn -EINVAL;\n \talloc_in_ext_mem = (ret == 1);\n \tneed_iova_contig_obj = !(mp->flags & MEMPOOL_F_NO_IOVA_CONTIG);\n-\ttry_iova_contig_mempool = false;\n \n \tif (!need_iova_contig_obj) {\n \t\tpg_sz = 0;\n@@ -503,7 +499,6 @@ rte_mempool_populate_default(struct rte_mempool *mp)\n \t\tpg_sz = 0;\n \t\tpg_shift = 0;\n \t} else if (rte_eal_has_hugepages() || alloc_in_ext_mem) {\n-\t\ttry_iova_contig_mempool = true;\n \t\tpg_sz = get_min_page_size(mp->socket_id);\n \t\tpg_shift = rte_bsf32(pg_sz);\n \t} else {\n@@ -513,14 +508,9 @@ rte_mempool_populate_default(struct rte_mempool *mp)\n \n \tfor (mz_id = 0, n = mp->size; n > 0; mz_id++, n -= ret) {\n \t\tsize_t min_chunk_size;\n-\t\tunsigned int flags;\n \n-\t\tif (try_iova_contig_mempool || pg_sz == 0)\n-\t\t\tmem_size = rte_mempool_ops_calc_mem_size(mp, n,\n-\t\t\t\t\t0, &min_chunk_size, &align);\n-\t\telse\n-\t\t\tmem_size = rte_mempool_ops_calc_mem_size(mp, n,\n-\t\t\t\t\tpg_shift, &min_chunk_size, &align);\n+\t\tmem_size = rte_mempool_ops_calc_mem_size(\n+\t\t\tmp, n, pg_shift, &min_chunk_size, &align);\n \n \t\tif (mem_size < 0) {\n \t\t\tret = mem_size;\n@@ -534,36 +524,15 @@ rte_mempool_populate_default(struct rte_mempool *mp)\n \t\t\tgoto fail;\n \t\t}\n \n-\t\tflags = mz_flags;\n-\n \t\t/* if we're trying to reserve contiguous memory, add appropriate\n \t\t * memzone flag.\n \t\t */\n-\t\tif (try_iova_contig_mempool)\n-\t\t\tflags |= RTE_MEMZONE_IOVA_CONTIG;\n+\t\tif (min_chunk_size == (size_t)mem_size)\n+\t\t\tmz_flags |= RTE_MEMZONE_IOVA_CONTIG;\n \n \t\tmz = rte_memzone_reserve_aligned(mz_name, mem_size,\n-\t\t\t\tmp->socket_id, flags, align);\n-\n-\t\t/* if we were trying to allocate contiguous memory, failed and\n-\t\t * minimum required contiguous chunk fits minimum page, adjust\n-\t\t * memzone size to the page size, and try again.\n-\t\t */\n-\t\tif (mz == NULL && try_iova_contig_mempool &&\n-\t\t\t\tmin_chunk_size <= pg_sz) {\n-\t\t\ttry_iova_contig_mempool = false;\n-\t\t\tflags &= ~RTE_MEMZONE_IOVA_CONTIG;\n-\n-\t\t\tmem_size = rte_mempool_ops_calc_mem_size(mp, n,\n-\t\t\t\t\tpg_shift, &min_chunk_size, &align);\n-\t\t\tif (mem_size < 0) {\n-\t\t\t\tret = mem_size;\n-\t\t\t\tgoto fail;\n-\t\t\t}\n+\t\t\t\tmp->socket_id, mz_flags, align);\n \n-\t\t\tmz = rte_memzone_reserve_aligned(mz_name, mem_size,\n-\t\t\t\tmp->socket_id, flags, align);\n-\t\t}\n \t\t/* don't try reserving with 0 size if we were asked to reserve\n \t\t * IOVA-contiguous memory.\n \t\t */\n@@ -572,7 +541,7 @@ rte_mempool_populate_default(struct rte_mempool *mp)\n \t\t\t * have\n \t\t\t */\n \t\t\tmz = rte_memzone_reserve_aligned(mz_name, 0,\n-\t\t\t\t\tmp->socket_id, flags, align);\n+\t\t\t\t\tmp->socket_id, mz_flags, align);\n \t\t}\n \t\tif (mz == NULL) {\n \t\t\tret = -rte_errno;\n@@ -590,7 +559,7 @@ rte_mempool_populate_default(struct rte_mempool *mp)\n \t\telse\n \t\t\tiova = RTE_BAD_IOVA;\n \n-\t\tif (try_iova_contig_mempool || pg_sz == 0)\n+\t\tif (pg_sz == 0 || (mz_flags & RTE_MEMZONE_IOVA_CONTIG))\n \t\t\tret = rte_mempool_populate_iova(mp, mz->addr,\n \t\t\t\tiova, mz->len,\n \t\t\t\trte_mempool_memchunk_mz_free,\n",
    "prefixes": [
        "v2",
        "3/6"
    ]
}