get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54903,
    "url": "http://patches.dpdk.org/api/patches/54903/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190618074159.3322-5-tiwei.bie@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20190618074159.3322-5-tiwei.bie@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190618074159.3322-5-tiwei.bie@intel.com",
    "date": "2019-06-18T07:41:59",
    "name": "[4/4] net/virtio: fix packets check in mergeable packed Rx",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5d05ba05c7203d552d8c152b38a6c6a5863fdc46",
    "submitter": {
        "id": 617,
        "url": "http://patches.dpdk.org/api/people/617/?format=api",
        "name": "Tiwei Bie",
        "email": "tiwei.bie@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patches.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190618074159.3322-5-tiwei.bie@intel.com/mbox/",
    "series": [
        {
            "id": 5048,
            "url": "http://patches.dpdk.org/api/series/5048/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5048",
            "date": "2019-06-18T07:41:55",
            "name": "Some fixes for mergeable Rx",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/5048/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54903/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54903/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "X-BeenThere": "dev@dpdk.org",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "From": "Tiwei Bie <tiwei.bie@intel.com>",
        "To": "maxime.coquelin@redhat.com,\n\tzhihong.wang@intel.com,\n\tdev@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "X-Amp-File-Uploaded": "False",
        "References": "<20190618074159.3322-1-tiwei.bie@intel.com>",
        "In-Reply-To": "<20190618074159.3322-1-tiwei.bie@intel.com>",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "X-Mailer": "git-send-email 2.17.1",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4553A1C12B;\n\tTue, 18 Jun 2019 09:43:36 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id E4E191C0DC;\n\tTue, 18 Jun 2019 09:43:29 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t18 Jun 2019 00:43:29 -0700",
            "from npg-dpdk-virtio-tbie-2.sh.intel.com ([10.67.104.151])\n\tby orsmga006.jf.intel.com with ESMTP; 18 Jun 2019 00:43:28 -0700"
        ],
        "X-Original-To": "patchwork@dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Mailman-Version": "2.1.15",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-ExtLoop1": "1",
        "Subject": "[dpdk-dev] [PATCH 4/4] net/virtio: fix packets check in mergeable\n\tpacked Rx",
        "Date": "Tue, 18 Jun 2019 15:41:59 +0800",
        "Message-Id": "<20190618074159.3322-5-tiwei.bie@intel.com>",
        "Cc": "stable@dpdk.org",
        "Precedence": "list"
    },
    "content": "We should check the descriptor state instead of vq's internal\nfree count (i.e. the number of descriptors that we haven't made\navailable) for the remaining mergeable packets.\n\nFixes: a76290c8f1cf (\"net/virtio: implement Rx path for packed queues\")\nCc: stable@dpdk.org\n\nSigned-off-by: Tiwei Bie <tiwei.bie@intel.com>\n---\n drivers/net/virtio/virtio_rxtx.c | 50 +++++++++++++++-----------------\n 1 file changed, 23 insertions(+), 27 deletions(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c\nindex 8b75291f5..b5062ff84 100644\n--- a/drivers/net/virtio/virtio_rxtx.c\n+++ b/drivers/net/virtio/virtio_rxtx.c\n@@ -1882,38 +1882,34 @@ virtio_recv_mergeable_pkts_packed(void *rx_queue,\n \twhile (seg_res != 0) {\n \t\tuint16_t rcv_cnt = RTE_MIN((uint16_t)seg_res,\n \t\t\t\t\tVIRTIO_MBUF_BURST_SZ);\n-\t\tif (likely(vq->vq_free_cnt >= rcv_cnt)) {\n-\t\t\tnum = virtqueue_dequeue_burst_rx_packed(vq, rcv_pkts,\n-\t\t\t\t\tlen, rcv_cnt);\n-\t\t\tuint16_t extra_idx = 0;\n+\t\tuint16_t extra_idx = 0;\n \n-\t\t\trcv_cnt = num;\n-\n-\t\t\twhile (extra_idx < rcv_cnt) {\n-\t\t\t\trxm = rcv_pkts[extra_idx];\n-\n-\t\t\t\trxm->data_off =\n-\t\t\t\t\tRTE_PKTMBUF_HEADROOM - hdr_size;\n-\t\t\t\trxm->pkt_len = (uint32_t)(len[extra_idx]);\n-\t\t\t\trxm->data_len = (uint16_t)(len[extra_idx]);\n-\n-\t\t\t\tprev->next = rxm;\n-\t\t\t\tprev = rxm;\n-\t\t\t\trx_pkts[nb_rx]->pkt_len += len[extra_idx];\n-\t\t\t\textra_idx += 1;\n-\t\t\t}\n-\t\t\tseg_res -= rcv_cnt;\n-\t\t\tif (!seg_res) {\n-\t\t\t\tvirtio_rx_stats_updated(rxvq, rx_pkts[nb_rx]);\n-\t\t\t\tnb_rx++;\n-\t\t\t}\n-\t\t} else {\n-\t\t\tPMD_RX_LOG(ERR,\n-\t\t\t\t\t\"No enough segments for packet.\");\n+\t\trcv_cnt = virtqueue_dequeue_burst_rx_packed(vq, rcv_pkts,\n+\t\t\t\tlen, rcv_cnt);\n+\t\tif (unlikely(rcv_cnt == 0)) {\n+\t\t\tPMD_RX_LOG(ERR, \"No enough segments for packet.\");\n \t\t\trte_pktmbuf_free(rx_pkts[nb_rx]);\n \t\t\trxvq->stats.errors++;\n \t\t\tbreak;\n \t\t}\n+\n+\t\twhile (extra_idx < rcv_cnt) {\n+\t\t\trxm = rcv_pkts[extra_idx];\n+\n+\t\t\trxm->data_off = RTE_PKTMBUF_HEADROOM - hdr_size;\n+\t\t\trxm->pkt_len = (uint32_t)(len[extra_idx]);\n+\t\t\trxm->data_len = (uint16_t)(len[extra_idx]);\n+\n+\t\t\tprev->next = rxm;\n+\t\t\tprev = rxm;\n+\t\t\trx_pkts[nb_rx]->pkt_len += len[extra_idx];\n+\t\t\textra_idx += 1;\n+\t\t}\n+\t\tseg_res -= rcv_cnt;\n+\t\tif (!seg_res) {\n+\t\t\tvirtio_rx_stats_updated(rxvq, rx_pkts[nb_rx]);\n+\t\t\tnb_rx++;\n+\t\t}\n \t}\n \n \trxvq->stats.packets += nb_rx;\n",
    "prefixes": [
        "4/4"
    ]
}