get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 80109,
    "url": "http://patches.dpdk.org/api/patches/80109/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201009081410.63944-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": "<20201009081410.63944-2-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201009081410.63944-2-yong.liu@intel.com",
    "date": "2020-10-09T08:14:06",
    "name": "[v3,1/5] vhost: add vectorized data path",
    "commit_ref": null,
    "pull_url": null,
    "state": "rejected",
    "archived": true,
    "hash": "43c54ed3bc9bedc6472bee12abf95696eb83342b",
    "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/20201009081410.63944-2-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 12813,
            "url": "http://patches.dpdk.org/api/series/12813/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12813",
            "date": "2020-10-09T08:14:05",
            "name": "vhost add vectorized data path",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/12813/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/80109/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/80109/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 702FEA04BC;\n\tFri,  9 Oct 2020 10:20:48 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 00B721C1C4;\n\tFri,  9 Oct 2020 10:20:35 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by dpdk.org (Postfix) with ESMTP id 59BEB1C1B1\n for <dev@dpdk.org>; Fri,  9 Oct 2020 10:20:32 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Oct 2020 01:20:30 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.56])\n by orsmga005.jf.intel.com with ESMTP; 09 Oct 2020 01:20:27 -0700"
        ],
        "IronPort-SDR": [
            "\n kKUXoJsGZoFRqMo6r3lhN+YDGCKdsCQmim7Hzy7HLEUEexSeLno1KttepDSt+bcEF/eyv182If\n C4FfpFulyRgA==",
            "\n UmSey62nrm69/s2sJlrOUpHlsvFIJSsRcdfODnhu/XOTrDry+9RZ7W1pAxmXucQYyTIbgawYet\n X9Wci1sW21DA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9768\"; a=\"144778901\"",
            "E=Sophos;i=\"5.77,354,1596524400\"; d=\"scan'208\";a=\"144778901\"",
            "E=Sophos;i=\"5.77,354,1596524400\"; d=\"scan'208\";a=\"528833278\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Marvin Liu <yong.liu@intel.com>",
        "To": "maxime.coquelin@redhat.com, chenbo.xia@intel.com, zhihong.wang@intel.com",
        "Cc": "dev@dpdk.org,\n\tMarvin Liu <yong.liu@intel.com>",
        "Date": "Fri,  9 Oct 2020 16:14:06 +0800",
        "Message-Id": "<20201009081410.63944-2-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20201009081410.63944-1-yong.liu@intel.com>",
        "References": "<20200819032414.51430-2-yong.liu@intel.com>\n <20201009081410.63944-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 1/5] vhost: add vectorized data path",
        "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": "Packed ring operations are split into batch and single functions for\nperformance perspective. Ring operations in batch function can be\naccelerated by SIMD instructions like AVX512.\n\nSo introduce vectorized parameter in vhost. Vectorized data path can be\nselected if platform and ring format matched requirements. Otherwise\nwill fallback to original data path.\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>",
    "diff": "diff --git a/doc/guides/nics/vhost.rst b/doc/guides/nics/vhost.rst\nindex d36f3120b..efdaf4de0 100644\n--- a/doc/guides/nics/vhost.rst\n+++ b/doc/guides/nics/vhost.rst\n@@ -64,6 +64,11 @@ The user can specify below arguments in `--vdev` option.\n     It is used to enable external buffer support in vhost library.\n     (Default: 0 (disabled))\n \n+#.  ``vectorized``:\n+\n+    It is used to enable vectorized data path support in vhost library.\n+    (Default: 0 (disabled))\n+\n Vhost PMD event handling\n ------------------------\n \ndiff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst\nindex ba4c62aeb..5ef3844a0 100644\n--- a/doc/guides/prog_guide/vhost_lib.rst\n+++ b/doc/guides/prog_guide/vhost_lib.rst\n@@ -118,6 +118,18 @@ The following is an overview of some key Vhost API functions:\n \n     It is disabled by default.\n \n+ - ``RTE_VHOST_USER_VECTORIZED``\n+    Vectorized data path will used when this flag is set. When packed ring\n+    enabled, available descriptors are stored from frontend driver in sequence.\n+    SIMD instructions like AVX can be used to handle multiple descriptors\n+    simultaneously. Thus can accelerate the throughput of ring operations.\n+\n+    * Only packed ring has vectorized data path.\n+\n+    * Will fallback to normal datapath if no vectorization support.\n+\n+    It is disabled by default.\n+\n * ``rte_vhost_driver_set_features(path, features)``\n \n   This function sets the feature bits the vhost-user driver supports. The\ndiff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c\nindex 66efecb32..8f71054ad 100644\n--- a/drivers/net/vhost/rte_eth_vhost.c\n+++ b/drivers/net/vhost/rte_eth_vhost.c\n@@ -34,6 +34,7 @@ enum {VIRTIO_RXQ, VIRTIO_TXQ, VIRTIO_QNUM};\n #define ETH_VHOST_VIRTIO_NET_F_HOST_TSO \"tso\"\n #define ETH_VHOST_LINEAR_BUF  \"linear-buffer\"\n #define ETH_VHOST_EXT_BUF  \"ext-buffer\"\n+#define ETH_VHOST_VECTORIZED \"vectorized\"\n #define VHOST_MAX_PKT_BURST 32\n \n static const char *valid_arguments[] = {\n@@ -45,6 +46,7 @@ static const char *valid_arguments[] = {\n \tETH_VHOST_VIRTIO_NET_F_HOST_TSO,\n \tETH_VHOST_LINEAR_BUF,\n \tETH_VHOST_EXT_BUF,\n+\tETH_VHOST_VECTORIZED,\n \tNULL\n };\n \n@@ -1509,6 +1511,7 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)\n \tint tso = 0;\n \tint linear_buf = 0;\n \tint ext_buf = 0;\n+\tint vectorized = 0;\n \tstruct rte_eth_dev *eth_dev;\n \tconst char *name = rte_vdev_device_name(dev);\n \n@@ -1618,6 +1621,17 @@ rte_pmd_vhost_probe(struct rte_vdev_device *dev)\n \t\t\tflags |= RTE_VHOST_USER_EXTBUF_SUPPORT;\n \t}\n \n+\tif (rte_kvargs_count(kvlist, ETH_VHOST_VECTORIZED) == 1) {\n+\t\tret = rte_kvargs_process(kvlist,\n+\t\t\t\tETH_VHOST_VECTORIZED,\n+\t\t\t\t&open_int, &vectorized);\n+\t\tif (ret < 0)\n+\t\t\tgoto out_free;\n+\n+\t\tif (vectorized == 1)\n+\t\t\tflags |= RTE_VHOST_USER_VECTORIZED;\n+\t}\n+\n \tif (dev->device.numa_node == SOCKET_ID_ANY)\n \t\tdev->device.numa_node = rte_socket_id();\n \n@@ -1666,4 +1680,5 @@ RTE_PMD_REGISTER_PARAM_STRING(net_vhost,\n \t\"postcopy-support=<0|1> \"\n \t\"tso=<0|1> \"\n \t\"linear-buffer=<0|1> \"\n-\t\"ext-buffer=<0|1>\");\n+\t\"ext-buffer=<0|1> \"\n+\t\"vectorized=<0|1>\");\ndiff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h\nindex 010f16086..c49c1aca2 100644\n--- a/lib/librte_vhost/rte_vhost.h\n+++ b/lib/librte_vhost/rte_vhost.h\n@@ -36,6 +36,7 @@ extern \"C\" {\n /* support only linear buffers (no chained mbufs) */\n #define RTE_VHOST_USER_LINEARBUF_SUPPORT\t(1ULL << 6)\n #define RTE_VHOST_USER_ASYNC_COPY\t(1ULL << 7)\n+#define RTE_VHOST_USER_VECTORIZED\t(1ULL << 8)\n \n /* Features. */\n #ifndef VIRTIO_NET_F_GUEST_ANNOUNCE\ndiff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c\nindex 0169d3648..e492c8c87 100644\n--- a/lib/librte_vhost/socket.c\n+++ b/lib/librte_vhost/socket.c\n@@ -42,6 +42,7 @@ struct vhost_user_socket {\n \tbool extbuf;\n \tbool linearbuf;\n \tbool async_copy;\n+\tbool vectorized;\n \n \t/*\n \t * The \"supported_features\" indicates the feature bits the\n@@ -241,6 +242,9 @@ vhost_user_add_connection(int fd, struct vhost_user_socket *vsocket)\n \t\t\tdev->async_copy = 1;\n \t}\n \n+\tif (vsocket->vectorized)\n+\t\tvhost_enable_vectorized(vid);\n+\n \tVHOST_LOG_CONFIG(INFO, \"new device, handle is %d\\n\", vid);\n \n \tif (vsocket->notify_ops->new_connection) {\n@@ -876,6 +880,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags)\n \tvsocket->vdpa_dev = NULL;\n \tvsocket->extbuf = flags & RTE_VHOST_USER_EXTBUF_SUPPORT;\n \tvsocket->linearbuf = flags & RTE_VHOST_USER_LINEARBUF_SUPPORT;\n+\tvsocket->vectorized = flags & RTE_VHOST_USER_VECTORIZED;\n \tvsocket->async_copy = flags & RTE_VHOST_USER_ASYNC_COPY;\n \n \tif (vsocket->async_copy &&\ndiff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c\nindex c7cd34e42..4b5ef10a8 100644\n--- a/lib/librte_vhost/vhost.c\n+++ b/lib/librte_vhost/vhost.c\n@@ -738,6 +738,17 @@ vhost_enable_linearbuf(int vid)\n \tdev->linearbuf = 1;\n }\n \n+void\n+vhost_enable_vectorized(int vid)\n+{\n+\tstruct virtio_net *dev = get_device(vid);\n+\n+\tif (dev == NULL)\n+\t\treturn;\n+\n+\tdev->vectorized = 1;\n+}\n+\n int\n rte_vhost_get_mtu(int vid, uint16_t *mtu)\n {\ndiff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h\nindex 20ccdc9bd..87583c0b6 100644\n--- a/lib/librte_vhost/vhost.h\n+++ b/lib/librte_vhost/vhost.h\n@@ -363,6 +363,7 @@ struct virtio_net {\n \tint\t\t\tasync_copy;\n \tint\t\t\textbuf;\n \tint\t\t\tlinearbuf;\n+\tint                     vectorized;\n \tstruct vhost_virtqueue\t*virtqueue[VHOST_MAX_QUEUE_PAIRS * 2];\n \tstruct inflight_mem_info *inflight_info;\n #define IF_NAME_SZ (PATH_MAX > IFNAMSIZ ? PATH_MAX : IFNAMSIZ)\n@@ -700,6 +701,7 @@ void vhost_set_ifname(int, const char *if_name, unsigned int if_len);\n void vhost_set_builtin_virtio_net(int vid, bool enable);\n void vhost_enable_extbuf(int vid);\n void vhost_enable_linearbuf(int vid);\n+void vhost_enable_vectorized(int vid);\n int vhost_enable_guest_notification(struct virtio_net *dev,\n \t\tstruct vhost_virtqueue *vq, int enable);\n \n",
    "prefixes": [
        "v3",
        "1/5"
    ]
}