net/virtio: fix AVX512 datapath selection
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 11 May 2020 14:47:20 +0000 (16:47 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 11 May 2020 21:04:33 +0000 (23:04 +0200)
commit9036180f61d807baaf08dd1323f65625d780a37f
treedfb0fe8cf698bfff55cbb1699c0a0f48668d7200
parent9d441c4551d4f608743914428c94ad264dd1ed39
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.

Also in meson build enable vectorization only for relevant file, not for
all driver.

Fixes: ccb10995c2ad ("net/virtio: add election for vectorized path")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/meson.build
drivers/net/virtio/virtio_ethdev.c