On 13/07/2020 23:19, Stephen Hemminger wrote:
> On Mon, 13 Jul 2020 12:11:19 +0100
> Vladimir Medvedkin <vladimir.medved...@intel.com> wrote:
>
>> This patch series implements vectorized lookup using AVX512 for
>> ipv4 dir24_8 and ipv6 trie algorithms.
>> Also introduced rte_fib_set_lookup_fn() to change lookup function type.
>> Added option to select lookup function type in testfib application.
>>
>> v6:
>> - style fixes
>>
>> v5:
>> - prefix zmm macro in rte_vect.h with RTE_X86
>> - remove unnecessary typedef for _x86_zmm_t
>> - reword commit title
>> - fix typos
>>
>> v4:
>> - use __rte_aligned() instead of using compiler attribute directly
>> - rework and add comments to meson.build
>>
>> v3:
>> - separate out the AVX-512 code into a separate file
>>
>> v2:
>> - rename rte_zmm to __rte_x86_zmm to reflect its internal usage
>> - make runtime decision to use avx512 lookup
>>
>> Vladimir Medvedkin (8):
>> eal/x86: introduce AVX 512-bit type
>> fib: make lookup function type configurable
>> fib: move lookup definition into the header file
>> fib: introduce AVX512 lookup
>> fib6: make lookup function type configurable
>> fib6: move lookup definition into the header file
>> fib6: introduce AVX512 lookup
>> app/testfib: add support for different lookup functions
>>
>> app/test-fib/main.c | 58 +++++-
>> lib/librte_eal/x86/include/rte_vect.h | 19 ++
>> lib/librte_fib/Makefile | 24 +++
>> lib/librte_fib/dir24_8.c | 281 +++++---------------------
>> lib/librte_fib/dir24_8.h | 226 ++++++++++++++++++++-
>> lib/librte_fib/dir24_8_avx512.c | 165 +++++++++++++++
>> lib/librte_fib/dir24_8_avx512.h | 24 +++
>> lib/librte_fib/meson.build | 31 +++
>> lib/librte_fib/rte_fib.c | 21 +-
>> lib/librte_fib/rte_fib.h | 24 +++
>> lib/librte_fib/rte_fib6.c | 20 +-
>> lib/librte_fib/rte_fib6.h | 22 ++
>> lib/librte_fib/rte_fib_version.map | 2 +
>> lib/librte_fib/trie.c | 161 +++------------
>> lib/librte_fib/trie.h | 119 ++++++++++-
>> lib/librte_fib/trie_avx512.c | 269 ++++++++++++++++++++++++
>> lib/librte_fib/trie_avx512.h | 20 ++
>> 17 files changed, 1114 insertions(+), 372 deletions(-)
>> create mode 100644 lib/librte_fib/dir24_8_avx512.c
>> create mode 100644 lib/librte_fib/dir24_8_avx512.h
>> create mode 100644 lib/librte_fib/trie_avx512.c
>> create mode 100644 lib/librte_fib/trie_avx512.h
>>
>
> Did anyone else see the recent AVX512 discussion from Linus:
> "I hope AVX512 dies a painful death, and that Intel starts fixing real
> problems
> instead of trying to create magic instructions to then create benchmarks
> that they can look good on.
Yup - I saw this one.
Sweeping statements like these are good to provoke debate, the truth is
generally more nuanced.
If you continue to read the post, Linus appears to be mostly questioning
microprocessor design decisions.
That is an interesting discussion, however the reality is that the technology
does exists and may be beneficial for Packet Processing.
I would suggest, we continue to apply the same logic governing adoption of any
technology by DPDK.
When the technology is present and a clear benefit is shown, we use it with
caution.
In the case of Vladimir's patch,
the user has to explicitly switch on the AVX512 lookup with
RTE_FIB_DIR24_8_VECTOR_AVX512.
Thanks,
Ray K