get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87997,
    "url": "https://patches.dpdk.org/api/patches/87997/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210219024011.77233-1-chenbo.xia@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": "<20210219024011.77233-1-chenbo.xia@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210219024011.77233-1-chenbo.xia@intel.com",
    "date": "2021-02-19T02:40:11",
    "name": "examples/vhost: fix unchecked return value",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e2deab847004b0b1a0766ac41443c9075439ff27",
    "submitter": {
        "id": 1276,
        "url": "https://patches.dpdk.org/api/people/1276/?format=api",
        "name": "Chenbo Xia",
        "email": "chenbo.xia@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "https://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210219024011.77233-1-chenbo.xia@intel.com/mbox/",
    "series": [
        {
            "id": 15294,
            "url": "https://patches.dpdk.org/api/series/15294/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=15294",
            "date": "2021-02-19T02:40:11",
            "name": "examples/vhost: fix unchecked return value",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/15294/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/87997/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/87997/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B4F37A054A;\n\tFri, 19 Feb 2021 03:49:04 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7382540395;\n\tFri, 19 Feb 2021 03:49:04 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 041D540042;\n Fri, 19 Feb 2021 03:49:02 +0100 (CET)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 18 Feb 2021 18:49:01 -0800",
            "from npg-dpdk-virtio-xiachenbo-nw.sh.intel.com ([10.67.118.240])\n by orsmga003.jf.intel.com with ESMTP; 18 Feb 2021 18:49:00 -0800"
        ],
        "IronPort-SDR": [
            "\n Ng+ZBRRNiYUzdZnMH5r9h6VeHmIJ/9C9PqkfXZ18+mNXaooaLOyR1CFp76bMGz5je7n+MViAr9\n k1msxy0k3nJQ==",
            "\n z0UgN4IXI+i8SPyINvqtj29lkACQBWHCrY6uCeWwaqaJ4mfz23PB8dxc18bFqoJN7V5fwe8unr\n W0mhN0NbqCDA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9899\"; a=\"202986907\"",
            "E=Sophos;i=\"5.81,189,1610438400\"; d=\"scan'208\";a=\"202986907\"",
            "E=Sophos;i=\"5.81,189,1610438400\"; d=\"scan'208\";a=\"362786453\""
        ],
        "X-ExtLoop1": "1",
        "From": "Chenbo Xia <chenbo.xia@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "maxime.coquelin@redhat.com,\n\tstable@dpdk.org",
        "Date": "Fri, 19 Feb 2021 10:40:11 +0800",
        "Message-Id": "<20210219024011.77233-1-chenbo.xia@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH] examples/vhost: fix unchecked return value",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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": "This patch fixes unchecked return value for rte_vhost_get_mem_table(),\nwhich is reported by coverity.\n\nCoverity issue: 364233\nFixes: ca059fa5e290 (\"examples/vhost: demonstrate the new generic APIs\")\nCc: stable@dpdk.org\n\nSigned-off-by: Chenbo Xia <chenbo.xia@intel.com>\n---\n examples/vhost/virtio_net.c | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/examples/vhost/virtio_net.c b/examples/vhost/virtio_net.c\nindex 64bf3d19ff..9064fc3a82 100644\n--- a/examples/vhost/virtio_net.c\n+++ b/examples/vhost/virtio_net.c\n@@ -23,6 +23,7 @@ vs_vhost_net_setup(struct vhost_dev *dev)\n \tuint16_t i;\n \tint vid = dev->vid;\n \tstruct vhost_queue *queue;\n+\tint ret;\n \n \tRTE_LOG(INFO, VHOST_CONFIG,\n \t\t\"setting builtin vhost-user net driver\\n\");\n@@ -33,7 +34,12 @@ vs_vhost_net_setup(struct vhost_dev *dev)\n \telse\n \t\tdev->hdr_len = sizeof(struct virtio_net_hdr);\n \n-\trte_vhost_get_mem_table(vid, &dev->mem);\n+\tret = rte_vhost_get_mem_table(vid, &dev->mem);\n+\tif (ret < 0) {\n+\t\tRTE_LOG(ERR, VHOST_CONFIG, \"Failed to get \"\n+\t\t\t\"VM memory layout for device(%d)\\n\", vid);\n+\t\treturn;\n+\t}\n \n \tdev->nr_vrings = rte_vhost_get_vring_num(vid);\n \tfor (i = 0; i < dev->nr_vrings; i++) {\n",
    "prefixes": []
}