get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 59726,
    "url": "http://patchwork.dpdk.org/api/patches/59726/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190925171329.63734-15-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": "<20190925171329.63734-15-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190925171329.63734-15-yong.liu@intel.com",
    "date": "2019-09-25T17:13:28",
    "name": "[v3,14/15] vhost: check whether disable software pre-fetch",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ef581088cdf57b7991d88fc79addb3eddeac00c9",
    "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/20190925171329.63734-15-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 6522,
            "url": "http://patchwork.dpdk.org/api/series/6522/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=6522",
            "date": "2019-09-25T17:13:14",
            "name": "vhost packed ring performance optimization",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/6522/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/59726/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/59726/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 71E1F1BF03;\n\tWed, 25 Sep 2019 11:33:20 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id CD41A1BE98\n\tfor <dev@dpdk.org>; Wed, 25 Sep 2019 11:33:00 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Sep 2019 02:32:51 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.142])\n\tby fmsmga004.fm.intel.com with ESMTP; 25 Sep 2019 02:32:49 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,547,1559545200\"; d=\"scan'208\";a=\"213986315\"",
        "From": "Marvin Liu <yong.liu@intel.com>",
        "To": "maxime.coquelin@redhat.com, tiwei.bie@intel.com, zhihong.wang@intel.com, \n\tstephen@networkplumber.org, gavin.hu@arm.com",
        "Cc": "dev@dpdk.org,\n\tMarvin Liu <yong.liu@intel.com>",
        "Date": "Thu, 26 Sep 2019 01:13:28 +0800",
        "Message-Id": "<20190925171329.63734-15-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190925171329.63734-1-yong.liu@intel.com>",
        "References": "<20190919163643.24130-2-yong.liu@intel.com>\n\t<20190925171329.63734-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 14/15] vhost: check whether disable software\n\tpre-fetch",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Disable software pre-fetch actions on Skylake and later platforms.\nHardware can fetch needed data for vhost, additional software pre-fetch\nwill impact performance.\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>",
    "diff": "diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile\nindex 30839a001..5f3b42e56 100644\n--- a/lib/librte_vhost/Makefile\n+++ b/lib/librte_vhost/Makefile\n@@ -16,6 +16,12 @@ CFLAGS += -I vhost_user\n CFLAGS += -fno-strict-aliasing\n LDLIBS += -lpthread\n \n+AVX512_SUPPORT=$(shell $(CC) -march=native -dM -E - </dev/null |grep AVX512F)\n+\n+ifneq ($(AVX512_SUPPORT),)\n+CFLAGS += -DDISABLE_SWPREFETCH\n+endif\n+\n ifeq ($(RTE_TOOLCHAIN), gcc)\n ifeq ($(shell test $(GCC_VERSION) -ge 83 && echo 1), 1)\n CFLAGS += -DSUPPORT_GCC_UNROLL_PRAGMA\ndiff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 20624efdc..e3872e384 100644\n--- a/lib/librte_vhost/virtio_net.c\n+++ b/lib/librte_vhost/virtio_net.c\n@@ -1075,7 +1075,9 @@ virtio_dev_rx_batch_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \n \tUNROLL_PRAGMA(UNROLL_PRAGMA_PARAM)\n \tfor (i = 0; i < PACKED_BATCH_SIZE; i++) {\n+#ifndef DISABLE_SWPREFETCH\n \t\trte_prefetch0((void *)(uintptr_t)desc_addrs[i]);\n+#endif\n \t\thdrs[i] = (struct virtio_net_hdr_mrg_rxbuf *)\n \t\t\t\t\t(uintptr_t)desc_addrs[i];\n \t\tlens[i] = pkts[i]->pkt_len + dev->vhost_hlen;\n@@ -1144,8 +1146,10 @@ virtio_dev_rx_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tuint32_t remained = count;\n \n \tdo {\n+#ifndef DISABLE_SWPREFETCH\n \t\trte_prefetch0(&vq->desc_packed[vq->last_avail_idx &\n \t\t\t(vq->size - 1)]);\n+#endif\n \t\tif (remained >= PACKED_BATCH_SIZE) {\n \t\t\tif (!virtio_dev_rx_batch_packed(dev, vq, pkts)) {\n \t\t\t\tpkt_idx += PACKED_BATCH_SIZE;\n@@ -1790,7 +1794,9 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \n \tUNROLL_PRAGMA(UNROLL_PRAGMA_PARAM)\n \tfor (i = 0; i < PACKED_BATCH_SIZE; i++) {\n+#ifndef DISABLE_SWPREFETCH\n \t\trte_prefetch0((void *)(uintptr_t)desc_addrs[i]);\n+#endif\n \t\trte_memcpy(rte_pktmbuf_mtod_offset(pkts[i], void *, 0),\n \t\t\t   (void *)(uintptr_t)(desc_addrs[i] + buf_offset),\n \t\t\t   pkts[i]->pkt_len);\n@@ -2046,8 +2052,10 @@ virtio_dev_tx_packed(struct virtio_net *dev, struct vhost_virtqueue *vq,\n \tuint32_t remained = count;\n \n \tdo {\n+#ifndef DISABLE_SWPREFETCH\n \t\trte_prefetch0(&vq->desc_packed[vq->last_avail_idx &\n \t\t       (vq->size - 1)]);\n+#endif\n \n \t\tif (remained >= PACKED_BATCH_SIZE) {\n \t\t\tif (!virtio_dev_tx_batch_packed(dev, vq, mbuf_pool,\n",
    "prefixes": [
        "v3",
        "14/15"
    ]
}