[dpdk-dev] [PATCH v2 3/6] fib: introduce AVX512 lookup

Medvedkin, Vladimir vladimir.medvedkin at intel.com
Thu May 14 14:43:45 CEST 2020


Hi Bruce,

On 14/05/2020 13:40, Bruce Richardson wrote:
> On Thu, May 14, 2020 at 01:28:27PM +0100, Vladimir Medvedkin wrote:
>> Add new lookup implementation for DIR24_8 algorithm using
>> AVX512 instruction set
>>
>> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
>> ---
> <snip>
>> diff --git a/lib/librte_fib/meson.build b/lib/librte_fib/meson.build
>> index 771828f..86b1d4a 100644
>> --- a/lib/librte_fib/meson.build
>> +++ b/lib/librte_fib/meson.build
>> @@ -5,3 +5,13 @@
>>   sources = files('rte_fib.c', 'rte_fib6.c', 'dir24_8.c', 'trie.c')
>>   headers = files('rte_fib.h', 'rte_fib6.h')
>>   deps += ['rib']
>> +
>> +if dpdk_conf.has('RTE_ARCH_X86')
>> +	if cc.has_argument('-mavx512f')
>> +		cflags += '-DCC_AVX512_SUPPORT'
>> +		cflags += '-mavx512f'
>> +	endif
>> +	if cc.has_argument('-mavx512dq')
>> +		cflags += '-mavx512dq'
>> +	endif
>> +endif
> This will likely break the FIB library for systems which don't have AVX-512
> support, since you are enabling AVX-512 for the whole library, meaning that
> the compiler can put AVX-512 instructions anywhere it wants in the library.
> You need to separate out the AVX-512 code into a separate file, and compile
> that file - and only that file - for AVX-512. An example of how this should
> be done, can be seen in the AVX support in the i40e net driver.


Ah, yes, you're right. I will rework this part. Thanks!


>
> Regards,
> /Bruce

-- 
Regards,
Vladimir



More information about the dev mailing list