From: "Liu, Yong" <yong.liu@intel.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: "Ye, Xiaolong" <xiaolong.ye@intel.com>,
"Yigit, Ferruh" <ferruh.yigit@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/virtio: fix AVX512 datapath selection
Date: Tue, 12 May 2020 02:27:10 +0000 [thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E6358BE28@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20200511144720.241224-1-maxime.coquelin@redhat.com>
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Monday, May 11, 2020 10:47 PM
> To: Liu, Yong <yong.liu@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>;
> Yigit, Ferruh <ferruh.yigit@intel.com>; dev@dpdk.org
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Subject: [PATCH] net/virtio: fix AVX512 datapath selection
>
> The AVX512 packed ring datapath selection was only done
> at build time, but it should also be checked at runtime
> that the CPU supports it.
>
> This patch add a CPU flags check so that non-vectorized
> path is selected at runtime if AVX512 is not supported.
>
> Fixes: ccb10995c2ad ("net/virtio: add election for vectorized path")
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
> drivers/net/virtio/virtio_ethdev.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/virtio/virtio_ethdev.c
> b/drivers/net/virtio/virtio_ethdev.c
> index 312871cb48..49ccef12c7 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -1965,8 +1965,10 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
> PMD_DRV_LOG(INFO,
> "building environment do not support
> packed ring vectorized");
> #else
> - hw->use_vec_rx = 1;
> - hw->use_vec_tx = 1;
> + if
> (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F)) {
> + hw->use_vec_rx = 1;
> + hw->use_vec_tx = 1;
> + }
> #endif
Hi Maxime,
Here is pre-setting for vectorized path selection, virtio_dev_configure will do second time check.
Running environment will be checked in second time check. We can move some checks from virtio_dev_configure to here, but is it needed to do that?
BTW, both split ring and packed ring will utilized this setting, it will break split vectorized datapath is server not has AVX512F flag.
And it may cause building issue on those platforms which not defined RTE_CPUFLAG_AVX512F.
Thanks,
Marvin
> }
> }
> --
> 2.25.4
next prev parent reply other threads:[~2020-05-12 2:27 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-11 14:47 Maxime Coquelin
2020-05-11 15:11 ` Ferruh Yigit
2020-05-11 18:48 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2020-05-11 19:49 ` Maxime Coquelin
2020-05-11 22:21 ` Ferruh Yigit
2020-05-12 3:29 ` Liu, Yong
2020-05-12 8:36 ` Maxime Coquelin
2020-05-12 8:46 ` Liu, Yong
2020-05-12 10:04 ` Maxime Coquelin
2020-05-12 13:19 ` Liu, Yong
2020-05-12 2:27 ` Liu, Yong [this message]
2020-05-12 8:35 ` [dpdk-dev] [PATCH] " Maxime Coquelin
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=86228AFD5BCD8E4EBFD2B90117B5E81E6358BE28@SHSMSX103.ccr.corp.intel.com \
--to=yong.liu@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=xiaolong.ye@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).