Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/69177/?format=api
http://patches.dpdk.org/api/patches/69177/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200423123106.78513-9-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": "<20200423123106.78513-9-yong.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200423123106.78513-9-yong.liu@intel.com", "date": "2020-04-23T12:31:05", "name": "[v8,8/9] net/virtio: add election for vectorized path", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "152317f5034bf10a39e33202f39cf358a93473f7", "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/20200423123106.78513-9-yong.liu@intel.com/mbox/", "series": [ { "id": 9585, "url": "http://patches.dpdk.org/api/series/9585/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9585", "date": "2020-04-23T12:30:57", "name": "add packed ring vectorized path", "version": 8, "mbox": "http://patches.dpdk.org/series/9585/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/69177/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/69177/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 99B72A00C2;\n\tThu, 23 Apr 2020 06:57:17 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 9BCB01D590;\n\tThu, 23 Apr 2020 06:56:09 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by dpdk.org (Postfix) with ESMTP id E96651D56C\n for <dev@dpdk.org>; Thu, 23 Apr 2020 06:56:04 +0200 (CEST)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Apr 2020 21:56:04 -0700", "from npg-dpdk-virtual-marvin-dev.sh.intel.com ([10.67.119.56])\n by fmsmga005.fm.intel.com with ESMTP; 22 Apr 2020 21:56:02 -0700" ], "IronPort-SDR": [ "\n IaKPZ4cuD3UQEeQbJb5FoybDPxauXmXArk5iMCPm+HplOZoD5bNozLtrVwQ6oK5sfv3pBo3ZhG\n nUnRNWZkA7qg==", "\n +UIx6D27Qzq0PyXTZrHnejouXivYvAZjbFJxSvIbVyE5pJ6emxvCRhE6a8EcW6HWc2x+Bmn/Aj\n PlO2Ms/Q8WdQ==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.73,305,1583222400\"; d=\"scan'208\";a=\"456772753\"", "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, 23 Apr 2020 20:31:05 +0800", "Message-Id": "<20200423123106.78513-9-yong.liu@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200423123106.78513-1-yong.liu@intel.com>", "References": "<20200313174230.74661-1-yong.liu@intel.com>\n <20200423123106.78513-1-yong.liu@intel.com>", "Subject": "[dpdk-dev] [PATCH v8 8/9] net/virtio: add election for vectorized\n\tpath", "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": "Rewrite vectorized path selection logic. Default setting comes from\nRTE_LIBRTE_VIRTIO_INC_VECTOR option. Paths criteria will be checked as\nlisted below.\n\nPacked ring vectorized path will be selected when:\n vectorized option is enabled\n AVX512F and required extensions are supported by compiler and host\n virtio VERSION_1 and IN_ORDER features are negotiated\n virtio mergeable feature is not negotiated\n LRO offloading is disabled\n\nSplit ring vectorized rx path will be selected when:\n vectorized option is enabled\n virtio mergeable and IN_ORDER features are not negotiated\n 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 361c834a9..c700af6be 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1522,9 +1522,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@@ -1538,7 +1541,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@@ -1950,6 +1959,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@@ -2257,33 +2270,63 @@ virtio_dev_configure(struct rte_eth_dev *dev)\n \t\t\treturn -EBUSY;\n \t\t}\n \n-\thw->use_vec_rx = 1;\n+\tif (vtpci_packed_queue(hw)) {\n+#if defined RTE_ARCH_X86\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 !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+#endif\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+\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-\tif (vtpci_packed_queue(hw)) {\n-\t\thw->use_vec_rx = 0;\n-\t\thw->use_inorder_rx = 0;\n-\t}\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\thw->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": [ "v8", "8/9" ] }{ "id": 69177, "url": "