get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 60746,
    "url": "http://patchwork.dpdk.org/api/patches/60746/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20191009133849.69002-14-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": "<20191009133849.69002-14-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191009133849.69002-14-yong.liu@intel.com",
    "date": "2019-10-09T13:38:48",
    "name": "[v4,13/14] vhost: check whether disable software pre-fetch",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1891fd52055e878ae1e18f21f6b80613a880bbea",
    "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/20191009133849.69002-14-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 6753,
            "url": "http://patchwork.dpdk.org/api/series/6753/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=6753",
            "date": "2019-10-09T13:38:35",
            "name": "vhost packed ring performance optimization",
            "version": 4,
            "mbox": "http://patchwork.dpdk.org/series/6753/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/60746/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/60746/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 6E7AE1D17A;\n\tWed,  9 Oct 2019 07:59:55 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id CDB4A1C1BE\n\tfor <dev@dpdk.org>; Wed,  9 Oct 2019 07:59:45 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Oct 2019 22:59:46 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.142])\n\tby fmsmga002.fm.intel.com with ESMTP; 08 Oct 2019 22:59:43 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.67,273,1566889200\"; d=\"scan'208\";a=\"223473438\"",
        "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": "Wed,  9 Oct 2019 21:38:48 +0800",
        "Message-Id": "<20191009133849.69002-14-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191009133849.69002-1-yong.liu@intel.com>",
        "References": "<20190925171329.63734-1-yong.liu@intel.com>\n\t<20191009133849.69002-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 13/14] 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/meson.build b/lib/librte_vhost/meson.build\nindex ddf0ee579..5c6f0c0b4 100644\n--- a/lib/librte_vhost/meson.build\n+++ b/lib/librte_vhost/meson.build\n@@ -15,6 +15,10 @@ elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0'))\n elif (toolchain == 'icc' and cc.version().version_compare('>=16.0.0'))\n \tcflags += '-DSUPPORT_ICC_UNROLL_PRAGMA'\n endif\n+r = run_command(toolchain, '-march=native', '-dM', '-E', '-', '</dev/null', '|', 'grep AVX512F')\n+if (r.stdout().strip() != '')\n+\tcflags += '-DDISABLE_SWPREFETCH'\n+endif\n dpdk_conf.set('RTE_LIBRTE_VHOST_POSTCOPY',\n \t      cc.has_header('linux/userfaultfd.h'))\n version = 4\ndiff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c\nindex 56c2080fb..046e497c2 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,7 +1146,9 @@ 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+#endif\n \n \t\tif (remained >= PACKED_BATCH_SIZE) {\n \t\t\tif (!virtio_dev_rx_batch_packed(dev, vq, pkts)) {\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,7 +2052,9 @@ 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+#endif\n \n \t\tif (remained >= PACKED_BATCH_SIZE) {\n \t\t\tif (!virtio_dev_tx_batch_packed(dev, vq, mbuf_pool,\n",
    "prefixes": [
        "v4",
        "13/14"
    ]
}