get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 44374,
    "url": "https://patches.dpdk.org/api/patches/44374/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1536305094-126439-1-git-send-email-jiayu.hu@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": "<1536305094-126439-1-git-send-email-jiayu.hu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1536305094-126439-1-git-send-email-jiayu.hu@intel.com",
    "date": "2018-09-07T07:24:54",
    "name": "vhost: fix corner case for split ring enqueue operation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "21092b16f54ce24ca54490925666563a233459e4",
    "submitter": {
        "id": 539,
        "url": "https://patches.dpdk.org/api/people/539/?format=api",
        "name": "Hu, Jiayu",
        "email": "jiayu.hu@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/1536305094-126439-1-git-send-email-jiayu.hu@intel.com/mbox/",
    "series": [
        {
            "id": 1219,
            "url": "https://patches.dpdk.org/api/series/1219/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1219",
            "date": "2018-09-07T07:24:54",
            "name": "vhost: fix corner case for split ring enqueue operation",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/1219/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/44374/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/44374/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5509A37B0;\n\tFri,  7 Sep 2018 09:16:40 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 632A9325F\n\tfor <dev@dpdk.org>; Fri,  7 Sep 2018 09:16:38 +0200 (CEST)",
            "from fmsmga007.fm.intel.com ([10.253.24.52])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Sep 2018 00:16:37 -0700",
            "from dpdk15.sh.intel.com ([10.67.111.146])\n\tby fmsmga007.fm.intel.com with ESMTP; 07 Sep 2018 00:16:35 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,341,1531810800\"; d=\"scan'208\";a=\"68242172\"",
        "From": "Jiayu Hu <jiayu.hu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "zhihong.wang@intel.com, tiwei.bie@intel.com, maxime.coquelin@redhat.com, \n\tJiayu Hu <jiayu.hu@intel.com>",
        "Date": "Fri,  7 Sep 2018 15:24:54 +0800",
        "Message-Id": "<1536305094-126439-1-git-send-email-jiayu.hu@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "Subject": "[dpdk-dev] [PATCH] vhost: fix corner case for split ring enqueue\n\toperation",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When perform enqueue operations on the split ring, if the\nreserved buffer length from the descriptor table execeeds 65535,\nthe returned length by fill_vec_buf_split() is overflowed.\nThis patch is to avoid this corner case.\n\nFixes: f689586bc060 (\"vhost: shadow used ring update\")\n\nSigned-off-by: Jiayu Hu <jiayu.hu@intel.com>\n---\n lib/librte_vhost/virtio_net.c | 9 +++++----\n 1 file changed, 5 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 99c7afc..9f3c88f 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -122,7 +122,7 @@ flush_shadow_used_ring_split(struct virtio_net *dev, struct vhost_virtqueue *vq)\n \n static __rte_always_inline void\n update_shadow_used_ring_split(struct vhost_virtqueue *vq,\n-\t\t\t uint16_t desc_idx, uint16_t len)\n+\t\t\t uint16_t desc_idx, uint32_t len)\n {\n \tuint16_t i = vq->shadow_used_idx++;\n \n@@ -329,7 +329,7 @@ static __rte_always_inline int\n fill_vec_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t\t uint32_t avail_idx, uint16_t *vec_idx,\n \t\t\t struct buf_vector *buf_vec, uint16_t *desc_chain_head,\n-\t\t\t uint16_t *desc_chain_len, uint8_t perm)\n+\t\t\t uint32_t *desc_chain_len, uint8_t perm)\n {\n \tuint16_t idx = vq->avail->ring[avail_idx & (vq->size - 1)];\n \tuint16_t vec_id = *vec_idx;\n@@ -409,7 +409,7 @@ reserve_avail_buf_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tuint16_t max_tries, tries = 0;\n \n \tuint16_t head_idx = 0;\n-\tuint16_t len = 0;\n+\tuint32_t len = 0;\n \n \t*num_buffers = 0;\n \tcur_idx  = vq->last_avail_idx;\n@@ -1378,7 +1378,8 @@ virtio_dev_tx_split(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \n \tfor (i = 0; i < count; i++) {\n \t\tstruct buf_vector buf_vec[BUF_VECTOR_MAX];\n-\t\tuint16_t head_idx, dummy_len;\n+\t\tuint16_t head_idx;\n+\t\tuint32_t dummy_len;\n \t\tuint16_t nr_vec = 0;\n \t\tint err;\n \n",
    "prefixes": []
}