Re: [PATCH v7 2/4] virtio: Introduce config RTE_VIRTIO_INC_VECTOR
From: Thomas Monjalon <hidden>
Date: 2016-02-07 21:27:19
2016-02-07 19:21, Santosh Shukla:
- virtio_recv_pkts_vec and other virtio vector friend apis are written for sse/avx instructions. For arm64 in particular, virtio vector implementation does not exist(todo). So virtio pmd driver wont build for targets like i686, arm64. By making RTE_VIRTIO_INC_VECTOR=n, Driver can build for non-sse/avx targets and will work in non-vectored virtio mode. Disabling RTE_VIRTIO_INC_VECTOR config for : - i686 arch as i686 target config says: config/defconfig_i686-native-linuxapp-gcc says "Vectorized PMD is not supported on 32-bit". - armv7/v8 arch.
Yes it can be useful to disable vector optimizations, but it should done at runtime, not a compilation option. I know it is already wrongly configured at compilation for other drivers, we should fix them. Here, you want to avoid SSE/AVX code on ARM. So we should just add the appropriate ifdefs. Adding a compilation option does not prevent from enabling it on ARM or old x86 which do not support these instructions. Please virtio maintainers, we need to fix this code. Thanks