Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/122159/?format=api
http://patches.dpdk.org/api/patches/122159/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230117072626.93796-20-beilei.xing@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": "<20230117072626.93796-20-beilei.xing@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230117072626.93796-20-beilei.xing@intel.com", "date": "2023-01-17T07:26:26", "name": "[v3,15/15] common/idpf: add avx512 for single queue model", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "b537c8fa42202badb5bf46aa40c6eb1ce103c001", "submitter": { "id": 410, "url": "http://patches.dpdk.org/api/people/410/?format=api", "name": "Xing, Beilei", "email": "beilei.xing@intel.com" }, "delegate": { "id": 1540, "url": "http://patches.dpdk.org/api/users/1540/?format=api", "username": "qzhan15", "first_name": "Qi", "last_name": "Zhang", "email": "qi.z.zhang@intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230117072626.93796-20-beilei.xing@intel.com/mbox/", "series": [ { "id": 26568, "url": "http://patches.dpdk.org/api/series/26568/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=26568", "date": "2023-01-17T07:26:07", "name": "net/idpf: introduce idpf common modle", "version": 3, "mbox": "http://patches.dpdk.org/series/26568/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/122159/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/122159/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 81CE6423FA;\n\tTue, 17 Jan 2023 08:53:26 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A376642D2C;\n\tTue, 17 Jan 2023 08:51:35 +0100 (CET)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 5033E42D3F\n for <dev@dpdk.org>; Tue, 17 Jan 2023 08:51:33 +0100 (CET)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Jan 2023 23:51:32 -0800", "from dpdk-beileix-3.sh.intel.com ([10.67.110.253])\n by fmsmga002.fm.intel.com with ESMTP; 16 Jan 2023 23:51:30 -0800" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1673941893; x=1705477893;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=oQ8dr/KVxuzrKRYso7FxKgELsFqmlIySKLjen0wEzDc=;\n b=gywQ2rt7LDzQVpJCd+Ghr88paOqSTiBRCyxzjeW3CVBFUyGEdj2wJxpO\n G4nERf6uiFlAOBx3jcbrBqj1iz85hTP3H0LGw30MKOGEoWzqPX9+GH9dR\n BYrFhtVBkyA+BjuyMKbD+4V7cip30kJAqA6mGicr8pTw23JseiQ58NFRV\n kLqmlTqBbaWvP8rGtc19yutJzB76n7H/PBBGJ6KLRzf6MFAx7ogIOmaJl\n MQPx3BLajg4UhqEwXvbT2+NC7e+iXJrUiuAVTXHrLcJzgqw0+fSExxXs1\n P2YuNzRg+h0ApOsc4bLvTbCjba/h0sq/hqAi7uwf+TZ6B1YZ118gZIGMc Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10592\"; a=\"312497135\"", "E=Sophos;i=\"5.97,222,1669104000\"; d=\"scan'208\";a=\"312497135\"", "E=McAfee;i=\"6500,9779,10592\"; a=\"767174586\"", "E=Sophos;i=\"5.97,222,1669104000\"; d=\"scan'208\";a=\"767174586\"" ], "X-ExtLoop1": "1", "From": "beilei.xing@intel.com", "To": "jingjing.wu@intel.com", "Cc": "dev@dpdk.org,\n\tqi.z.zhang@intel.com,\n\tBeilei Xing <beilei.xing@intel.com>", "Subject": "[PATCH v3 15/15] common/idpf: add avx512 for single queue model", "Date": "Tue, 17 Jan 2023 07:26:26 +0000", "Message-Id": "<20230117072626.93796-20-beilei.xing@intel.com>", "X-Mailer": "git-send-email 2.26.2", "In-Reply-To": "<20230117072626.93796-1-beilei.xing@intel.com>", "References": "\n <https://patches.dpdk.org/project/dpdk/cover/20230106091627.13530-1-beilei.xing@intel.com/>\n <20230117072626.93796-1-beilei.xing@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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" }, "content": "From: Beilei Xing <beilei.xing@intel.com>\n\nMove avx512 vector path for single queue to common module.\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n drivers/common/idpf/idpf_common_rxtx.h | 20 +++++++++++++\n .../idpf/idpf_common_rxtx_avx512.c} | 4 +--\n drivers/common/idpf/meson.build | 30 +++++++++++++++++++\n drivers/common/idpf/version.map | 3 ++\n drivers/net/idpf/idpf_rxtx.h | 13 --------\n drivers/net/idpf/meson.build | 17 -----------\n 6 files changed, 55 insertions(+), 32 deletions(-)\n rename drivers/{net/idpf/idpf_rxtx_vec_avx512.c => common/idpf/idpf_common_rxtx_avx512.c} (99%)", "diff": "diff --git a/drivers/common/idpf/idpf_common_rxtx.h b/drivers/common/idpf/idpf_common_rxtx.h\nindex 74d6081638..6e3ee7de25 100644\n--- a/drivers/common/idpf/idpf_common_rxtx.h\n+++ b/drivers/common/idpf/idpf_common_rxtx.h\n@@ -47,6 +47,12 @@\n #define IDPF_TX_OFFLOAD_NOTSUP_MASK \\\n \t\t(RTE_MBUF_F_TX_OFFLOAD_MASK ^ IDPF_TX_OFFLOAD_MASK)\n \n+/* used for Vector PMD */\n+#define IDPF_VPMD_RX_MAX_BURST\t\t32\n+#define IDPF_VPMD_TX_MAX_BURST\t\t32\n+#define IDPF_VPMD_DESCS_PER_LOOP\t4\n+#define IDPF_RXQ_REARM_THRESH\t\t64\n+\n /* MTS */\n #define GLTSYN_CMD_SYNC_0_0\t(PF_TIMESYNC_BASE + 0x0)\n #define PF_GLTSYN_SHTIME_0_0\t(PF_TIMESYNC_BASE + 0x4)\n@@ -193,6 +199,10 @@ union idpf_tx_offload {\n \t};\n };\n \n+struct idpf_tx_vec_entry {\n+\tstruct rte_mbuf *mbuf;\n+};\n+\n struct idpf_rxq_ops {\n \tvoid (*release_mbufs)(struct idpf_rx_queue *rxq);\n };\n@@ -254,5 +264,15 @@ uint16_t idpf_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t\tuint16_t nb_pkts);\n __rte_internal\n int idpf_singleq_rx_vec_setup(struct idpf_rx_queue *rxq);\n+__rte_internal\n+int idpf_singleq_tx_vec_setup_avx512(struct idpf_tx_queue *txq);\n+__rte_internal\n+uint16_t idpf_singleq_recv_pkts_avx512(void *rx_queue,\n+\t\t\t\t struct rte_mbuf **rx_pkts,\n+\t\t\t\t uint16_t nb_pkts);\n+__rte_internal\n+uint16_t idpf_singleq_xmit_pkts_avx512(void *tx_queue,\n+\t\t\t\t struct rte_mbuf **tx_pkts,\n+\t\t\t\t uint16_t nb_pkts);\n \n #endif /* _IDPF_COMMON_RXTX_H_ */\ndiff --git a/drivers/net/idpf/idpf_rxtx_vec_avx512.c b/drivers/common/idpf/idpf_common_rxtx_avx512.c\nsimilarity index 99%\nrename from drivers/net/idpf/idpf_rxtx_vec_avx512.c\nrename to drivers/common/idpf/idpf_common_rxtx_avx512.c\nindex ea949635e0..6ae0e14d2f 100644\n--- a/drivers/net/idpf/idpf_rxtx_vec_avx512.c\n+++ b/drivers/common/idpf/idpf_common_rxtx_avx512.c\n@@ -2,9 +2,9 @@\n * Copyright(c) 2022 Intel Corporation\n */\n \n-#include \"idpf_rxtx_vec_common.h\"\n-\n #include <rte_vect.h>\n+#include <idpf_common_device.h>\n+#include <idpf_common_rxtx.h>\n \n #ifndef __INTEL_COMPILER\n #pragma GCC diagnostic ignored \"-Wcast-qual\"\ndiff --git a/drivers/common/idpf/meson.build b/drivers/common/idpf/meson.build\nindex 5ee071fdb2..1dafafeb2f 100644\n--- a/drivers/common/idpf/meson.build\n+++ b/drivers/common/idpf/meson.build\n@@ -9,4 +9,34 @@ sources = files(\n 'idpf_common_virtchnl.c',\n )\n \n+if arch_subdir == 'x86'\n+ idpf_avx512_cpu_support = (\n+ cc.get_define('__AVX512F__', args: machine_args) != '' and\n+ cc.get_define('__AVX512BW__', args: machine_args) != ''\n+ )\n+\n+ idpf_avx512_cc_support = (\n+ not machine_args.contains('-mno-avx512f') and\n+ cc.has_argument('-mavx512f') and\n+ cc.has_argument('-mavx512bw')\n+ )\n+\n+ if idpf_avx512_cpu_support == true or idpf_avx512_cc_support == true\n+ cflags += ['-DCC_AVX512_SUPPORT']\n+ avx512_args = [cflags, '-mavx512f', '-mavx512bw']\n+ if cc.has_argument('-march=skylake-avx512')\n+ avx512_args += '-march=skylake-avx512'\n+ endif\n+ idpf_common_avx512_lib = static_library(\n+ 'idpf_common_avx512_lib',\n+ 'idpf_common_rxtx_avx512.c',\n+\t dependencies: [\n+\t static_rte_mbuf,\n+\t ],\n+ include_directories: includes,\n+ c_args: avx512_args)\n+ objs += idpf_common_avx512_lib.extract_objects('idpf_common_rxtx_avx512.c')\n+ endif\n+endif\n+\n subdir('base')\ndiff --git a/drivers/common/idpf/version.map b/drivers/common/idpf/version.map\nindex 0f3f4aa758..a6b9eefdb5 100644\n--- a/drivers/common/idpf/version.map\n+++ b/drivers/common/idpf/version.map\n@@ -32,8 +32,11 @@ INTERNAL {\n \tidpf_reset_split_tx_descq;\n \tidpf_rx_queue_release;\n \tidpf_singleq_recv_pkts;\n+\tidpf_singleq_recv_pkts_avx512;\n \tidpf_singleq_rx_vec_setup;\n+\tidpf_singleq_tx_vec_setup_avx512;\n \tidpf_singleq_xmit_pkts;\n+\tidpf_singleq_xmit_pkts_avx512;\n \tidpf_splitq_recv_pkts;\n \tidpf_splitq_xmit_pkts;\n \tidpf_switch_queue;\ndiff --git a/drivers/net/idpf/idpf_rxtx.h b/drivers/net/idpf/idpf_rxtx.h\nindex a985dc2cf5..3a5084dfd6 100644\n--- a/drivers/net/idpf/idpf_rxtx.h\n+++ b/drivers/net/idpf/idpf_rxtx.h\n@@ -19,23 +19,14 @@\n #define IDPF_DEFAULT_RX_FREE_THRESH\t32\n \n /* used for Vector PMD */\n-#define IDPF_VPMD_RX_MAX_BURST\t32\n-#define IDPF_VPMD_TX_MAX_BURST\t32\n-#define IDPF_VPMD_DESCS_PER_LOOP\t4\n-#define IDPF_RXQ_REARM_THRESH\t64\n \n #define IDPF_DEFAULT_TX_RS_THRESH\t32\n #define IDPF_DEFAULT_TX_FREE_THRESH\t32\n \n-struct idpf_tx_vec_entry {\n-\tstruct rte_mbuf *mbuf;\n-};\n-\n int idpf_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,\n \t\t\tuint16_t nb_desc, unsigned int socket_id,\n \t\t\tconst struct rte_eth_rxconf *rx_conf,\n \t\t\tstruct rte_mempool *mp);\n-int idpf_singleq_tx_vec_setup_avx512(struct idpf_tx_queue *txq);\n int idpf_rx_queue_init(struct rte_eth_dev *dev, uint16_t rx_queue_id);\n int idpf_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id);\n int idpf_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id);\n@@ -48,10 +39,6 @@ int idpf_tx_queue_init(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n int idpf_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n int idpf_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id);\n void idpf_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t qid);\n-uint16_t idpf_singleq_recv_pkts_avx512(void *rx_queue, struct rte_mbuf **rx_pkts,\n-\t\t\t\t uint16_t nb_pkts);\n-uint16_t idpf_singleq_xmit_pkts_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,\n-\t\t\t\t uint16_t nb_pkts);\n \n void idpf_stop_queues(struct rte_eth_dev *dev);\n \ndiff --git a/drivers/net/idpf/meson.build b/drivers/net/idpf/meson.build\nindex 378925166f..98f8ceb77b 100644\n--- a/drivers/net/idpf/meson.build\n+++ b/drivers/net/idpf/meson.build\n@@ -34,22 +34,5 @@ if arch_subdir == 'x86'\n \n if idpf_avx512_cpu_support == true or idpf_avx512_cc_support == true\n cflags += ['-DCC_AVX512_SUPPORT']\n- avx512_args = [cflags, '-mavx512f', '-mavx512bw']\n- if cc.has_argument('-march=skylake-avx512')\n- avx512_args += '-march=skylake-avx512'\n- endif\n- idpf_avx512_lib = static_library(\n- 'idpf_avx512_lib',\n- 'idpf_rxtx_vec_avx512.c',\n- dependencies: [\n- static_rte_common_idpf,\n- static_rte_ethdev,\n- static_rte_bus_pci,\n- static_rte_kvargs,\n- static_rte_hash,\n- ],\n- include_directories: includes,\n- c_args: avx512_args)\n- objs += idpf_avx512_lib.extract_objects('idpf_rxtx_vec_avx512.c')\n endif\n endif\n", "prefixes": [ "v3", "15/15" ] }{ "id": 122159, "url": "