get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 67266,
    "url": "http://patchwork.dpdk.org/api/patches/67266/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200327165412.87359-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": "<20200327165412.87359-2-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200327165412.87359-2-yong.liu@intel.com",
    "date": "2020-03-27T16:54:06",
    "name": "[v2,1/7] net/virtio: add Rx free threshold setting",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "59d17623bc4a0ebb104f7a6dbe79783b3f179d6a",
    "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/20200327165412.87359-2-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 9075,
            "url": "http://patchwork.dpdk.org/api/series/9075/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=9075",
            "date": "2020-03-27T16:54:05",
            "name": "add packed ring vectorized datapath",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/9075/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/67266/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/67266/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 8055DA0589;\n\tFri, 27 Mar 2020 10:18:20 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 10CCE1C0B3;\n\tFri, 27 Mar 2020 10:18:13 +0100 (CET)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by dpdk.org (Postfix) with ESMTP id E4A521C07F\n for <dev@dpdk.org>; Fri, 27 Mar 2020 10:18:09 +0100 (CET)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Mar 2020 02:18:09 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.58])\n by fmsmga004.fm.intel.com with ESMTP; 27 Mar 2020 02:18:07 -0700"
        ],
        "IronPort-SDR": [
            "\n ziV4wbkKuMBdRXu7uzh3sXKkmmR098wWI2zLpA1bg+vc8IfzveovSRgiw2eTHxyqkU+SGnMn7w\n 4JPVVNyPXw3g==",
            "\n KJDLWxD2DQ6qBdqgDSeDDJP9BYI9Jp7xIRKjCN40ZJSB5+LqASCIGQdPrWZ6sbNfZMhudrDkK3\n UhUKn2crHD9Q=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.72,311,1580803200\"; d=\"scan'208\";a=\"271507873\"",
        "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, 28 Mar 2020 00:54:06 +0800",
        "Message-Id": "<20200327165412.87359-2-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200327165412.87359-1-yong.liu@intel.com>",
        "References": "<20200313174230.74661-1-yong.liu@intel.com>\n <20200327165412.87359-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 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, default value of it is 32.\nLimiated threshold size to multiple of four as only vectorized packed Rx\nfunction will utilize it. Virtio driver will rearm Rx queue when more\nthan rx_free_thresh 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..6301c56b2 100644\n--- a/drivers/net/virtio/virtqueue.h\n+++ b/drivers/net/virtio/virtqueue.h\n@@ -18,6 +18,8 @@\n \n struct rte_mbuf;\n \n+#define DEFAULT_RX_FREE_THRESH 32\n+\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": [
        "v2",
        "1/7"
    ]
}