get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 69080,
    "url": "http://patches.dpdk.org/api/patches/69080/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200422061624.110901-2-yong.liu@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": "<20200422061624.110901-2-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200422061624.110901-2-yong.liu@intel.com",
    "date": "2020-04-22T06:16:16",
    "name": "[v7,1/9] net/virtio: add Rx free threshold setting",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "59d17623bc4a0ebb104f7a6dbe79783b3f179d6a",
    "submitter": {
        "id": 17,
        "url": "http://patches.dpdk.org/api/people/17/?format=api",
        "name": "Marvin Liu",
        "email": "yong.liu@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/20200422061624.110901-2-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 9561,
            "url": "http://patches.dpdk.org/api/series/9561/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9561",
            "date": "2020-04-22T06:16:15",
            "name": "add packed ring vectorized path",
            "version": 7,
            "mbox": "http://patches.dpdk.org/series/9561/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/69080/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/69080/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 7ADECA00C2;\n\tWed, 22 Apr 2020 08:17:44 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 19CA61C293;\n\tWed, 22 Apr 2020 08:17:36 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by dpdk.org (Postfix) with ESMTP id 4B9E21C24A\n for <dev@dpdk.org>; Wed, 22 Apr 2020 08:17:34 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Apr 2020 23:17:33 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.56])\n by fmsmga004.fm.intel.com with ESMTP; 21 Apr 2020 23:17:32 -0700"
        ],
        "IronPort-SDR": [
            "\n B8qB7trrv//jmNVzvMAwmIb/y3yuJdUmMheGc3kOc4M1NV5V3M4gRLnPEx2+M3Qy7s6KsrgiDF\n pxml7Utd3PoQ==",
            "\n EQKhHEqJMA6R5DvnHQeY4B23wGbmj/kWKIL97H7Hj+GD+tdnN777477JQPFeWsS+A/bdtLATE/\n U0zSJ1yob8ag=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.72,412,1580803200\"; d=\"scan'208\";a=\"279904520\"",
        "From": "Marvin Liu <yong.liu@intel.com>",
        "To": "maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com,\n harry.van.haaren@intel.com",
        "Cc": "dev@dpdk.org,\n\tMarvin Liu <yong.liu@intel.com>",
        "Date": "Wed, 22 Apr 2020 14:16:16 +0800",
        "Message-Id": "<20200422061624.110901-2-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200422061624.110901-1-yong.liu@intel.com>",
        "References": "<20200313174230.74661-1-yong.liu@intel.com>\n <20200422061624.110901-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v7 1/9] 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 060410577..94ba7a3ec 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": [
        "v7",
        "1/9"
    ]
}