get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45071,
    "url": "https://patches.dpdk.org/api/patches/45071/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180921103308.16357-5-jfreimann@redhat.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": "<20180921103308.16357-5-jfreimann@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180921103308.16357-5-jfreimann@redhat.com",
    "date": "2018-09-21T10:33:01",
    "name": "[v6,04/11] net/virtio: flush packed receive virtqueues",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "04738a821952aa6455258d0e6a7b9d104470be58",
    "submitter": {
        "id": 745,
        "url": "https://patches.dpdk.org/api/people/745/?format=api",
        "name": "Jens Freimann",
        "email": "jfreimann@redhat.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/20180921103308.16357-5-jfreimann@redhat.com/mbox/",
    "series": [
        {
            "id": 1435,
            "url": "https://patches.dpdk.org/api/series/1435/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1435",
            "date": "2018-09-21T10:32:57",
            "name": "implement packed virtqueues",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/1435/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/45071/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/45071/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 50BDC4F94;\n\tFri, 21 Sep 2018 12:33:53 +0200 (CEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id C0A094F94\n\tfor <dev@dpdk.org>; Fri, 21 Sep 2018 12:33:51 +0200 (CEST)",
            "from smtp.corp.redhat.com\n\t(int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 36CF888E63;\n\tFri, 21 Sep 2018 10:33:51 +0000 (UTC)",
            "from localhost (dhcp-192-209.str.redhat.com [10.33.192.209])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 39529106A788;\n\tFri, 21 Sep 2018 10:33:44 +0000 (UTC)"
        ],
        "From": "Jens Freimann <jfreimann@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "tiwei.bie@intel.com,\n\tmaxime.coquelin@redhat.com,\n\tGavin.Hu@arm.com",
        "Date": "Fri, 21 Sep 2018 12:33:01 +0200",
        "Message-Id": "<20180921103308.16357-5-jfreimann@redhat.com>",
        "In-Reply-To": "<20180921103308.16357-1-jfreimann@redhat.com>",
        "References": "<20180921103308.16357-1-jfreimann@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.84 on 10.5.11.22",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]); Fri, 21 Sep 2018 10:33:51 +0000 (UTC)",
        "Subject": "[dpdk-dev] [PATCH v6 04/11] net/virtio: flush packed receive\n\tvirtqueues",
        "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": "Flush used descriptors in packed receive virtqueue. As descriptors\ncan be chained we need to look at the stored number of used descriptors\nto find out the length of the chain.\n\nSigned-off-by: Jens Freimann <jfreimann@redhat.com>\n---\n drivers/net/virtio/virtqueue.c | 21 +++++++++++++++++++++\n 1 file changed, 21 insertions(+)",
    "diff": "diff --git a/drivers/net/virtio/virtqueue.c b/drivers/net/virtio/virtqueue.c\nindex 56a77cc71..46dd9de52 100644\n--- a/drivers/net/virtio/virtqueue.c\n+++ b/drivers/net/virtio/virtqueue.c\n@@ -58,12 +58,33 @@ virtqueue_detach_unused(struct virtqueue *vq)\n void\n virtqueue_rxvq_flush(struct virtqueue *vq)\n {\n+\tstruct vring_desc_packed *descs = vq->vq_ring.desc_packed;\n \tstruct virtnet_rx *rxq = &vq->rxq;\n \tstruct virtio_hw *hw = vq->hw;\n \tstruct vring_used_elem *uep;\n \tstruct vq_desc_extra *dxp;\n \tuint16_t used_idx, desc_idx;\n \tuint16_t nb_used, i;\n+\tuint16_t size = vq->vq_nentries;\n+\n+\tif (vtpci_packed_queue(vq->hw)) {\n+\t\ti = vq->vq_used_cons_idx;\n+\t\tif (i >= vq->vq_used_cons_idx) {\n+\t\t\tPMD_INIT_LOG(ERR, \"vq_used_cons_idx out of range\");\n+\t\t\treturn;\n+\t\t}\n+\t\twhile (desc_is_used(&descs[i], &vq->vq_ring) &&\n+\t\t\ti < vq->vq_nentries) {\n+\t\t\tdxp = &vq->vq_descx[i];\n+\t\t\tif (dxp->cookie != NULL)\n+\t\t\t\trte_pktmbuf_free(dxp->cookie);\n+\t\t\tvq->vq_free_cnt += dxp->ndescs;\n+\t\t\ti = i + dxp->ndescs;\n+\t\t\ti = i >= size ? i - size : i;\n+\t\t\tdxp->ndescs = 0;\n+\t\t}\n+\t\treturn;\n+\t}\n \n \tnb_used = VIRTQUEUE_NUSED(vq);\n \n",
    "prefixes": [
        "v6",
        "04/11"
    ]
}