get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 111305,
    "url": "http://patches.dpdk.org/api/patches/111305/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220518101657.1230416-11-david.marchand@redhat.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": "<20220518101657.1230416-11-david.marchand@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220518101657.1230416-11-david.marchand@redhat.com",
    "date": "2022-05-18T10:16:55",
    "name": "[10/12] vhost/crypto: fix build with GCC 12",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "62d00200f9b51db2691f6cff2ce60c5a4206d560",
    "submitter": {
        "id": 1173,
        "url": "http://patches.dpdk.org/api/people/1173/?format=api",
        "name": "David Marchand",
        "email": "david.marchand@redhat.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220518101657.1230416-11-david.marchand@redhat.com/mbox/",
    "series": [
        {
            "id": 22993,
            "url": "http://patches.dpdk.org/api/series/22993/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=22993",
            "date": "2022-05-18T10:16:45",
            "name": "Fix compilation with gcc 12",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/22993/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/111305/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/111305/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 C8C86A0503;\n\tWed, 18 May 2022 12:18:26 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9888442B93;\n\tWed, 18 May 2022 12:18:21 +0200 (CEST)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id B198642B83\n for <dev@dpdk.org>; Wed, 18 May 2022 12:18:19 +0200 (CEST)",
            "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-175-bCpT5B_gMsCgsI8IgZl44A-1; Wed, 18 May 2022 06:18:16 -0400",
            "from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com\n [10.11.54.10])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CE3DE185A79C;\n Wed, 18 May 2022 10:18:15 +0000 (UTC)",
            "from fchome.home (unknown [10.40.195.61])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 9E72B401E98;\n Wed, 18 May 2022 10:18:12 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1652869099;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=xLW0iJD6GeR0hQ9rJdpnM4aBxE0PFyoitbbs01ZptQE=;\n b=E04r2DP1hupwEVTm3lgUVlcDVJBBrYM2USk/mhxGnXHF0Z92gRASLmhqk7S7m8OPRNR6Ai\n PFjJWVhLgg0l2tqOwqG73V5exsqNY0qd/a0WotEMDFfH+UdB9HNEvAWtunpAcNBa8HOirg\n g9oTUgXlEFkyVWymzM44uvszuzW67AM=",
        "X-MC-Unique": "bCpT5B_gMsCgsI8IgZl44A-1",
        "From": "David Marchand <david.marchand@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, ferruh.yigit@xilinx.com, stable@dpdk.org,\n Maxime Coquelin <maxime.coquelin@redhat.com>,\n Chenbo Xia <chenbo.xia@intel.com>, Fan Zhang <roy.fan.zhang@intel.com>",
        "Subject": "[PATCH 10/12] vhost/crypto: fix build with GCC 12",
        "Date": "Wed, 18 May 2022 12:16:55 +0200",
        "Message-Id": "<20220518101657.1230416-11-david.marchand@redhat.com>",
        "In-Reply-To": "<20220518101657.1230416-1-david.marchand@redhat.com>",
        "References": "<20220518101657.1230416-1-david.marchand@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.85 on 10.11.54.10",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "text/plain; charset=UTF-8",
        "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": "GCC 12 raises the following warning:\n\nIn file included from ../lib/mempool/rte_mempool.h:46,\n                 from ../lib/mbuf/rte_mbuf.h:38,\n                 from ../lib/vhost/vhost_crypto.c:7:\n../lib/vhost/vhost_crypto.c: In function ‘rte_vhost_crypto_fetch_requests’:\n../lib/eal/x86/include/rte_memcpy.h:371:9: warning: array subscript 1 is\n     outside array bounds of ‘struct virtio_crypto_op_data_req[1]’\n     [-Warray-bounds]\n  371 | rte_mov32((uint8_t *)dst + 3 * 32, (const uint8_t *)src + 3 * 32);\n      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n../lib/vhost/vhost_crypto.c:1178:42: note: while referencing ‘req’\n 1178 |         struct virtio_crypto_op_data_req req;\n      |                                          ^~~\n\nCheck that copied length is within req boundaries.\n\nFixes: 3c79609fda7c (\"vhost/crypto: handle virtually non-contiguous buffers\")\nCc: stable@dpdk.org\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n lib/vhost/vhost_crypto.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c\nindex b1c0eb6a0f..83325b7042 100644\n--- a/lib/vhost/vhost_crypto.c\n+++ b/lib/vhost/vhost_crypto.c\n@@ -576,16 +576,16 @@ copy_data(void *dst_data, struct vhost_crypto_data_req *vc_req,\n \tuint32_t to_copy;\n \tuint8_t *data = dst_data;\n \tuint8_t *src;\n-\tint left = size;\n+\tuint32_t left = size;\n \n-\tto_copy = RTE_MIN(desc->len, (uint32_t)left);\n+\tto_copy = RTE_MIN(desc->len, left);\n \tdlen = to_copy;\n \tsrc = IOVA_TO_VVA(uint8_t *, vc_req, desc->addr, &dlen,\n \t\t\tVHOST_ACCESS_RO);\n-\tif (unlikely(!src || !dlen))\n+\tif (unlikely(!src || !dlen || dlen > left))\n \t\treturn -1;\n \n-\trte_memcpy((uint8_t *)data, src, dlen);\n+\trte_memcpy(data, src, dlen);\n \tdata += dlen;\n \n \tif (unlikely(dlen < to_copy)) {\n",
    "prefixes": [
        "10/12"
    ]
}