get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 67584,
    "url": "https://patches.dpdk.org/api/patches/67584/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200401212926.74989-1-yong.liu@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": "<20200401212926.74989-1-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200401212926.74989-1-yong.liu@intel.com",
    "date": "2020-04-01T21:29:26",
    "name": "vhost: remove deferred shadow update",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3ebf745e34dd4354a96a8d335a14757718ca37b0",
    "submitter": {
        "id": 17,
        "url": "https://patches.dpdk.org/api/people/17/?format=api",
        "name": "Marvin Liu",
        "email": "yong.liu@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/20200401212926.74989-1-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 9152,
            "url": "https://patches.dpdk.org/api/series/9152/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9152",
            "date": "2020-04-01T21:29:26",
            "name": "vhost: remove deferred shadow update",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/9152/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/67584/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/67584/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 96D49A057B;\n\tWed,  1 Apr 2020 15:53:34 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F1CA1FFA;\n\tWed,  1 Apr 2020 15:53:33 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by dpdk.org (Postfix) with ESMTP id 1915E3B5\n for <dev@dpdk.org>; Wed,  1 Apr 2020 15:53:31 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 01 Apr 2020 06:53:31 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.58])\n by fmsmga005.fm.intel.com with ESMTP; 01 Apr 2020 06:53:29 -0700"
        ],
        "IronPort-SDR": [
            "\n nW2K3GDAcFaMewseJk+Q5RCRAmgSsDRP8EXfpB6ss5izbZ5ltZQru34eOlq902Cl0NP1iq82eu\n yQbkRFEgx8/g==",
            "\n E8GWeyZQnhRItxPjaxiwNuylZ+siYlrVKN7Nl8R9CInOeN8tJYbAyb19fdIxRcUMHBUBFH0+JI\n K5H4wWaeEFLQ=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.72,331,1580803200\"; d=\"scan'208\";a=\"449193278\"",
        "From": "Marvin Liu <yong.liu@intel.com>",
        "To": "maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com,\n eperezma@redhat.com",
        "Cc": "dev@dpdk.org,\n\tMarvin Liu <yong.liu@intel.com>",
        "Date": "Thu,  2 Apr 2020 05:29:26 +0800",
        "Message-Id": "<20200401212926.74989-1-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH] vhost: remove deferred shadow update",
        "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 <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": "Defer shadow ring update will help overall throughput when frontend\nmuch slower than backend. But that is not all the cases we faced now.\nIn case like ovs-dpdk + dpdk virtio user, frontend will much faster\nthan backend. Frontend may not be able to collect available descs when\nshadow update is deferred. Thus will harm RFC2544 performance.\n\nSolution is just remove deferred shadow update, which will help RFC2544\nand fix potential issue with virtio net driver.\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>",
    "diff": "diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 37c47c7dc..2ba0575a7 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -382,25 +382,6 @@ vhost_shadow_enqueue_single_packed(struct virtio_net *dev,\n \t}\n }\n \n-static __rte_always_inline void\n-vhost_flush_dequeue_packed(struct virtio_net *dev,\n-\t\t\t   struct vhost_virtqueue *vq)\n-{\n-\tint shadow_count;\n-\tif (!vq->shadow_used_idx)\n-\t\treturn;\n-\n-\tshadow_count = vq->last_used_idx - vq->shadow_last_used_idx;\n-\tif (shadow_count <= 0)\n-\t\tshadow_count += vq->size;\n-\n-\tif ((uint32_t)shadow_count >= (vq->size - MAX_PKT_BURST)) {\n-\t\tdo_data_copy_dequeue(vq);\n-\t\tvhost_flush_dequeue_shadow_packed(dev, vq);\n-\t\tvhost_vring_call_packed(dev, vq);\n-\t}\n-}\n-\n /* avoid write operation when necessary, to lessen cache issues */\n #define ASSIGN_UNLESS_EQUAL(var, val) do {\t\\\n \tif ((var) != (val))\t\t\t\\\n@@ -2133,20 +2114,6 @@ virtio_dev_tx_packed_zmbuf(struct virtio_net *dev,\n \treturn pkt_idx;\n }\n \n-static __rte_always_inline bool\n-next_desc_is_avail(const struct vhost_virtqueue *vq)\n-{\n-\tbool wrap_counter = vq->avail_wrap_counter;\n-\tuint16_t next_used_idx = vq->last_used_idx + 1;\n-\n-\tif (next_used_idx >= vq->size) {\n-\t\tnext_used_idx -= vq->size;\n-\t\twrap_counter ^= 1;\n-\t}\n-\n-\treturn desc_is_avail(&vq->desc_packed[next_used_idx], wrap_counter);\n-}\n-\n static __rte_noinline uint16_t\n virtio_dev_tx_packed(struct virtio_net *dev,\n \t\t     struct vhost_virtqueue *vq,\n@@ -2163,7 +2130,6 @@ virtio_dev_tx_packed(struct virtio_net *dev,\n \t\tif (remained >= PACKED_BATCH_SIZE) {\n \t\t\tif (!virtio_dev_tx_batch_packed(dev, vq, mbuf_pool,\n \t\t\t\t\t\t\t&pkts[pkt_idx])) {\n-\t\t\t\tvhost_flush_dequeue_packed(dev, vq);\n \t\t\t\tpkt_idx += PACKED_BATCH_SIZE;\n \t\t\t\tremained -= PACKED_BATCH_SIZE;\n \t\t\t\tcontinue;\n@@ -2173,7 +2139,6 @@ virtio_dev_tx_packed(struct virtio_net *dev,\n \t\tif (virtio_dev_tx_single_packed(dev, vq, mbuf_pool,\n \t\t\t\t\t\t&pkts[pkt_idx]))\n \t\t\tbreak;\n-\t\tvhost_flush_dequeue_packed(dev, vq);\n \t\tpkt_idx++;\n \t\tremained--;\n \n@@ -2182,15 +2147,8 @@ virtio_dev_tx_packed(struct virtio_net *dev,\n \tif (vq->shadow_used_idx) {\n \t\tdo_data_copy_dequeue(vq);\n \n-\t\tif (remained && !next_desc_is_avail(vq)) {\n-\t\t\t/*\n-\t\t\t * The guest may be waiting to TX some buffers to\n-\t\t\t * enqueue more to avoid bufferfloat, so we try to\n-\t\t\t * reduce latency here.\n-\t\t\t */\n-\t\t\tvhost_flush_dequeue_shadow_packed(dev, vq);\n-\t\t\tvhost_vring_call_packed(dev, vq);\n-\t\t}\n+\t\tvhost_flush_dequeue_shadow_packed(dev, vq);\n+\t\tvhost_vring_call_packed(dev, vq);\n \t}\n \n \treturn pkt_idx;\n",
    "prefixes": []
}