DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix xmm_t to rte_xmm_t scalar conversion
@ 2022-06-09 12:16 Stanislaw Kardach
  2022-06-09 12:16 ` [PATCH 1/3] eal/riscv: fix xmm_t casting for C++ Stanislaw Kardach
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Stanislaw Kardach @ 2022-06-09 12:16 UTC (permalink / raw)
  To: David Marchand; +Cc: Stanislaw Kardach, dev, upstream

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(-)

-- 
2.30.2

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-06-21 19:48 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-09 12:16 [PATCH 0/3] Fix xmm_t to rte_xmm_t scalar conversion Stanislaw Kardach
2022-06-09 12:16 ` [PATCH 1/3] eal/riscv: fix xmm_t casting for C++ Stanislaw Kardach
2022-06-13  9:29   ` David Marchand
2022-06-09 12:17 ` [PATCH 2/3] lpm: fix xmm_t casting for C++ in scalar version Stanislaw Kardach
2022-06-13  9:29   ` David Marchand
2022-06-09 12:17 ` [PATCH 3/3] ci: use crossbuild-essential-riscv64 for compiling Stanislaw Kardach
2022-06-13  9:29   ` David Marchand
2022-06-14 12:31   ` Aaron Conole
2022-06-15  7:25 ` [PATCH 0/3] Fix xmm_t to rte_xmm_t scalar conversion David Marchand
2022-06-20 22:54   ` David Christensen
2022-06-21  9:30     ` Stanisław Kardach
2022-06-21  9:38       ` Bruce Richardson
2022-06-21  9:42         ` Stanisław Kardach
2022-06-21  9:49           ` Bruce Richardson
2022-06-21 10:22             ` Thomas Monjalon
2022-06-21 11:05               ` Stanisław Kardach
2022-06-21 11:53                 ` Thomas Monjalon
2022-06-21 12:37                   ` Stanisław Kardach
2022-06-21 14:20                     ` Bruce Richardson
2022-06-21 19:48           ` Tyler Retzlaff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).