get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 732,
    "url": "https://patches.dpdk.org/api/patches/732/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1412794499-4332-7-git-send-email-huawei.xie@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": "<1412794499-4332-7-git-send-email-huawei.xie@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1412794499-4332-7-git-send-email-huawei.xie@intel.com",
    "date": "2014-10-08T18:54:40",
    "name": "[dpdk-dev,v6,06/25] lib/librte_vhost: remove retry logic",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "341a46566d9aa47792f2986293d994bedf05468a",
    "submitter": {
        "id": 16,
        "url": "https://patches.dpdk.org/api/people/16/?format=api",
        "name": "Huawei Xie",
        "email": "huawei.xie@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1412794499-4332-7-git-send-email-huawei.xie@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/732/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/732/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 2FB507EA8;\n\tWed,  8 Oct 2014 20:48:56 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id BB2287EA8\n\tfor <dev@dpdk.org>; Wed,  8 Oct 2014 20:48:54 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga101.fm.intel.com with ESMTP; 08 Oct 2014 11:56:12 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 08 Oct 2014 11:56:12 -0700",
            "from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com\n\t[10.239.29.90])\n\tby shvmail01.sh.intel.com with ESMTP id s98IuAlV021058;\n\tThu, 9 Oct 2014 02:56:10 +0800",
            "from shecgisg003.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid s98Iu8PI004413; Thu, 9 Oct 2014 02:56:10 +0800",
            "(from hxie5@localhost)\n\tby shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id s98Iu8qB004409; \n\tThu, 9 Oct 2014 02:56:08 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.04,679,1406617200\"; d=\"scan'208\";a=\"602429748\"",
        "From": "Huawei Xie <huawei.xie@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu,  9 Oct 2014 02:54:40 +0800",
        "Message-Id": "<1412794499-4332-7-git-send-email-huawei.xie@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1412794499-4332-1-git-send-email-huawei.xie@intel.com>",
        "References": "<1412794499-4332-1-git-send-email-huawei.xie@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v6 06/25] lib/librte_vhost: remove retry logic",
        "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": "retry is used to wait some time and retry when there are not enough descriptors.\nApp could implement this policy easily if it needs.\n\nSigned-off-by: Huawei Xie <huawei.xie@intel.com>\n---\n lib/librte_vhost/vhost_rxtx.c | 34 ----------------------------------\n 1 file changed, 34 deletions(-)",
    "diff": "diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c\nindex d553e71..c9e3b1e 100644\n--- a/lib/librte_vhost/vhost_rxtx.c\n+++ b/lib/librte_vhost/vhost_rxtx.c\n@@ -72,7 +72,6 @@ virtio_dev_rx(struct virtio_net *dev, struct rte_mbuf **pkts, uint32_t count)\n \tuint64_t buff_hdr_addr = 0;\n \tuint32_t head[MAX_PKT_BURST], packet_len = 0;\n \tuint32_t head_idx, packet_success = 0;\n-\tuint32_t retry = 0;\n \tuint16_t avail_idx, res_cur_idx;\n \tuint16_t res_base_idx, res_end_idx;\n \tuint16_t free_entries;\n@@ -88,18 +87,6 @@ virtio_dev_rx(struct virtio_net *dev, struct rte_mbuf **pkts, uint32_t count)\n \t\tavail_idx = *((volatile uint16_t *)&vq->avail->idx);\n \n \t\tfree_entries = (avail_idx - res_base_idx);\n-\t\t/* If retry is enabled and the queue is full then we wait and retry to avoid packet loss. */\n-\t\tif (enable_retry && unlikely(count > free_entries)) {\n-\t\t\tfor (retry = 0; retry < burst_rx_retry_num; retry++) {\n-\t\t\t\trte_delay_us(burst_rx_delay_time);\n-\t\t\t\tavail_idx =\n-\t\t\t\t\t*((volatile uint16_t *)&vq->avail->idx);\n-\t\t\t\tfree_entries = (avail_idx - res_base_idx);\n-\t\t\t\tif (count <= free_entries)\n-\t\t\t\t\tbreak;\n-\t\t\t}\n-\t\t}\n-\n \t\t/*check that we have enough buffers*/\n \t\tif (unlikely(count > free_entries))\n \t\t\tcount = free_entries;\n@@ -413,7 +400,6 @@ virtio_dev_merge_rx(struct virtio_net *dev, struct rte_mbuf **pkts,\n {\n \tstruct vhost_virtqueue *vq;\n \tuint32_t pkt_idx = 0, entry_success = 0;\n-\tuint32_t retry = 0;\n \tuint16_t avail_idx, res_cur_idx;\n \tuint16_t res_base_idx, res_end_idx;\n \tuint8_t success = 0;\n@@ -444,26 +430,6 @@ virtio_dev_merge_rx(struct virtio_net *dev, struct rte_mbuf **pkts,\n \t\t\tdo {\n \t\t\t\tavail_idx = *((volatile uint16_t *)&vq->avail->idx);\n \t\t\t\tif (unlikely(res_cur_idx == avail_idx)) {\n-\t\t\t\t\t/*\n-\t\t\t\t\t * If retry is enabled and the queue is\n-\t\t\t\t\t * full then we wait and retry to avoid\n-\t\t\t\t\t * packet loss.\n-\t\t\t\t\t */\n-\t\t\t\t\tif (enable_retry) {\n-\t\t\t\t\t\tuint8_t cont = 0;\n-\t\t\t\t\t\tfor (retry = 0; retry < burst_rx_retry_num; retry++) {\n-\t\t\t\t\t\t\trte_delay_us(burst_rx_delay_time);\n-\t\t\t\t\t\t\tavail_idx =\n-\t\t\t\t\t\t\t\t*((volatile uint16_t *)&vq->avail->idx);\n-\t\t\t\t\t\t\tif (likely(res_cur_idx != avail_idx)) {\n-\t\t\t\t\t\t\t\tcont = 1;\n-\t\t\t\t\t\t\t\tbreak;\n-\t\t\t\t\t\t\t}\n-\t\t\t\t\t\t}\n-\t\t\t\t\t\tif (cont == 1)\n-\t\t\t\t\t\t\tcontinue;\n-\t\t\t\t\t}\n-\n \t\t\t\t\tLOG_DEBUG(VHOST_DATA,\n \t\t\t\t\t\t\"(%\"PRIu64\") Failed \"\n \t\t\t\t\t\t\"to get enough desc from \"\n",
    "prefixes": [
        "dpdk-dev",
        "v6",
        "06/25"
    ]
}