get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 75698,
    "url": "http://patchwork.dpdk.org/api/patches/75698/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200819032414.51430-4-yong.liu@intel.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": "<20200819032414.51430-4-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200819032414.51430-4-yong.liu@intel.com",
    "date": "2020-08-19T03:24:12",
    "name": "[v1,3/5] vhost: prepare memory regions addresses",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9da62f89b0ff1772994fcbebb86b92a0cf765a11",
    "submitter": {
        "id": 17,
        "url": "http://patchwork.dpdk.org/api/people/17/?format=api",
        "name": "Marvin Liu",
        "email": "yong.liu@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patchwork.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200819032414.51430-4-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 11702,
            "url": "http://patchwork.dpdk.org/api/series/11702/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=11702",
            "date": "2020-08-19T03:24:09",
            "name": "vhost add vectorized data path",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/11702/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/75698/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/75698/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 A2896A04AF;\n\tWed, 19 Aug 2020 05:25:19 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 17F781C0B6;\n\tWed, 19 Aug 2020 05:24:59 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id AEA191C0AD\n for <dev@dpdk.org>; Wed, 19 Aug 2020 05:24:56 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Aug 2020 20:24:56 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.56])\n by orsmga004.jf.intel.com with ESMTP; 18 Aug 2020 20:24:55 -0700"
        ],
        "IronPort-SDR": [
            "\n +KMt5mXY9qQDcYX5IaEBHryOm6DRNcXHtwpl3vtn65D3Ji6PBrLBJiDYJOG+nwr1oGHMDFvEXZ\n LSlspt8al/aQ==",
            "\n 4GpTiJS9EqU3HPppayL6LzL0DgrquDxZxn2JbH8a9R0O+gIpWrfxBEeuxDEBesU8tncj62nNFm\n aGc8p4V2oJMQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9717\"; a=\"156113178\"",
            "E=Sophos;i=\"5.76,329,1592895600\"; d=\"scan'208\";a=\"156113178\"",
            "E=Sophos;i=\"5.76,329,1592895600\"; d=\"scan'208\";a=\"441452729\""
        ],
        "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": "Wed, 19 Aug 2020 11:24:12 +0800",
        "Message-Id": "<20200819032414.51430-4-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200819032414.51430-1-yong.liu@intel.com>",
        "References": "<20200819032414.51430-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v1 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 5a5c945551..4a81f18f01 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@@ -375,6 +377,8 @@ 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+\tuint64_t\t\tregions_low_addrs[MAX_NREGIONS];\n+\tuint64_t\t\tregions_high_addrs[MAX_NREGIONS];\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 c3c924faec..89e75e9e71 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -1291,6 +1291,17 @@ 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\tfor (i = 0; i < memory->nregions; i++) {\n+\t\t\tdev->regions_low_addrs[i] =\n+\t\t\t\tmemory->regions[i].guest_phys_addr;\n+\t\t\tdev->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": [
        "v1",
        "3/5"
    ]
}