From: Guenter Roeck <linux@roeck-us.net>
To: Charlie Jenkins <charlie@rivosinc.com>
Cc: "James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
Helge Deller <deller@gmx.de>, Arnd Bergmann <arnd@arndb.de>,
Andrew Morton <akpm@linux-foundation.org>,
linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arch@vger.kernel.org
Subject: Re: [PATCH 1/4] asm-generic headers: Allow csum_partial arch override
Date: Thu, 22 Feb 2024 08:04:16 -0800 [thread overview]
Message-ID: <212db8ca-c01c-4cb0-b794-50931338afb9@roeck-us.net> (raw)
In-Reply-To: <20240221-parisc_use_generic_checksum-v1-1-ad34d895fd1b@rivosinc.com>
On Wed, Feb 21, 2024 at 06:37:11PM -0800, Charlie Jenkins wrote:
> Arches can have more a efficient implementation of csum_partial.
>
> Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
> ---
> include/asm-generic/checksum.h | 2 ++
> lib/checksum.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/include/asm-generic/checksum.h b/include/asm-generic/checksum.h
> index ad928cce268b..3309830ba2cb 100644
> --- a/include/asm-generic/checksum.h
> +++ b/include/asm-generic/checksum.h
> @@ -4,6 +4,7 @@
>
> #include <linux/bitops.h>
>
> +#ifndef csum_partial
> /*
> * computes the checksum of a memory block at buff, length len,
> * and adds in "sum" (32-bit)
> @@ -17,6 +18,7 @@
> * it's best to have buff aligned on a 32-bit boundary
> */
> extern __wsum csum_partial(const void *buff, int len, __wsum sum);
> +#endif
>
> #ifndef ip_fast_csum
> /*
> diff --git a/lib/checksum.c b/lib/checksum.c
> index 6860d6b05a17..c115a9ac71d9 100644
> --- a/lib/checksum.c
> +++ b/lib/checksum.c
> @@ -110,6 +110,7 @@ __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
> EXPORT_SYMBOL(ip_fast_csum);
> #endif
>
> +#ifndef csum_partial
> /*
> * computes the checksum of a memory block at buff, length len,
> * and adds in "sum" (32-bit)
> @@ -134,6 +135,7 @@ __wsum csum_partial(const void *buff, int len, __wsum wsum)
> return (__force __wsum)result;
> }
> EXPORT_SYMBOL(csum_partial);
> +#endif
>
> /*
> * this routine is used for miscellaneous IP-like checksums, mainly
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2024-02-22 16:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 2:37 [PATCH 0/4] parisc: checksum: Use generic implementations and optimize checksum Charlie Jenkins
2024-02-22 2:37 ` [PATCH 1/4] asm-generic headers: Allow csum_partial arch override Charlie Jenkins
2024-02-22 16:04 ` Guenter Roeck [this message]
2024-02-22 2:37 ` [PATCH 2/4] parisc: checksum: Use generic implementations Charlie Jenkins
2024-02-22 16:04 ` Guenter Roeck
2024-02-22 2:37 ` [PATCH 3/4] parisc: checksum: Remove folding from csum_partial Charlie Jenkins
2024-02-22 16:04 ` Guenter Roeck
2024-02-22 2:37 ` [PATCH 4/4] parisc: checksum: Optimize from32to16 Charlie Jenkins
2024-02-22 16:04 ` Guenter Roeck
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=212db8ca-c01c-4cb0-b794-50931338afb9@roeck-us.net \
--to=linux@roeck-us.net \
--cc=James.Bottomley@hansenpartnership.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=charlie@rivosinc.com \
--cc=deller@gmx.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.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
all inboxes | Powered by JetHome®