From 213c397492bdc64cf26b2e7b3877e4a29dc9f8da Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Mon, 28 Feb 2022 16:18:44 +0100 Subject: passt, pasta: Run-time selection of AVX2 build Build-time selection of AVX2 flags and routines is not practical for distributions, but limiting AVX2 usage to checksum routines with specific run-time detection doesn't allow for easy performance gains from auto-vectorisation of batched packet handling routines. For x86_64, build non-AVX2 and AVX2 binaries, and implement a simple wrapper replacing the current executable with the AVX2 build if it's available, and if AVX2 is supported by the current CPU. Signed-off-by: Stefano Brivio --- test/demo/passt | 2 +- test/demo/pasta | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'test/demo') diff --git a/test/demo/passt b/test/demo/passt index 76aac86..8838363 100644 --- a/test/demo/passt +++ b/test/demo/passt @@ -29,7 +29,7 @@ sleep 1 say and build it. sleep 1 host cd passt -host make avx2 +host make sleep 1 nl diff --git a/test/demo/pasta b/test/demo/pasta index b2dd327..74fca85 100644 --- a/test/demo/pasta +++ b/test/demo/pasta @@ -169,7 +169,7 @@ say more in the "Performance" section below. sleep 3 ns exit passt exit -passt CFLAGS="-g" make avx2 +passt CFLAGS="-g" make sleep 2 passtb perf record -g ./pasta sleep 2 -- cgit v1.2.3