[PATCH v2] fib: network byte order IPv4 lookup

Medvedkin, Vladimir vladimir.medvedkin at intel.com
Thu Oct 10 13:19:32 CEST 2024


Hi David,

On 09/10/2024 11:56, David Marchand wrote:
> On Wed, Oct 9, 2024 at 11:51 AM David Marchand
> <david.marchand at redhat.com> wrote:
>> Hi Vladimir,
>>
>> On Tue, Oct 8, 2024 at 7:16 PM Vladimir Medvedkin
>> <vladimir.medvedkin at intel.com> wrote:
>>> diff --git a/lib/fib/dir24_8_avx512.c b/lib/fib/dir24_8_avx512.c
>>> index 43dba28cfb..edd802abe4 100644
>>> --- a/lib/fib/dir24_8_avx512.c
>>> +++ b/lib/fib/dir24_8_avx512.c
>>> @@ -10,7 +10,7 @@
>>>
>>>   static __rte_always_inline void
>>>   dir24_8_vec_lookup_x16(void *p, const uint32_t *ips,
>>> -       uint64_t *next_hops, int size)
>>> +       uint64_t *next_hops, int size, bool be_addr)
>>>   {
>>>          struct dir24_8_tbl *dp = (struct dir24_8_tbl *)p;
>>>          __mmask16 msk_ext;
>>> @@ -28,6 +28,16 @@ dir24_8_vec_lookup_x16(void *p, const uint32_t *ips,
>>>                  res_msk = _mm512_set1_epi32(UINT16_MAX);
>>>
>>>          ip_vec = _mm512_loadu_si512(ips);
>>> +       if (be_addr) {
>>> +               const __m512i bswap32 = _mm512_set_epi8(
>> Some toolchains do not like _mm512_set_epi8 (reported by the CI).
> Probably related to gcc commit 4e6a811fad69 ("avx512fintrin.h
> (_mm512_set_epi16, [...]): New intrinsics.") introduced in gcc 9.
> Some distributions in the CI come with a gcc < 9.
>
> We had a similar situation in the hash library in the past,
> fba335b4b204 ("hash: fix Toeplitz hash implementation").
>
Thanks, I'll change it with _mm512_set_epi32(), afaik it should be 
supported by an old gcc

-- 
Regards,
Vladimir



More information about the dev mailing list