netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Tom Herbert <tom@herbertland.com>,
	David Miller <davem@davemloft.net>,
	Netdev <netdev@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Peter Anvin <hpa@zytor.com>,
	the arch/x86 maintainers <x86@kernel.org>,
	Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH v4 net-next] net: Implement fast csum_partial for x86_64
Date: Mon, 29 Feb 2016 01:39:51 +0000 (GMT)	[thread overview]
Message-ID: <alpine.LFD.2.20.1602290135170.28664@eddie.linux-mips.org> (raw)
In-Reply-To: <CAKgT0UfDWXbXSX45XRZjTc6SXz+XqaYa1bHGzOUV_RXSPh=U=A@mail.gmail.com>

On Sun, 28 Feb 2016, Alexander Duyck wrote:

> I actually found the root cause.  The problem is in add32_with_carry3.
> 
> > +static inline unsigned int add32_with_carry3(unsigned int a, unsigned int b,
> > +                                            unsigned int c)
> > +{
> > +       asm("addl %2,%0\n\t"
> > +           "adcl %3,%0\n\t"
> > +           "adcl $0,%0"
> > +           : "=r" (a)
> > +           : "" (a), "rm" (b), "rm" (c));
> > +
> > +       return a;
> > +}
> > +
> 
> You need to set the 'a' input variable attribute to "0" instead of ""
> and then things work for me correctly.

 Or alternatively you can reduce the number of operands by one, by using 
`"+r" (a)' as output, and then removing `a' as a separate input and 
renumbering references to `b' and `c' accordingly.  It would IMHO actually 
better match the in-place operation as well.

 FWIW,

  Maciej

  parent reply	other threads:[~2016-02-29  1:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 20:03 [PATCH v4 net-next] net: Implement fast csum_partial for x86_64 Tom Herbert
2016-02-26 20:29 ` Linus Torvalds
2016-02-26 20:41   ` Tom Herbert
2016-02-26 22:52 ` Alexander Duyck
2016-02-27  3:11   ` Tom Herbert
2016-02-27  3:40     ` Alexander Duyck
2016-02-27  5:25   ` Linus Torvalds
2016-02-27  8:30 ` Alexander Duyck
2016-02-28 18:56   ` Alexander Duyck
2016-02-28 19:15     ` Tom Herbert
2016-02-29  1:33       ` Alexander Duyck
2016-02-29  1:39     ` Maciej W. Rozycki [this message]
2016-02-28 20:35 ` Eric Dumazet
  -- strict thread matches above, loose matches on Subject: below --
2016-02-28 21:43 George Spelvin

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=alpine.LFD.2.20.1602290135170.28664@eddie.linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=alexander.duyck@gmail.com \
    --cc=davem@davemloft.net \
    --cc=hpa@zytor.com \
    --cc=kernel-team@fb.com \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tom@herbertland.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.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).