From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Leyi Rong <leyi.rong@intel.com>,
qi.z.zhang@intel.com, wenzhuo.lu@intel.com,
bruce.richardson@intel.com, beilei.xing@intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3 1/3] net/i40e: remove devarg use-latest-supported-vec
Date: Fri, 15 Jan 2021 13:36:51 +0000 [thread overview]
Message-ID: <51abc9ff-a247-cfa5-9a87-15656e424cc4@intel.com> (raw)
In-Reply-To: <20210114063951.2580-2-leyi.rong@intel.com>
On 1/14/2021 6:39 AM, Leyi Rong wrote:
> As eal parameter --force-max-simd-bitwidth is already introduced,
> to make it more clear when setting rx/tx function, remove
> devarg use-latest-supported-vec support.
>
> Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
<...>
> -static eth_rx_burst_t
> -i40e_get_recommend_rx_vec(bool scatter)
> +static inline bool
> +get_avx_supported(bool request_avx512)
> {
> -#if defined(RTE_ARCH_X86) && defined(CC_AVX2_SUPPORT)
> - /*
> - * since AVX frequency can be different to base frequency, limit
> - * use of AVX2 version to later plaforms, not all those that could
> - * theoretically run it.
> - */
> - if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) &&
> - rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
> - return scatter ? i40e_recv_scattered_pkts_vec_avx2 :
> - i40e_recv_pkts_vec_avx2;
> +#ifdef RTE_ARCH_X86
> + if (request_avx512) {
> + if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_512 &&
> + rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1 &&
> + rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512BW) == 1)
> +#ifdef CC_AVX512_SUPPORT
> + return true;
> +#else
> + PMD_DRV_LOG(NOTICE,
> + "AVX512 is not supported in build env");
> + return false;
> +#endif
> + } else {
> + if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256 &&
> + rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2) == 1 &&
> + rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F) == 1)
> +#ifdef CC_AVX2_SUPPORT
> + return true;
> +#else
> + PMD_DRV_LOG(NOTICE,
> + "AVX2 is not supported in build env");
> + return false;
> #endif
> - return scatter ? i40e_recv_scattered_pkts_vec :
> - i40e_recv_pkts_vec;
> + }
> +#endif /* RTE_ARCH_X86 */
> +
> + return false;
> }
This was still causing build error for non x86, becuase of not used
'request_avx512' variable, updated as below in next-net:
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index a4661cdd8377..ce2b0bc12ed9 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -3122,6 +3122,8 @@ get_avx_supported(bool request_avx512)
return false;
#endif
}
+#else
+ RTE_SET_USED(request_avx512);
#endif /* RTE_ARCH_X86 */
return false;
next prev parent reply other threads:[~2021-01-15 13:37 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 2:19 [dpdk-dev] [PATCH 0/3] AVX512 vPMD on i40e Leyi Rong
2020-12-15 2:19 ` [dpdk-dev] [PATCH 1/3] net/i40e: remove devarg use-latest-supported-vec Leyi Rong
2020-12-15 2:19 ` [dpdk-dev] [PATCH 2/3] net/i40e: add AVX512 vector path Leyi Rong
2020-12-15 2:19 ` [dpdk-dev] [PATCH 3/3] net/i40e: optimize Tx by using AVX512 Leyi Rong
2021-01-07 7:44 ` [dpdk-dev] [PATCH v2 0/3] AVX512 vPMD on i40e Leyi Rong
2021-01-07 7:44 ` [dpdk-dev] [PATCH v2 1/3] net/i40e: remove devarg use-latest-supported-vec Leyi Rong
2021-01-13 6:12 ` Lu, Wenzhuo
2021-01-13 13:40 ` Ferruh Yigit
2021-01-07 7:44 ` [dpdk-dev] [PATCH v2 2/3] net/i40e: add AVX512 vector path Leyi Rong
2021-01-13 6:13 ` Lu, Wenzhuo
2021-01-07 7:44 ` [dpdk-dev] [PATCH v2 3/3] net/i40e: optimize Tx by using AVX512 Leyi Rong
2021-01-13 6:12 ` Lu, Wenzhuo
2021-01-13 9:53 ` [dpdk-dev] [PATCH v2 0/3] AVX512 vPMD on i40e Zhang, Qi Z
2021-01-14 6:39 ` [dpdk-dev] [PATCH v3 " Leyi Rong
2021-01-14 6:39 ` [dpdk-dev] [PATCH v3 1/3] net/i40e: remove devarg use-latest-supported-vec Leyi Rong
2021-01-15 13:36 ` Ferruh Yigit [this message]
2021-01-14 6:39 ` [dpdk-dev] [PATCH v3 2/3] net/i40e: add AVX512 vector path Leyi Rong
2021-01-14 6:39 ` [dpdk-dev] [PATCH v3 3/3] net/i40e: optimize Tx by using AVX512 Leyi Rong
2021-01-14 7:37 ` [dpdk-dev] [PATCH v3 0/3] AVX512 vPMD on i40e Zhang, Qi Z
2021-01-17 11:26 ` Odi Assli
2021-01-18 13:58 ` Rong, Leyi
2021-01-18 14:24 ` Ferruh Yigit
2021-01-18 14:53 ` Odi Assli
2021-01-18 16:36 ` Ferruh Yigit
2021-01-19 13:46 ` Ali Alnubani
2021-01-20 6:25 ` Tal Shnaiderman
2021-01-20 8:36 ` David Marchand
2021-01-20 9:18 ` Ferruh Yigit
2021-01-20 9:23 ` Thomas Monjalon
2021-01-20 9:53 ` David Marchand
2021-01-20 10:05 ` Ali Alnubani
2021-01-20 17:51 ` Ferruh Yigit
2021-01-20 18:04 ` Ferruh Yigit
2021-01-21 5:01 ` Kadam, Pallavi
2021-01-25 14:35 ` David Marchand
2021-01-26 16:17 ` Rong, Leyi
2021-01-26 16:22 ` Thomas Monjalon
2021-01-26 16:39 ` Ferruh Yigit
2021-01-26 16:48 ` Thomas Monjalon
2021-01-26 16:51 ` Ferruh Yigit
2021-01-28 20:35 ` Dmitry Kozlyuk
2021-01-28 21:24 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51abc9ff-a247-cfa5-9a87-15656e424cc4@intel.com \
--to=ferruh.yigit@intel.com \
--cc=beilei.xing@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=leyi.rong@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=wenzhuo.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).