get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 66643,
    "url": "http://patchwork.dpdk.org/api/patches/66643/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200313174230.74661-2-yong.liu@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20200313174230.74661-2-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200313174230.74661-2-yong.liu@intel.com",
    "date": "2020-03-13T17:42:24",
    "name": "[v1,1/7] net/virtio: add Rx free threshold setting",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7ec6831b9c04e944db6f5c0354cadd1f7734238a",
    "submitter": {
        "id": 17,
        "url": "http://patchwork.dpdk.org/api/people/17/?format=api",
        "name": "Marvin Liu",
        "email": "yong.liu@intel.com"
    },
    "delegate": {
        "id": 2642,
        "url": "http://patchwork.dpdk.org/api/users/2642/?format=api",
        "username": "mcoquelin",
        "first_name": "Maxime",
        "last_name": "Coquelin",
        "email": "maxime.coquelin@redhat.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20200313174230.74661-2-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 8904,
            "url": "http://patchwork.dpdk.org/api/series/8904/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=8904",
            "date": "2020-03-13T17:42:23",
            "name": "vectorize virtio packed ring datapath",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/8904/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/66643/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/66643/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 CA2A1A0567;\n\tFri, 13 Mar 2020 11:07:32 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F2B011C037;\n\tFri, 13 Mar 2020 11:07:27 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by dpdk.org (Postfix) with ESMTP id 0AA542BAA\n for <dev@dpdk.org>; Fri, 13 Mar 2020 11:07:24 +0100 (CET)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 13 Mar 2020 03:07:24 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.58])\n by orsmga006.jf.intel.com with ESMTP; 13 Mar 2020 03:07:23 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.70,548,1574150400\"; d=\"scan'208\";a=\"246653883\"",
        "From": "Marvin Liu <yong.liu@intel.com>",
        "To": "maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com",
        "Cc": "dev@dpdk.org,\n\tMarvin Liu <yong.liu@intel.com>",
        "Date": "Sat, 14 Mar 2020 01:42:24 +0800",
        "Message-Id": "<20200313174230.74661-2-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200313174230.74661-1-yong.liu@intel.com>",
        "References": "<20200313174230.74661-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v1 1/7] net/virtio: add Rx free threshold setting",
        "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": "Introduce free threshold setting in Rx queue. Now default value of Rx\nfree threshold is 32. Limiated threshold size to multiple of four as\nonly vectorized packed Rx function will utilize it. Virtio driver will\nrearm Rx queue when more than threshold descs were dequeued.\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>",
    "diff": "diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c\nindex 752faa0f6..3a2dbc2e0 100644\n--- a/drivers/net/virtio/virtio_rxtx.c\n+++ b/drivers/net/virtio/virtio_rxtx.c\n@@ -936,6 +936,7 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,\n \tstruct virtio_hw *hw = dev->data->dev_private;\n \tstruct virtqueue *vq = hw->vqs[vtpci_queue_idx];\n \tstruct virtnet_rx *rxvq;\n+\tuint16_t rx_free_thresh;\n \n \tPMD_INIT_FUNC_TRACE();\n \n@@ -944,6 +945,28 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev,\n \t\treturn -EINVAL;\n \t}\n \n+\trx_free_thresh = rx_conf->rx_free_thresh;\n+\tif (rx_free_thresh == 0)\n+\t\trx_free_thresh =\n+\t\t\tRTE_MIN(vq->vq_nentries / 4, DEFAULT_RX_FREE_THRESH);\n+\n+\tif (rx_free_thresh & 0x3) {\n+\t\tRTE_LOG(ERR, PMD, \"rx_free_thresh must be multiples of four.\"\n+\t\t\t\" (rx_free_thresh=%u port=%u queue=%u)\\n\",\n+\t\t\trx_free_thresh, dev->data->port_id, queue_idx);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (rx_free_thresh >= vq->vq_nentries) {\n+\t\tRTE_LOG(ERR, PMD, \"rx_free_thresh must be less than the \"\n+\t\t\t\"number of RX entries (%u).\"\n+\t\t\t\" (rx_free_thresh=%u port=%u queue=%u)\\n\",\n+\t\t\tvq->vq_nentries,\n+\t\t\trx_free_thresh, dev->data->port_id, queue_idx);\n+\t\treturn -EINVAL;\n+\t}\n+\tvq->vq_free_thresh = rx_free_thresh;\n+\n \tif (nb_desc == 0 || nb_desc > vq->vq_nentries)\n \t\tnb_desc = vq->vq_nentries;\n \tvq->vq_free_cnt = RTE_MIN(vq->vq_free_cnt, nb_desc);\ndiff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h\nindex 58ad7309a..bce1db030 100644\n--- a/drivers/net/virtio/virtqueue.h\n+++ b/drivers/net/virtio/virtqueue.h\n@@ -18,6 +18,7 @@\n \n struct rte_mbuf;\n \n+#define DEFAULT_RX_FREE_THRESH 32\n /*\n  * Per virtio_ring.h in Linux.\n  *     For virtio_pci on SMP, we don't need to order with respect to MMIO\n",
    "prefixes": [
        "v1",
        "1/7"
    ]
}