DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Stanisław Kardach" <kda@semihalf.com>
Cc: David Christensen <drc@linux.vnet.ibm.com>,
	David Marchand <david.marchand@redhat.com>, dev <dev@dpdk.org>,
	upstream@semihalf.com, Aaron Conole <aconole@redhat.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"Ruifeng Wang (Arm Technology China)" <ruifeng.wang@arm.com>,
	Jerin Jacob Kollanukkaran <jerinj@marvell.com>
Subject: Re: [PATCH 0/3] Fix xmm_t to rte_xmm_t scalar conversion
Date: Tue, 21 Jun 2022 10:38:47 +0100	[thread overview]
Message-ID: <YrGRp5QfOaMsjhkF@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <CALVGJW+86cUbfx0nKJMvwXcD0+sFBStFiWXjtMXnzrYC7Oe4fA@mail.gmail.com>

On Tue, Jun 21, 2022 at 11:30:32AM +0200, Stanisław Kardach wrote:
> On Tue, Jun 21, 2022 at 12:54 AM David Christensen
> <drc@linux.vnet.ibm.com> wrote:
> >
> > > On Thu, Jun 9, 2022 at 2:17 PM Stanislaw Kardach <kda@semihalf.com> wrote:
> > >>
> > >> 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.
> > >
> > > Copying other arch maintainers.
> >
> > My read of the Altivec vector layout for LE systems says the existing
> > union operator rte_xmm_t is correct, though my C++ experience is
> > limited.  How can I generate an error with C++ to expose this issue?
> >
> > Dave
> To replicate this issue:
> 1. Apply the patch below. In essence it forces the use of scalar lpm
> and changes C++ compiler to g++ so that meson properly detects it.
> Otherwise C++ checks won't be generated.
> 2. Configure build with: meson build-ppc64le --werror --cross-file
> config/ppc/ppc64le-power8-linux-gcc-ubuntu -Dcheck_includes=true
> 3. Build with: ninja -C build-ppc64le buildtools/chkincs/chkincs-cpp
> 
> Note that the build target only gets generated if C++ compiler is
> properly discovered by meson. To be honest I'm not sure why
> powerpc64le-linux-gnu-cpp doesn't get properly picked up by meson.

Generally the "cpp" binary is not the c-plus-plus one, but the C
preprocessor one. Perhaps the original files are incorrect here, and should
all refer to g++.

/Bruce


  reply	other threads:[~2022-06-21  9:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YrGRp5QfOaMsjhkF@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=aconole@redhat.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=drc@linux.vnet.ibm.com \
    --cc=jerinj@marvell.com \
    --cc=kda@semihalf.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=ruifeng.wang@arm.com \
    --cc=upstream@semihalf.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).