[ovs-git] [openvswitch/ovs] c15c3d: dpcls: fix build on compilers without AVX512-VPOPCNT

Harry van Haaren noreply at github.com
Tue Aug 10 11:27:35 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: c15c3df3ac0a53f38c37f96d2b9b35ed9780e558
      https://github.com/openvswitch/ovs/commit/c15c3df3ac0a53f38c37f96d2b9b35ed9780e558
  Author: Harry van Haaren <harry.van.haaren at intel.com>
  Date:   2021-08-10 (Tue, 10 Aug 2021)

  Changed paths:
    M lib/dpif-netdev-lookup-avx512-gather.c

  Log Message:
  -----------
  dpcls: fix build on compilers without AVX512-VPOPCNT

This commit adds extra checks around the AVX-512 vpopcnt instruction
enabling, ensuring that in the function where the ISA is enabled the
compiler has also indicated its support for the ISA. This is achieved
by checking the __AVX512VPOPCNTDQ__ define, which the compiler sets if
it is capable of handling the vpopcnt instruction.

If the compiler is not capable of handling vpopcnt, we fall back to
the emulated vpopcnt implementation.

Reported-by: Ian Stokes <ian.stokes at intel.com>
Fixes: 1e314891340d ("dpcls-avx512: Enable avx512 vector popcount instruction.")
Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
Signed-off-by: Ian Stokes <ian.stokes at intel.com>




More information about the git mailing list