From: Greg KH <gregkh@linuxfoundation.org>
To: Frank Haverkamp <haver@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, arnd@arndb.de,
cody@linux.vnet.ibm.com, schwidefsky@de.ibm.com,
utz.bacher@de.ibm.com, mmarek@suse.cz, rmallon@gmail.com,
jsvogt@de.ibm.com, MIJUNG@de.ibm.com,
cascardo@linux.vnet.ibm.com, michael@ibmra.de
Subject: Re: [RFC 1/2] CRC32 Add GenWQE CRC to kernel CRC code
Date: Wed, 18 Dec 2013 16:55:58 -0800 [thread overview]
Message-ID: <20131219005557.GB32112@kroah.com> (raw)
In-Reply-To: <1386780563-1722-1-git-send-email-haver@linux.vnet.ibm.com>
On Wed, Dec 11, 2013 at 05:49:22PM +0100, Frank Haverkamp wrote:
> Our GenWQE driver is using a CRC32 polynom, which as far as I could
> see, no one else is using in the kernel. In its original version we
> implemented our own CRC32, but I think it is nicer to use the common
> code as suggested by Greg.
>
> I did not want to add yet another crc32g_table and waste (1KiB) memory
> when no one else is using it. I tried to externalize the
> crc32init_be_generic and crc32_be_generic functions. I failed. The
> crc32init* I found is used to autogenerate code can is itself not part
> of the resulting kernel.
>
> As result I gave up on that approach and just added the GenWQE special
> polynom in addition to the other 3 crc tables. I wanted to figure out
> if it is possible in principle to use the generic code.
>
> Is the consumption of 1KiB for a little table justifyable if it
> currently has just one user?
>
> Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com>
> ---
> include/linux/crc32.h | 2 2 + 0 - 0 !
> lib/crc32.c | 10 10 + 0 - 0 !
> lib/crc32defs.h | 5 5 + 0 - 0 !
> lib/gen_crc32table.c | 39 31 + 8 - 0 !
> 4 files changed, 48 insertions(+), 8 deletions(-)
What kind of crazy diffstat is that? What generated it?
>
> --- a/include/linux/crc32.h
> +++ b/include/linux/crc32.h
> @@ -11,6 +11,8 @@
> extern u32 crc32_le(u32 crc, unsigned char const *p, size_t len);
> extern u32 crc32_be(u32 crc, unsigned char const *p, size_t len);
>
> +extern u32 __crc32g_be(u32 crc, unsigned char const *p, size_t len);
Ick, don't export __ functions, that means something is not quite right
with the api, don't you agree?
Why not just export crc32g_be() and make the changes inside the crc32.c
file to handle that?
thanks,
greg k-h
next prev parent reply other threads:[~2013-12-19 2:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 12:30 [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v10) Frank Haverkamp
2013-12-09 12:30 ` [PATCH 1/6] GenWQE PCI support, health monitoring and recovery Frank Haverkamp
2013-12-09 12:30 ` [PATCH 2/6] GenWQE Character device and DDCB queue Frank Haverkamp
2013-12-09 12:30 ` [PATCH 3/6] GenWQE Utility functions Frank Haverkamp
2013-12-09 12:30 ` [PATCH 4/6] GenWQE Debugfs interfaces Frank Haverkamp
2013-12-09 12:30 ` [PATCH 5/6] GenWQE Sysfs interfaces Frank Haverkamp
2013-12-09 12:30 ` [PATCH 6/6] GenWQE Enable driver Frank Haverkamp
2013-12-11 16:49 ` [RFC 1/2] CRC32 Add GenWQE CRC to kernel CRC code Frank Haverkamp
2013-12-19 0:55 ` Greg KH [this message]
2013-12-19 9:10 ` Frank Haverkamp
2013-12-11 16:49 ` [RFC 2/2] GenWQE: Make use of the generic CRC kernel infrastructure Frank Haverkamp
2013-12-18 15:51 ` [PATCH 0/6] Generic WorkQueue Engine (GenWQE) device driver (v10) Frank Haverkamp
2013-12-19 0:52 ` Greg KH
2013-12-20 7:24 ` Frank Haverkamp
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=20131219005557.GB32112@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=MIJUNG@de.ibm.com \
--cc=arnd@arndb.de \
--cc=cascardo@linux.vnet.ibm.com \
--cc=cody@linux.vnet.ibm.com \
--cc=haver@linux.vnet.ibm.com \
--cc=jsvogt@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@ibmra.de \
--cc=mmarek@suse.cz \
--cc=rmallon@gmail.com \
--cc=schwidefsky@de.ibm.com \
--cc=utz.bacher@de.ibm.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
Powered by JetHome