get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 114496,
    "url": "http://patches.dpdk.org/api/patches/114496/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220802004938.23670-3-cfontana@suse.de/",
    "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": "<20220802004938.23670-3-cfontana@suse.de>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220802004938.23670-3-cfontana@suse.de",
    "date": "2022-08-02T00:49:38",
    "name": "[v3,2/2] vhost: improve error handling in desc_to_mbuf",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "19d059723736c47a03c191cdb18fa96ceb731adf",
    "submitter": {
        "id": 2788,
        "url": "http://patches.dpdk.org/api/people/2788/?format=api",
        "name": "Claudio Fontana",
        "email": "cfontana@suse.de"
    },
    "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/20220802004938.23670-3-cfontana@suse.de/mbox/",
    "series": [
        {
            "id": 24155,
            "url": "http://patches.dpdk.org/api/series/24155/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24155",
            "date": "2022-08-02T00:49:36",
            "name": "vhost fixes for OVS SIGSEGV in PMD",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/24155/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/114496/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/114496/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 E7B99A034C;\n\tTue,  2 Aug 2022 02:49:49 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 44A994281C;\n\tTue,  2 Aug 2022 02:49:43 +0200 (CEST)",
            "from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28])\n by mails.dpdk.org (Postfix) with ESMTP id CD2D1400D7\n for <dev@dpdk.org>; Tue,  2 Aug 2022 02:49:40 +0200 (CEST)",
            "from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de\n [192.168.254.74])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512)\n (No client certificate requested)\n by smtp-out1.suse.de (Postfix) with ESMTPS id B11AB33E8C;\n Tue,  2 Aug 2022 00:49:40 +0000 (UTC)",
            "from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de\n [192.168.254.74])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512)\n (No client certificate requested)\n by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 763E913A99;\n Tue,  2 Aug 2022 00:49:40 +0000 (UTC)",
            "from dovecot-director2.suse.de ([192.168.254.65])\n by imap2.suse-dmz.suse.de with ESMTPSA id UMUuG6R06GLLMwAAMHmgww\n (envelope-from <cfontana@suse.de>); Tue, 02 Aug 2022 00:49:40 +0000"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_rsa;\n t=1659401380;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=XLZnMjlOh2cyF/KD+SKZsd+F4Gahhz9WvO/X4H2+PE0=;\n b=2CM+4/FmS+PIO8HQR30qbGkVG++SWkHWDHnrua+CUeqzOn5JHxoq8zdfJbccXNbrem3AET\n ukJ0sHa6jWk5Opzsb6x2P+eiSOE6coz/50aX+AHV0bYiofrxUDmXE4TRCSC1e/0UQD6q5r\n PXSxynbTmE1qoinNIjTsbJJMgiLvKhc=",
            "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;\n s=susede2_ed25519; t=1659401380;\n h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:\n mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=XLZnMjlOh2cyF/KD+SKZsd+F4Gahhz9WvO/X4H2+PE0=;\n b=aus6G+WUwqFJMGtnmBaq3sAq1JA2CDKp4ZxWNqJWUXZS9zuNS6zjYkDOOib8zsW2/fQSX9\n iF76k6Ysu3QFm9BQ=="
        ],
        "From": "Claudio Fontana <cfontana@suse.de>",
        "To": "Maxime Coquelin <maxime.coquelin@redhat.com>,\n Chenbo Xia <chenbo.xia@intel.com>",
        "Cc": "dev@dpdk.org,\n\tClaudio Fontana <cfontana@suse.de>",
        "Subject": "[PATCH v3 2/2] vhost: improve error handling in desc_to_mbuf",
        "Date": "Tue,  2 Aug 2022 02:49:38 +0200",
        "Message-Id": "<20220802004938.23670-3-cfontana@suse.de>",
        "X-Mailer": "git-send-email 2.26.2",
        "In-Reply-To": "<20220802004938.23670-1-cfontana@suse.de>",
        "References": "<20220802004938.23670-1-cfontana@suse.de>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "check when increasing vec_idx that it is still valid\nin the (buf_len < dev->vhost_hlen) case too.\n\nTested-by: Claudio Fontana <cfontana@suse.de>\nSigned-off-by: Claudio Fontana <cfontana@suse.de>\n---\n lib/vhost/virtio_net.c | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c\nindex eb19e54c2b..20ed951979 100644\n--- a/lib/vhost/virtio_net.c\n+++ b/lib/vhost/virtio_net.c\n@@ -2704,12 +2704,15 @@ desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tif (unlikely(buf_len < dev->vhost_hlen)) {\n \t\tbuf_offset = dev->vhost_hlen - buf_len;\n \t\tvec_idx++;\n+\t\tif (unlikely(vec_idx >= nr_vec))\n+\t\t\tgoto error;\n \t\tbuf_addr = buf_vec[vec_idx].buf_addr;\n \t\tbuf_iova = buf_vec[vec_idx].buf_iova;\n \t\tbuf_len = buf_vec[vec_idx].buf_len;\n \t\tbuf_avail  = buf_len - buf_offset;\n \t} else if (buf_len == dev->vhost_hlen) {\n-\t\tif (unlikely(++vec_idx >= nr_vec))\n+\t\tvec_idx++;\n+\t\tif (unlikely(vec_idx >= nr_vec))\n \t\t\tgoto error;\n \t\tbuf_addr = buf_vec[vec_idx].buf_addr;\n \t\tbuf_iova = buf_vec[vec_idx].buf_iova;\n",
    "prefixes": [
        "v3",
        "2/2"
    ]
}