patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: David Marchand <david.marchand@redhat.com>
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>,
	dev <dev@dpdk.org>, dpdk stable <stable@dpdk.org>,
	Aaron Conole <aconole@redhat.com>
Subject: Re: [dpdk-stable] [PATCH] test/bpf: fix auto-test with clang fails
Date: Wed, 20 Oct 2021 13:51:27 -0700	[thread overview]
Message-ID: <20211020135127.6aaf62e4@hermes.local> (raw)
In-Reply-To: <CAJFAV8wD_NY46XR_QrCFVQ5okRFNeaamGY10k7au5a+m-ME4gA@mail.gmail.com>

On Wed, 20 Oct 2021 20:46:31 +0200
David Marchand <david.marchand@redhat.com> wrote:

> On Mon, Oct 18, 2021 at 5:59 PM Stephen Hemminger
> <stephen@networkplumber.org> wrote:
> > Konstantin Ananyev <konstantin.ananyev@intel.com> wrote:  
> > > test_shift1_check() function fails with clang build.
> > > The reason for that is that clang uses 64-bit shift instruction for
> > > what expected to be 32-bit operation.
> > > To be more specific, this C code:
> > > r2 = (uint32_t)r2 >> r4;
> > > With clang produces:
> > > 41a4eb:       48 d3 ef                shr    %cl,%rdi
> > > In that particular case it is an allowed choice, as from one side
> > > left-operand value is known to fit into 32 bits, from other side
> > > according to 'C' standard:
> > > "...if the value of the right operand is negative or is greater than
> > > or equal to the width of the promoted left operand, the behavior is
> > > undefined."
> > > The problem is that on x86 behavior for 64-bit and 32-bit shift
> > > operation might differ.
> > > The fix avoids undefined behavior by making sure
> > > that right operand will not exceed width of the promoted left operand.
> > >
> > > Bugzilla ID: 811
> > > Fixes: 9f8f9d91a701 ("test/bpf: introduce functional test")
> > > Cc: stable@dpdk.org
> > >
> > > Reported-by: Stephen Hemminger <stephen@networkplumber.org>
> > > Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>  
> > Acked-by: Stephen Hemminger <stephen@networkplumber.org>  
> 
> Applied, thanks.
> 
> Probably worth adding bpf_autotest in the fast-tests list.
> There are other missing tests in this list, for my todolist unless
> someone wants to look at it.

That is what found this...
https://patchwork.dpdk.org/project/dpdk/patch/20211015201129.63220-11-stephen@networkplumber.org/



      reply	other threads:[~2021-10-20 20:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 13:40 Konstantin Ananyev
2021-10-18 15:58 ` Stephen Hemminger
2021-10-20 18:46   ` David Marchand
2021-10-20 20:51     ` Stephen Hemminger [this message]

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=20211020135127.6aaf62e4@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=aconole@redhat.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=stable@dpdk.org \
    /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).