Skip to content

Fix xmm_t to rte_xmm_t scalar conversion

Stanislaw Kardach dpdk-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3eal/riscv: fix xmm_t casting for C++lib/eal/riscv/include/rte_vect.h+2 -21 reply
2/3lpm: fix xmm_t casting for C++ in scalar versionlib/lpm/rte_lpm_scalar.h+6 -51 reply
3/3ci: use crossbuild-essential-riscv64 for compiling.github/workflows/build.yml+1 -22 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchDavid MarchandAaron Conole
1/3R-b
2/3R-b
3/3R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] Fix xmm_t to rte_xmm_t scalar conversion

As David noticed in [1] there is an issue with C++ compilation of the rte_vect.h header in RISC-V. Upon closer inspection, the problem appears on all architectures due to the type conversion rules in C++.
More precisely a union type rte_xmm_t requires a conversion constructor from xmm_t type.
The most obvious fix is to use a structure initializer for such copies (since rte_xmm_t union contains xmm_t anyway). The generated assembly at -O2 is exactly the same, so there's no real impact.

The bigger question is whether accessing bits of the architecture specific xmm_t type in an array fashion is always correct? All current architectures define rte_xmm_t in the same manner implying that.

Additionally change RISC-V CI settings to use crossbuild-essential-riscv64 package which provides tools that enable C++ checks.

[1] http://mails.dpdk.org/archives/dev/2022-June/243683.html

Stanislaw Kardach (3):
eal/riscv: fix xmm_t casting for C++
lpm: fix xmm_t casting for C++ in scalar version
ci: use crossbuild-essential-riscv64 for compiling

 .github/workflows/build.yml      |  3 +--
 lib/eal/riscv/include/rte_vect.h |  4 ++--
 lib/lpm/rte_lpm_scalar.h         | 11 ++++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.30.2