get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 56215,
    "url": "https://patches.dpdk.org/api/patches/56215/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190708171320.38802-9-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": "<20190708171320.38802-9-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190708171320.38802-9-yong.liu@intel.com",
    "date": "2019-07-08T17:13:15",
    "name": "[RFC,08/13] add vhost fast dequeue flush function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "bd41147a7852fcd95d0c91fbe25c9ebdcd3fbef1",
    "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/20190708171320.38802-9-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 5390,
            "url": "https://patches.dpdk.org/api/series/5390/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=5390",
            "date": "2019-07-08T17:13:08",
            "name": "[RFC,01/13] add vhost normal enqueue function",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/5390/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/56215/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/56215/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 4E0AF1B9E9;\n\tMon,  8 Jul 2019 11:30:10 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id BA3741B95C\n\tfor <dev@dpdk.org>; Mon,  8 Jul 2019 11:29:57 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Jul 2019 02:29:57 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.142])\n\tby orsmga007.jf.intel.com with ESMTP; 08 Jul 2019 02:29:55 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.63,466,1557212400\"; d=\"scan'208\";a=\"155821678\"",
        "From": "Marvin Liu <yong.liu@intel.com>",
        "To": "tiwei.bie@intel.com,\n\tmaxime.coquelin@redhat.com,\n\tdev@dpdk.org",
        "Cc": "Marvin Liu <yong.liu@intel.com>",
        "Date": "Tue,  9 Jul 2019 01:13:15 +0800",
        "Message-Id": "<20190708171320.38802-9-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190708171320.38802-1-yong.liu@intel.com>",
        "References": "<20190708171320.38802-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [RFC PATCH 08/13] add vhost fast dequeue flush function",
        "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": "Vhost fast dequeue function will flush used ring immediately.\nDescriptor's flag is pre-calculated by macro.\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 83ed2d599..cd51ed47a 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -265,6 +265,21 @@ flush_used_fast_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t}\n }\n \n+static __rte_always_inline void\n+flush_dequeue_fast_used_packed(struct virtio_net *dev,\n+\t\t\tstruct vhost_virtqueue *vq, uint16_t id,\n+\t\t\tuint16_t id1, uint16_t id2, uint16_t id3)\n+{\n+\tuint16_t flags = 0;\n+\n+\tif (vq->used_wrap_counter)\n+\t\tflags = VIRTIO_TX_FLAG_PACKED;\n+\telse\n+\t\tflags = VIRTIO_TX_WRAP_FLAG_PACKED;\n+\n+\tflush_used_fast_packed(dev, vq, 0, 0, 0, 0, id, id1, id2, id3, flags);\n+}\n+\n static __rte_always_inline void\n flush_enqueue_fast_used_packed(struct virtio_net *dev,\n \t\t\tstruct vhost_virtqueue *vq, uint64_t len,\n@@ -1946,6 +1961,8 @@ virtio_dev_tx_fast_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \t\t(void *)(uintptr_t)(desc_addr[3] + buf_offset),\n \t\tpkts[3]->pkt_len);\n \n+\tflush_dequeue_fast_used_packed(dev, vq, ids[0], ids[1], ids[2],\n+\t\t\t\tids[3]);\n \tif (virtio_net_with_host_offload(dev)) {\n \t\thdr = (struct virtio_net_hdr *)((uintptr_t)desc_addr[0]);\n \t\thdr1 = (struct virtio_net_hdr *)((uintptr_t)desc_addr[1]);\n",
    "prefixes": [
        "RFC",
        "08/13"
    ]
}