]> git.droids-corp.org - dpdk.git/commit
lpm: fix scalar version header for C++
authorStanislaw Kardach <kda@semihalf.com>
Thu, 9 Jun 2022 12:17:00 +0000 (14:17 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Wed, 15 Jun 2022 07:12:19 +0000 (09:12 +0200)
commitb13fb775834c690c433de9397dee9e87a32503eb
tree49fc3849211df0b09b142454765667f0e2f403b8
parent93cba71bdce193d1ddb76ad33d4282136e16dd09
lpm: fix scalar version header for C++

rte_xmm_t is a union type which wraps around xmm_t and maps its contents
to scalar structures. Since C++ has stricter type conversion rules than
C, the rte_xmm_t::x has to be used instead of C-casting.

The generated assembly is identical to the code without the fix (checked
both on x86 and RISC-V).

Fixes: 406937f89ffd ("lpm: add scalar version of lookupx4")
Signed-off-by: Stanislaw Kardach <kda@semihalf.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
lib/lpm/rte_lpm_scalar.h