get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 80111,
    "url": "http://patches.dpdk.org/api/patches/80111/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201009081410.63944-4-yong.liu@intel.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": "<20201009081410.63944-4-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201009081410.63944-4-yong.liu@intel.com",
    "date": "2020-10-09T08:14:08",
    "name": "[v3,3/5] vhost: prepare memory regions addresses",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "efb541cab6722042ebe55cd0b67c202405e6f212",
    "submitter": {
        "id": 17,
        "url": "http://patches.dpdk.org/api/people/17/?format=api",
        "name": "Marvin Liu",
        "email": "yong.liu@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201009081410.63944-4-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 12813,
            "url": "http://patches.dpdk.org/api/series/12813/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12813",
            "date": "2020-10-09T08:14:05",
            "name": "vhost add vectorized data path",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/12813/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/80111/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/80111/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 2524BA04BC;\n\tFri,  9 Oct 2020 10:21:30 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 53B8A1C1E0;\n\tFri,  9 Oct 2020 10:20:40 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by dpdk.org (Postfix) with ESMTP id 3C1941C1D3\n for <dev@dpdk.org>; Fri,  9 Oct 2020 10:20:37 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Oct 2020 01:20:35 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.56])\n by orsmga005.jf.intel.com with ESMTP; 09 Oct 2020 01:20:33 -0700"
        ],
        "IronPort-SDR": [
            "\n pcxgFwBzV9nlTkCRYluJntPSL5FN7mchOTNB2Q3yXu64K48Luzeo4fQs5tJHTPstP33Msbmth1\n WqDA6OjUJ+ZQ==",
            "\n Qi28qAPXPAhGeQQMql8OMw2qR2mkwXdygZN1hmOYzWTnptr4agyac7+xaYO4YIskDBpeCMiJAY\n vX8d4WxAeBgg=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9768\"; a=\"144778911\"",
            "E=Sophos;i=\"5.77,354,1596524400\"; d=\"scan'208\";a=\"144778911\"",
            "E=Sophos;i=\"5.77,354,1596524400\"; d=\"scan'208\";a=\"528833341\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Marvin Liu <yong.liu@intel.com>",
        "To": "maxime.coquelin@redhat.com, chenbo.xia@intel.com, zhihong.wang@intel.com",
        "Cc": "dev@dpdk.org,\n\tMarvin Liu <yong.liu@intel.com>",
        "Date": "Fri,  9 Oct 2020 16:14:08 +0800",
        "Message-Id": "<20201009081410.63944-4-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20201009081410.63944-1-yong.liu@intel.com>",
        "References": "<20200819032414.51430-2-yong.liu@intel.com>\n <20201009081410.63944-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 3/5] vhost: prepare memory regions addresses",
        "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": "Prepare memory regions guest physical addresses for vectorized data\npath. These information will be utilized by SIMD instructions to find\nmatched region index.\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>",
    "diff": "diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h\nindex 12b7699cf..a19fe9423 100644\n--- a/lib/librte_vhost/vhost.h\n+++ b/lib/librte_vhost/vhost.h\n@@ -52,6 +52,8 @@\n \n #define ASYNC_MAX_POLL_SEG 255\n \n+#define MAX_NREGIONS 8\n+\n #define VHOST_MAX_ASYNC_IT (MAX_PKT_BURST * 2)\n #define VHOST_MAX_ASYNC_VEC (BUF_VECTOR_MAX * 2)\n \n@@ -349,6 +351,11 @@ struct inflight_mem_info {\n \tuint64_t\tsize;\n };\n \n+struct mem_regions_range {\n+\tuint64_t regions_low_addrs[MAX_NREGIONS];\n+\tuint64_t regions_high_addrs[MAX_NREGIONS];\n+};\n+\n /**\n  * Device structure contains all configuration information relating\n  * to the device.\n@@ -356,6 +363,7 @@ struct inflight_mem_info {\n struct virtio_net {\n \t/* Frontend (QEMU) memory and memory region information */\n \tstruct rte_vhost_memory\t*mem;\n+\tstruct mem_regions_range *regions_range;\n \tuint64_t\t\tfeatures;\n \tuint64_t\t\tprotocol_features;\n \tint\t\t\tvid;\ndiff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c\nindex 4deceb3e0..2d2a2a1a3 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -185,6 +185,11 @@ vhost_backend_cleanup(struct virtio_net *dev)\n \t\tdev->inflight_info = NULL;\n \t}\n \n+\tif (dev->regions_range) {\n+\t\tfree(dev->regions_range);\n+\t\tdev->regions_range = NULL;\n+\t}\n+\n \tif (dev->slave_req_fd >= 0) {\n \t\tclose(dev->slave_req_fd);\n \t\tdev->slave_req_fd = -1;\n@@ -1230,6 +1235,27 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *msg,\n \t\t}\n \t}\n \n+\tRTE_BUILD_BUG_ON(VHOST_MEMORY_MAX_NREGIONS != 8);\n+\tif (dev->vectorized) {\n+\t\tif (dev->regions_range == NULL) {\n+\t\t\tdev->regions_range = calloc(1,\n+\t\t\t\t\tsizeof(struct mem_regions_range));\n+\t\t\tif (!dev->regions_range) {\n+\t\t\t\tVHOST_LOG_CONFIG(ERR,\n+\t\t\t\t\t\"failed to alloc dev vectorized area\\n\");\n+\t\t\t\treturn RTE_VHOST_MSG_RESULT_ERR;\n+\t\t\t}\n+\t\t}\n+\n+\t\tfor (i = 0; i < memory->nregions; i++) {\n+\t\t\tdev->regions_range->regions_low_addrs[i] =\n+\t\t\t\tmemory->regions[i].guest_phys_addr;\n+\t\t\tdev->regions_range->regions_high_addrs[i] =\n+\t\t\t\tmemory->regions[i].guest_phys_addr +\n+\t\t\t\tmemory->regions[i].memory_size;\n+\t\t}\n+\t}\n+\n \tfor (i = 0; i < dev->nr_vring; i++) {\n \t\tstruct vhost_virtqueue *vq = dev->virtqueue[i];\n \n",
    "prefixes": [
        "v3",
        "3/5"
    ]
}