linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Paul Mackerras <paulus@ozlabs.org>, linuxppc-dev@ozlabs.org
Subject: Re: [1/2] powerpc/64: Fix checksum folding in csum_tcpudp_nofold and ip_fast_csum_nofold
Date: Fri, 27 Jan 2017 11:40:32 +1100 (AEDT)	[thread overview]
Message-ID: <3v8g1X5rqwz9t0t@ozlabs.org> (raw)
In-Reply-To: <20161103051055.GA8368@fergus.ozlabs.ibm.com>

On Thu, 2016-11-03 at 05:10:55 UTC, Paul Mackerras wrote:
> These functions compute an IP checksum by computing a 64-bit sum and
> folding it to 32 bits (the "nofold" in their names refers to folding
> down to 16 bits).  However, doing (u32) (s + (s >> 32)) is not
> sufficient to fold a 64-bit sum to 32 bits correctly.  The addition
> can produce a carry out from bit 31, which needs to be added in to
> the sum to produce the correct result.
> 
> To fix this, we copy the from64to32() function from lib/checksum.c
> and use that.
> 
> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/b492f7e4e07a28e706db26cf4943bb

cheers

      parent reply	other threads:[~2017-01-27  0:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03  5:10 [PATCH 1/2] powerpc/64: Fix checksum folding in csum_tcpudp_nofold and ip_fast_csum_nofold Paul Mackerras
2016-11-03  5:15 ` [PATCH 2/2] powerpc/64: Use optimized checksum routines on little-endian Paul Mackerras
2017-01-27  0:40   ` [2/2] " Michael Ellerman
2016-11-08  7:23 ` [PATCH 1/2] powerpc/64: Fix checksum folding in csum_tcpudp_nofold and ip_fast_csum_nofold Michael Ellerman
2016-11-08 22:05   ` Paul Mackerras
2016-12-02  9:44 ` Michael Ellerman
2017-01-27  0:40 ` Michael Ellerman [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=3v8g1X5rqwz9t0t@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@ozlabs.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).