get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 37712,
    "url": "https://patches.dpdk.org/api/patches/37712/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/e8abc976e67cf7646c4ce6a20f50e18b134d0de6.1523296700.git.anatoly.burakov@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<e8abc976e67cf7646c4ce6a20f50e18b134d0de6.1523296700.git.anatoly.burakov@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/e8abc976e67cf7646c4ce6a20f50e18b134d0de6.1523296700.git.anatoly.burakov@intel.com",
    "date": "2018-04-09T18:00:46",
    "name": "[dpdk-dev,v5,43/70] net/mlx4: use virt2memseg instead of iteration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8ba087af65f7bb58b57f046277241c0286dd1bb5",
    "submitter": {
        "id": 4,
        "url": "https://patches.dpdk.org/api/people/4/?format=api",
        "name": "Anatoly Burakov",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/e8abc976e67cf7646c4ce6a20f50e18b134d0de6.1523296700.git.anatoly.burakov@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/37712/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/37712/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 23A681BA47;\n\tMon,  9 Apr 2018 20:03:15 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id 0A1721B895\n\tfor <dev@dpdk.org>; Mon,  9 Apr 2018 20:01:43 +0200 (CEST)",
            "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t09 Apr 2018 11:01:43 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga007.fm.intel.com with ESMTP; 09 Apr 2018 11:01:39 -0700",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tw39I1dch031194; Mon, 9 Apr 2018 19:01:39 +0100",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w39I1de7028045;\n\tMon, 9 Apr 2018 19:01:39 +0100",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w39I1cTV028034;\n\tMon, 9 Apr 2018 19:01:38 +0100"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.48,427,1517904000\"; d=\"scan'208\";a=\"30772092\"",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Adrien Mazarguil <adrien.mazarguil@6wind.com>, keith.wiles@intel.com,\n\tjianfeng.tan@intel.com, andras.kovacs@ericsson.com,\n\tlaszlo.vadkeri@ericsson.com, benjamin.walker@intel.com,\n\tbruce.richardson@intel.com, thomas@monjalon.net,\n\tkonstantin.ananyev@intel.com, kuralamudhan.ramakrishnan@intel.com,\n\tlouise.m.daly@intel.com, nelio.laranjeiro@6wind.com,\n\tyskoh@mellanox.com, pepperjo@japf.ch, jerin.jacob@caviumnetworks.com, \n\themant.agrawal@nxp.com, olivier.matz@6wind.com, shreyansh.jain@nxp.com,\n\tgowrishankar.m@linux.vnet.ibm.com",
        "Date": "Mon,  9 Apr 2018 19:00:46 +0100",
        "Message-Id": "<e8abc976e67cf7646c4ce6a20f50e18b134d0de6.1523296700.git.anatoly.burakov@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "In-Reply-To": [
            "<cover.1523296700.git.anatoly.burakov@intel.com>",
            "<cover.1523296700.git.anatoly.burakov@intel.com>"
        ],
        "References": [
            "<cover.1523296700.git.anatoly.burakov@intel.com>",
            "<cover.1523218215.git.anatoly.burakov@intel.com>\n\t<cover.1523296700.git.anatoly.burakov@intel.com>"
        ],
        "Subject": "[dpdk-dev] [PATCH v5 43/70] net/mlx4: use virt2memseg instead of\n\titeration",
        "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Reduce dependency on internal details of EAL memory subsystem, and\nsimplify code.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nTested-by: Santosh Shukla <Santosh.Shukla@caviumnetworks.com>\nTested-by: Hemant Agrawal <hemant.agrawal@nxp.com>\n---\n\nNotes:\n    v5:\n    - Remove unused variable\n\n drivers/net/mlx4/mlx4_mr.c | 18 +++++++-----------\n 1 file changed, 7 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c\nindex 9a1e4de..7ca1560 100644\n--- a/drivers/net/mlx4/mlx4_mr.c\n+++ b/drivers/net/mlx4/mlx4_mr.c\n@@ -126,10 +126,9 @@ mlx4_check_mempool(struct rte_mempool *mp, uintptr_t *start, uintptr_t *end)\n struct mlx4_mr *\n mlx4_mr_get(struct priv *priv, struct rte_mempool *mp)\n {\n-\tconst struct rte_memseg *ms = rte_eal_get_physmem_layout();\n+\tconst struct rte_memseg *ms;\n \tuintptr_t start;\n \tuintptr_t end;\n-\tunsigned int i;\n \tstruct mlx4_mr *mr;\n \n \tif (mlx4_check_mempool(mp, &start, &end) != 0) {\n@@ -142,16 +141,13 @@ mlx4_mr_get(struct priv *priv, struct rte_mempool *mp)\n \t      (void *)mp, (void *)start, (void *)end,\n \t      (size_t)(end - start));\n \t/* Round start and end to page boundary if found in memory segments. */\n-\tfor (i = 0; (i < RTE_MAX_MEMSEG) && (ms[i].addr != NULL); ++i) {\n-\t\tuintptr_t addr = (uintptr_t)ms[i].addr;\n-\t\tsize_t len = ms[i].len;\n-\t\tunsigned int align = ms[i].hugepage_sz;\n+\tms = rte_mem_virt2memseg((void *)start);\n+\tif (ms != NULL)\n+\t\tstart = RTE_ALIGN_FLOOR(start, ms->hugepage_sz);\n+\tms = rte_mem_virt2memseg((void *)end);\n+\tif (ms != NULL)\n+\t\tend = RTE_ALIGN_CEIL(end, ms->hugepage_sz);\n \n-\t\tif ((start > addr) && (start < addr + len))\n-\t\t\tstart = RTE_ALIGN_FLOOR(start, align);\n-\t\tif ((end > addr) && (end < addr + len))\n-\t\t\tend = RTE_ALIGN_CEIL(end, align);\n-\t}\n \tDEBUG(\"mempool %p using start=%p end=%p size=%zu for MR\",\n \t      (void *)mp, (void *)start, (void *)end,\n \t      (size_t)(end - start));\n",
    "prefixes": [
        "dpdk-dev",
        "v5",
        "43/70"
    ]
}