[ovs-dev] [v11 10/11] dpif-netdev/mfex: Add AVX512 based optimized miniflow extract

Van Haaren, Harry harry.van.haaren at intel.com
Wed Jul 14 10:14:43 UTC 2021


> -----Original Message-----
> From: Eelco Chaudron <echaudro at redhat.com>
> Sent: Wednesday, July 14, 2021 10:12 AM
> To: Amber, Kumar <kumar.amber at intel.com>; Aaron Conole
> <aconole at redhat.com>
> Cc: ovs-dev at openvswitch.org; fbl at sysclose.org; i.maximets at ovn.org; Van Haaren,
> Harry <harry.van.haaren at intel.com>; Ferriter, Cian <cian.ferriter at intel.com>;
> Stokes, Ian <ian.stokes at intel.com>
> Subject: Re: [v11 10/11] dpif-netdev/mfex: Add AVX512 based optimized miniflow
> extract

<snip>

> > +        /* Permute the packet layout into miniflow blocks shape.
> > +         * As different AVX512 ISA levels have different implementations,
> > +         * this specializes on the "use_vbmi" attribute passed in.
> > +         */
> > +        __m512i v512_zeros = _mm512_setzero_si512();
> > +        __m512i v_blk0 = v512_zeros;
> 
> Although I did ACK this patchset, running make clang-analyzer, gave me the
> following warning, which should be fixed:
> 
> lib/dpif-netdev-extract-avx512.c:476:17: warning: Value stored to 'v_blk0' during its
> initialization is never read
>         __m512i v_blk0 = v512_zeros;
>                 ^~~~~~   ~~~~~~~~~~
> 1 warning generated.

Ah interesting, indeed its never read. Its also a "zeroed" register, so it has no runtime
performance impact. (Magic of OoO execution, combined with register renaming :)

The fix is simply to remove the " = v512_zeros;" part, resulting in this decl of the variable from
__m512i v_blk0 = v512_zeros;
to
__m512i v_blk0;

Will be included in v11.


> Aaron, would it be possible to add a clang-analyzer run to the zero robot to catch
> newly introduced warnings?

That'd be cool. I presume that a "scan-build" prefix to the build command is all that's
needed, as usually the case with clang analyzer. Reproduced the above error using
scan-build, so that seems to work :)

Regards, -Harry

<snip remaining patch>


More information about the dev mailing list