Show a patch.

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

{
    "id": 43657,
    "url": "http://patches.dpdk.org/api/patches/43657/",
    "web_url": "http://patches.dpdk.org/patch/43657/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<20180809175008.5787-3-stephen@networkplumber.org>",
    "date": "2018-08-09T17:50:06",
    "name": "[2/4] bus/vmbus: add host latency tuning function",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "903ecc41b141a273e6b12792d663e12ba6856427",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "mbox": "http://patches.dpdk.org/patch/43657/mbox/",
    "series": [
        {
            "id": 954,
            "url": "http://patches.dpdk.org/api/series/954/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=954",
            "date": "2018-08-09T17:50:04",
            "name": "netvsc performance enhancements",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/954/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43657/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43657/checks/",
    "tags": {},
    "headers": {
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "To": "dev@dpdk.org",
        "X-Google-Smtp-Source": "AA+uWPwU2qjZKJwOzZ3izHzi/iolYxEYD/r+jkNWGhAcaW9k2Qq+yChOJipX4LGEOWD5JFdmYMmY+A==",
        "Message-Id": "<20180809175008.5787-3-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.18.0",
        "X-Gm-Message-State": "AOUpUlFm5RSlelqQW95mLlh89ykG0D7XmO+8+DBC1ls1EjVAxVIbvuu2\n\th1ZE+ZPinB+lZolHirC5CAmEyV2Ov4k=",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=naiS10gSZtfmF3kVjCxn/koiL4XuWWzSvx7Re+7HG0Q=;\n\tb=0VBFERMW23r1D2jy2pILfO7bynM6iKrcTg/Y1e4kdw5AhdLPOuI2N93OOPIbeQfNLx\n\tZ8EvKVUdKk73AY5/jvXGSK1Y7xTFouRt4AuqzUS6hxilVclfor+Y7d0kP/HGPwuUgib/\n\tn+EHB/D8OF49NkPsZKupZywXEk13tGQ+ZxFixpxsgk+z3rDVsZCgGyFZl8Vjds2dGcEc\n\t8vpVfmlxU9+LQBRYf9NOnwFkP2Tocygxs0Bu5vczaNfvrMV3jaIMGqni+dgRp0DXDv9N\n\tDahDeFrnuhHieXC+Q6M8cLRjwCsDIggd4S07VIBIsIsP4SCFEYE+phMm+TMA08ji9gBe\n\taouw==",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-BeenThere": "dev@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 2E7854C6F;\n\tThu,  9 Aug 2018 19:50:25 +0200 (CEST)",
            "from mail-pg1-f194.google.com (mail-pg1-f194.google.com\n\t[209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 1133D2BCD\n\tfor <dev@dpdk.org>; Thu,  9 Aug 2018 19:50:21 +0200 (CEST)",
            "by mail-pg1-f194.google.com with SMTP id w10-v6so3099202pgv.2\n\tfor <dev@dpdk.org>; Thu, 09 Aug 2018 10:50:20 -0700 (PDT)",
            "from xeon-e3.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\tn22-v6sm14993873pfj.68.2018.08.09.10.50.18\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 09 Aug 2018 10:50:18 -0700 (PDT)"
        ],
        "Subject": "[dpdk-dev] [PATCH 2/4] bus/vmbus: add host latency tuning function",
        "In-Reply-To": "<20180809175008.5787-1-stephen@networkplumber.org>",
        "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-Post": "<mailto:dev@dpdk.org>",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n\tStephen Hemminger <sthemmin@microsoft.com>",
        "Precedence": "list",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "X-Received": "by 2002:a62:be03:: with SMTP id\n\tl3-v6mr3383741pff.138.1533837019934; \n\tThu, 09 Aug 2018 10:50:19 -0700 (PDT)",
        "References": "<20180809175008.5787-1-stephen@networkplumber.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Delivered-To": "patchwork@dpdk.org",
        "Date": "Thu,  9 Aug 2018 10:50:06 -0700",
        "X-Mailman-Version": "2.1.15",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=naiS10gSZtfmF3kVjCxn/koiL4XuWWzSvx7Re+7HG0Q=;\n\tb=BP13ZoNK1J0rtnzeLejNK9nJnouJVnl7A98ytkufct/NIvnvXdeNTHIKUGv+9o+Y1D\n\tJL/nhV/UGYb0mSaIjgAnGTYSP958c2GgrULiESWcksVnK2ywk0CtVlO7lByLWfjWETav\n\taJPXIob4k6e5jF/HSWN8gWsTOZDjRMeW2JPiOtq+C9JRgCcA2j7uVGMJOCphuc3VLpHs\n\tWrPdrK126iamr6V4lXf51Z+y2pwG04NjP6oRITIbhy5HpsWDIQyx41G305/49dI5itgk\n\t7GV9nEqE85beJiL28w6wnzB2SM6AsPNvlL3/zZ+92J4vPSWaAwgmQTa5OYcb9icpWw+7\n\tvEWg=="
    },
    "content": "Add vmbus API to allow tuning the scan interval on the host side.\n\nSigned-off-by: Stephen Hemminger <sthemmin@microsoft.com>\n---\n drivers/bus/vmbus/rte_bus_vmbus.h           | 15 ++++++++++++\n drivers/bus/vmbus/rte_bus_vmbus_version.map |  1 +\n drivers/bus/vmbus/vmbus_channel.c           | 26 +++++++++++++++++++++\n 3 files changed, 42 insertions(+)",
    "diff": "diff --git a/drivers/bus/vmbus/rte_bus_vmbus.h b/drivers/bus/vmbus/rte_bus_vmbus.h\nindex 4a2c1f6fd918..2839fef5b27a 100644\n--- a/drivers/bus/vmbus/rte_bus_vmbus.h\n+++ b/drivers/bus/vmbus/rte_bus_vmbus.h\n@@ -364,6 +364,21 @@ void rte_vmbus_chan_signal_read(struct vmbus_channel *chan, uint32_t bytes_read)\n  */\n uint16_t rte_vmbus_sub_channel_index(const struct vmbus_channel *chan);\n \n+/**\n+ * Set the host monitor latency hint\n+ *\n+ * @param dev\n+ *    VMBUS device\n+ * @param chan\n+ *\tPointer to vmbus_channel structure.\n+ * @param latency\n+ *\tApproximate wait period between hypervisor examinations of\n+ *\tthe trigger page (in nanoseconds).\n+ */\n+void rte_vmbus_set_latency(const struct rte_vmbus_device *dev,\n+\t\t\t   const struct vmbus_channel *chan,\n+\t\t\t   uint32_t latency);\n+\n /**\n  * Register a VMBUS driver.\n  *\ndiff --git a/drivers/bus/vmbus/rte_bus_vmbus_version.map b/drivers/bus/vmbus/rte_bus_vmbus_version.map\nindex dabb9203104b..5b01ff30d7b0 100644\n--- a/drivers/bus/vmbus/rte_bus_vmbus_version.map\n+++ b/drivers/bus/vmbus/rte_bus_vmbus_version.map\n@@ -20,6 +20,7 @@ DPDK_18.08 {\n \trte_vmbus_probe;\n \trte_vmbus_register;\n \trte_vmbus_scan;\n+\trte_vmbus_set_latency;\n \trte_vmbus_sub_channel_index;\n \trte_vmbus_subchan_open;\n \trte_vmbus_unmap_device;\ndiff --git a/drivers/bus/vmbus/vmbus_channel.c b/drivers/bus/vmbus/vmbus_channel.c\nindex cc5f3e8379a5..bd14c0662b46 100644\n--- a/drivers/bus/vmbus/vmbus_channel.c\n+++ b/drivers/bus/vmbus/vmbus_channel.c\n@@ -59,6 +59,32 @@ vmbus_set_event(const struct rte_vmbus_device *dev,\n \tvmbus_set_monitor(dev, chan->monitor_id);\n }\n \n+/*\n+ * Set the wait between when hypervisor examines the trigger.\n+ */\n+void\n+rte_vmbus_set_latency(const struct rte_vmbus_device *dev,\n+\t\t      const struct vmbus_channel *chan,\n+\t\t      uint32_t latency)\n+{\n+\tuint32_t trig_idx = chan->monitor_id / VMBUS_MONTRIG_LEN;\n+\tuint32_t trig_offs = chan->monitor_id % VMBUS_MONTRIG_LEN;\n+\n+\tif (latency >= UINT16_MAX * 100) {\n+\t\tVMBUS_LOG(ERR, \"invalid latency value %u\", latency);\n+\t\treturn;\n+\t}\n+\n+\tif (trig_idx >= VMBUS_MONTRIGS_MAX) {\n+\t\tVMBUS_LOG(ERR, \"invalid monitor trigger %u\",\n+\t\t\t  trig_idx);\n+\t\treturn;\n+\t}\n+\n+\t/* Host value is expressed in 100 nanosecond units */\n+\tdev->monitor_page->lat[trig_idx][trig_offs] = latency / 100;\n+}\n+\n /*\n  * Notify host that there are data pending on our TX bufring.\n  *\n",
    "prefixes": [
        "2/4"
    ]
}