get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 5083,
    "url": "https://patches.dpdk.org/api/patches/5083/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1433235064-2773-5-git-send-email-changchun.ouyang@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": "<1433235064-2773-5-git-send-email-changchun.ouyang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1433235064-2773-5-git-send-email-changchun.ouyang@intel.com",
    "date": "2015-06-02T08:51:04",
    "name": "[dpdk-dev,v4,4/4] lib_vhost: Remove unnecessary vring descriptor length updating",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "90954155405db188071ec8dd9af1949b0ce1ccd8",
    "submitter": {
        "id": 31,
        "url": "https://patches.dpdk.org/api/people/31/?format=api",
        "name": "Ouyang Changchun",
        "email": "changchun.ouyang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1433235064-2773-5-git-send-email-changchun.ouyang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/5083/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/5083/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 7CE5FC3A6;\n\tTue,  2 Jun 2015 10:51:23 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id CDA44C3B8\n\tfor <dev@dpdk.org>; Tue,  2 Jun 2015 10:51:21 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga103.jf.intel.com with ESMTP; 02 Jun 2015 01:51:21 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 02 Jun 2015 01:51:20 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t528pIJY007984;\n\tTue, 2 Jun 2015 16:51:18 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t528pFpV002834; Tue, 2 Jun 2015 16:51:17 +0800",
            "(from couyang@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t528pFQC002830; \n\tTue, 2 Jun 2015 16:51:15 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.13,538,1427785200\"; d=\"scan'208\";a=\"703807544\"",
        "From": "Ouyang Changchun <changchun.ouyang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue,  2 Jun 2015 16:51:04 +0800",
        "Message-Id": "<1433235064-2773-5-git-send-email-changchun.ouyang@intel.com>",
        "X-Mailer": "git-send-email 1.7.12.2",
        "In-Reply-To": "<1433235064-2773-1-git-send-email-changchun.ouyang@intel.com>",
        "References": "<1433147149-31645-1-git-send-email-changchun.ouyang@intel.com>\n\t<1433235064-2773-1-git-send-email-changchun.ouyang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 4/4] lib_vhost: Remove unnecessary vring\n\tdescriptor length updating",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Remove these unnecessary vring descriptor length updating, vhost should not change them.\nvirtio in front end should assign value to desc.len for both rx and tx.\n\nSigned-off-by: Changchun Ouyang <changchun.ouyang@intel.com>\n---\n lib/librte_vhost/vhost_rxtx.c | 18 +-----------------\n 1 file changed, 1 insertion(+), 17 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c\nindex e08609c..6ec3d5f 100644\n--- a/lib/librte_vhost/vhost_rxtx.c\n+++ b/lib/librte_vhost/vhost_rxtx.c\n@@ -136,7 +136,6 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id,\n \t\t * placed in separate buffers.\n \t\t */\n \t\tif (desc->flags & VRING_DESC_F_NEXT) {\n-\t\t\tdesc->len = vq->vhost_hlen;\n \t\t\tdesc = &vq->desc[desc->next];\n \t\t\t/* Buffer address translation. */\n \t\t\tbuff_addr = gpa_to_vva(dev, desc->addr);\n@@ -290,7 +289,6 @@ copy_from_mbuf_to_vring(struct virtio_net *dev, uint16_t res_base_idx,\n \tif (vb_avail == 0) {\n \t\tuint32_t desc_idx =\n \t\t\tvq->buf_vec[vec_idx].desc_idx;\n-\t\tvq->desc[desc_idx].len = vq->vhost_hlen;\n \n \t\tif ((vq->desc[desc_idx].flags\n \t\t\t& VRING_DESC_F_NEXT) == 0) {\n@@ -374,7 +372,6 @@ copy_from_mbuf_to_vring(struct virtio_net *dev, uint16_t res_base_idx,\n \t\t\t\t\t */\n \t\t\t\t\tuint32_t desc_idx =\n \t\t\t\t\t\tvq->buf_vec[vec_idx].desc_idx;\n-\t\t\t\t\tvq->desc[desc_idx].len = vb_offset;\n \n \t\t\t\t\tif ((vq->desc[desc_idx].flags &\n \t\t\t\t\t\tVRING_DESC_F_NEXT) == 0) {\n@@ -409,26 +406,13 @@ copy_from_mbuf_to_vring(struct virtio_net *dev, uint16_t res_base_idx,\n \t\t\t\t/*\n \t\t\t\t * This whole packet completes.\n \t\t\t\t */\n-\t\t\t\tuint32_t desc_idx =\n-\t\t\t\t\tvq->buf_vec[vec_idx].desc_idx;\n-\t\t\t\tvq->desc[desc_idx].len = vb_offset;\n-\n-\t\t\t\twhile (vq->desc[desc_idx].flags &\n-\t\t\t\t\tVRING_DESC_F_NEXT) {\n-\t\t\t\t\tdesc_idx = vq->desc[desc_idx].next;\n-\t\t\t\t\t vq->desc[desc_idx].len = 0;\n-\t\t\t\t}\n-\n \t\t\t\t/* Update used ring with desc information */\n \t\t\t\tvq->used->ring[cur_idx & (vq->size - 1)].id\n \t\t\t\t\t= vq->buf_vec[vec_idx].desc_idx;\n \t\t\t\tvq->used->ring[cur_idx & (vq->size - 1)].len\n \t\t\t\t\t= entry_len;\n-\t\t\t\tentry_len = 0;\n-\t\t\t\tcur_idx++;\n \t\t\t\tentry_success++;\n-\t\t\t\tseg_avail = 0;\n-\t\t\t\tcpy_len = RTE_MIN(vb_avail, seg_avail);\n+\t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "4/4"
    ]
}