get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 68547,
    "url": "http://patchwork.dpdk.org/api/patches/68547/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200415164733.75416-8-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": "<20200415164733.75416-8-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200415164733.75416-8-yong.liu@intel.com",
    "date": "2020-04-15T16:47:32",
    "name": "[v4,7/8] net/virtio: add election for vectorized datapath",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "331e325740c5136625182e8b3f74af7600428974",
    "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/20200415164733.75416-8-yong.liu@intel.com/mbox/",
    "series": [
        {
            "id": 9391,
            "url": "http://patchwork.dpdk.org/api/series/9391/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=9391",
            "date": "2020-04-15T16:47:25",
            "name": "add packed ring vectorized datapath",
            "version": 4,
            "mbox": "http://patchwork.dpdk.org/series/9391/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/68547/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/68547/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 C4D7DA0563;\n\tWed, 15 Apr 2020 11:14:40 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 22EF31D686;\n\tWed, 15 Apr 2020 11:13:36 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by dpdk.org (Postfix) with ESMTP id 0BE6E1D66B\n for <dev@dpdk.org>; Wed, 15 Apr 2020 11:13:31 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 15 Apr 2020 02:13:31 -0700",
            "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.58])\n by orsmga004.jf.intel.com with ESMTP; 15 Apr 2020 02:13:29 -0700"
        ],
        "IronPort-SDR": [
            "\n ahbSKEmzv+9SkaRIPiSF7r6SKJ0obtT9cg6P/3m33Tzx8LrdGGa32fALb1JAt4WU1aYrPbyuTH\n bwFK46R/oHlw==",
            "\n MhdvKicbHsot7hDkVdsfdZWp7RAe3/ueV9zNAplFPnqELiV9sFsxr/LLET4/dKpHvEmlXFqeZy\n Toviak38G3cQ=="
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.72,386,1580803200\"; d=\"scan'208\";a=\"400250881\"",
        "From": "Marvin Liu <yong.liu@intel.com>",
        "To": "maxime.coquelin@redhat.com, xiaolong.ye@intel.com, zhihong.wang@intel.com",
        "Cc": "harry.van.haaren@intel.com, dev@dpdk.org, Marvin Liu <yong.liu@intel.com>",
        "Date": "Thu, 16 Apr 2020 00:47:32 +0800",
        "Message-Id": "<20200415164733.75416-8-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200415164733.75416-1-yong.liu@intel.com>",
        "References": "<20200313174230.74661-1-yong.liu@intel.com>\n <20200415164733.75416-1-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 7/8] net/virtio: add election for vectorized\n\tdatapath",
        "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 vectorized datapath will be selected when criterian matched.\n1. vectorized option is enabled\n2. AVX512F and required extensions are supported by compiler and host\n3. virtio VERSION_1 and IN_ORDER features are negotiated\n4. virtio mergeable feature is not negotiated\n5. LRO offloading is disabled\n\nSplit ring vectorized rx will be selected when criterian matched.\n1. vectorized option is enabled\n2. virtio mergeable and IN_ORDER features are not negotiated\n3. LRO, chksum and vlan strip offloading are disabled\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>",
    "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex 19a36ad82..a6ce3a0b0 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1518,9 +1518,12 @@ set_rxtx_funcs(struct rte_eth_dev *eth_dev)\n \tif (vtpci_packed_queue(hw)) {\n \t\tPMD_INIT_LOG(INFO,\n \t\t\t\"virtio: using packed ring %s Tx path on port %u\",\n-\t\t\thw->use_inorder_tx ? \"inorder\" : \"standard\",\n+\t\t\thw->use_vec_tx ? \"vectorized\" : \"standard\",\n \t\t\teth_dev->data->port_id);\n-\t\teth_dev->tx_pkt_burst = virtio_xmit_pkts_packed;\n+\t\tif (hw->use_vec_tx)\n+\t\t\teth_dev->tx_pkt_burst = virtio_xmit_pkts_packed_vec;\n+\t\telse\n+\t\t\teth_dev->tx_pkt_burst = virtio_xmit_pkts_packed;\n \t} else {\n \t\tif (hw->use_inorder_tx) {\n \t\t\tPMD_INIT_LOG(INFO, \"virtio: using inorder Tx path on port %u\",\n@@ -1534,7 +1537,13 @@ set_rxtx_funcs(struct rte_eth_dev *eth_dev)\n \t}\n \n \tif (vtpci_packed_queue(hw)) {\n-\t\tif (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n+\t\tif (hw->use_vec_rx) {\n+\t\t\tPMD_INIT_LOG(INFO,\n+\t\t\t\t\"virtio: using packed ring vectorized Rx path on port %u\",\n+\t\t\t\teth_dev->data->port_id);\n+\t\t\teth_dev->rx_pkt_burst =\n+\t\t\t\t&virtio_recv_pkts_packed_vec;\n+\t\t} else if (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n \t\t\tPMD_INIT_LOG(INFO,\n \t\t\t\t\"virtio: using packed ring mergeable buffer Rx path on port %u\",\n \t\t\t\teth_dev->data->port_id);\n@@ -1548,7 +1557,7 @@ set_rxtx_funcs(struct rte_eth_dev *eth_dev)\n \t\t}\n \t} else {\n \t\tif (hw->use_vec_rx) {\n-\t\t\tPMD_INIT_LOG(INFO, \"virtio: using simple Rx path on port %u\",\n+\t\t\tPMD_INIT_LOG(INFO, \"virtio: using vectorized Rx path on port %u\",\n \t\t\t\teth_dev->data->port_id);\n \t\t\teth_dev->rx_pkt_burst = virtio_recv_pkts_vec;\n \t\t} else if (hw->use_inorder_rx) {\n@@ -1921,6 +1930,10 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)\n \t\tgoto err_virtio_init;\n \n \thw->opened = true;\n+#ifdef RTE_LIBRTE_VIRTIO_INC_VECTOR\n+\thw->use_vec_rx = 1;\n+\thw->use_vec_tx = 1;\n+#endif\n \n \treturn 0;\n \n@@ -2157,31 +2170,63 @@ virtio_dev_configure(struct rte_eth_dev *dev)\n \t\t\treturn -EBUSY;\n \t\t}\n \n-\tif (vtpci_with_feature(hw, VIRTIO_F_IN_ORDER)) {\n-\t\thw->use_inorder_tx = 1;\n-\t\thw->use_inorder_rx = 1;\n-\t\thw->use_vec_rx = 0;\n-\t}\n-\n \tif (vtpci_packed_queue(hw)) {\n-\t\thw->use_vec_rx = 0;\n-\t\thw->use_inorder_rx = 0;\n-\t}\n+\t\tif ((hw->use_vec_rx || hw->use_vec_tx) &&\n+\t\t    (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) ||\n+\t\t     !rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512BW) ||\n+\t\t     !rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512VL) ||\n+\t\t     !vtpci_with_feature(hw, VIRTIO_F_IN_ORDER) ||\n+\t\t     !vtpci_with_feature(hw, VIRTIO_F_VERSION_1))) {\n+\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\"disabled packed ring vectorization for requirements are not met\");\n+\t\t\thw->use_vec_rx = 0;\n+\t\t\thw->use_vec_tx = 0;\n+\t\t}\n+\n+\t\tif (hw->use_vec_rx) {\n+\t\t\tif (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n+\t\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\t\"disabled packed ring vectorized rx for mrg_rxbuf enabled\");\n+\t\t\t\thw->use_vec_rx = 0;\n+\t\t\t}\n \n+\t\t\tif (rx_offloads & DEV_RX_OFFLOAD_TCP_LRO) {\n+\t\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\t\"disabled packed ring vectorized rx for TCP_LRO enabled\");\n+\t\t\t\thw->use_vec_rx = 0;\n+\t\t\t}\n+\t\t}\n+\t} else {\n+\t\tif (vtpci_with_feature(hw, VIRTIO_F_IN_ORDER)) {\n+\t\t\thw->use_inorder_tx = 1;\n+\t\t\thw->use_inorder_rx = 1;\n+\t\t\thw->use_vec_rx = 0;\n+\t\t}\n+\n+\t\tif (hw->use_vec_rx) {\n #if defined RTE_ARCH_ARM64 || defined RTE_ARCH_ARM\n-\tif (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_NEON)) {\n-\t\thw->use_vec_rx = 0;\n-\t}\n+\t\t\tif (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_NEON)) {\n+\t\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\t\"disabled split ring vectorization for requirements are not met\");\n+\t\t\t\thw->use_vec_rx = 0;\n+\t\t\t}\n #endif\n-\tif (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n-\t\t hw->use_vec_rx = 0;\n-\t}\n+\t\t\tif (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF)) {\n+\t\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\t\"disabled split ring vectorized rx for mrg_rxbuf enabled\");\n+\t\t\t\thw->use_vec_rx = 0;\n+\t\t\t}\n \n-\tif (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM |\n-\t\t\t   DEV_RX_OFFLOAD_TCP_CKSUM |\n-\t\t\t   DEV_RX_OFFLOAD_TCP_LRO |\n-\t\t\t   DEV_RX_OFFLOAD_VLAN_STRIP))\n-\t\thw->use_vec_rx = 0;\n+\t\t\tif (rx_offloads & (DEV_RX_OFFLOAD_UDP_CKSUM |\n+\t\t\t\t\t   DEV_RX_OFFLOAD_TCP_CKSUM |\n+\t\t\t\t\t   DEV_RX_OFFLOAD_TCP_LRO |\n+\t\t\t\t\t   DEV_RX_OFFLOAD_VLAN_STRIP)) {\n+\t\t\t\tPMD_DRV_LOG(INFO,\n+\t\t\t\t\t\"disabled split ring vectorized rx for offloading enabled\");\n+\t\t\t\thw->use_vec_rx = 0;\n+\t\t\t}\n+\t\t}\n+\t}\n \n \treturn 0;\n }\n",
    "prefixes": [
        "v4",
        "7/8"
    ]
}