DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Stanislaw Kardach <kda@semihalf.com>
Cc: Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	dev <dev@dpdk.org>,
	upstream@semihalf.com
Subject: Re: [PATCH 2/3] lpm: fix xmm_t casting for C++ in scalar version
Date: Mon, 13 Jun 2022 11:29:31 +0200	[thread overview]
Message-ID: <CAJFAV8zS5Lj9_zwJQqgBEyEYf1Vr52P-iUc6K1C=0ST1=qDfmg@mail.gmail.com> (raw)
In-Reply-To: <20220609121701.716299-3-kda@semihalf.com>

On Thu, Jun 9, 2022 at 2:17 PM Stanislaw Kardach <kda@semihalf.com> wrote:
>
> 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 | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/lib/lpm/rte_lpm_scalar.h b/lib/lpm/rte_lpm_scalar.h
> index f0d9f37894..161b40ff80 100644
> --- a/lib/lpm/rte_lpm_scalar.h
> +++ b/lib/lpm/rte_lpm_scalar.h
> @@ -15,18 +15,19 @@ extern "C" {
>
>  static inline void
>  rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],
> -               uint32_t defv)
> +                uint32_t defv)

Nit: unrelated whitespace change.
Besides, indent is supposed to be one tab.
This can be dropped when applying.


-- 
David Marchand


  reply	other threads:[~2022-06-13  9:29 UTC|newest]

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

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='CAJFAV8zS5Lj9_zwJQqgBEyEYf1Vr52P-iUc6K1C=0ST1=qDfmg@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=kda@semihalf.com \
    --cc=upstream@semihalf.com \
    --cc=vladimir.medvedkin@intel.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).