From: "Arend van Spriel" <arend@broadcom.com>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"John W. Linville" <linville@tuxdriver.com>,
"Dan Carpenter" <error27@gmail.com>
Subject: Re: [RFC] lib: crc8: add new library module providing crc8 algorithm
Date: Tue, 24 May 2011 19:00:34 +0200 [thread overview]
Message-ID: <4DDBE432.3040207@broadcom.com> (raw)
In-Reply-To: <20110524135705.00f7fb12@lxorguk.ukuu.org.uk>
On 05/24/2011 02:57 PM, Alan Cox wrote:
> On Tue, 24 May 2011 12:38:45 +0200
> "Arend van Spriel"<arend@broadcom.com> wrote:
>
>> On 05/24/2011 12:27 PM, Alan Cox wrote:
>>>> Not sure whether you mean the source code or the object code. I build
>>>> kernel with debug symbols so the sizes are bit higher.
>>> nm will tell you the actual sizes. I think the n_gsm code is about 500
>>> bytes or so and chunks of it inline.
>> Not counting the crc table I assume.
> I forget but I think including - its a tiny tiny bit of code once inlined.
I used nm on both flavours.
dynamic crc table based on polynomial and bit order
---------------------------------------------------
00000000 00000026 T crc8
00000030 000000dc T crc8_create
fixed crc table with table selection based on bit order
-------------------------------------------------------
00000000 00000026 T crc8
00000030 0000002b T crc8_create
00000100 00000100 r crc8_table_lsb
00000000 00000100 r crc8_table_msb
The first requires the user to provide buffer to hold the table. The
difference is in the crc_create() function (maybe better named
crc_populate_table() in first, and crc_select_table() in second). It is
177 bytes larger. The crc calculating function is 38 bytes. Still pretty
small I would think.
Gr. AvS
--
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --
next prev parent reply other threads:[~2011-05-24 17:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-21 20:49 [RFC] lib: crc8: add new library module providing crc8 algorithm Arend van Spriel
2011-05-21 22:37 ` Johannes Berg
2011-05-22 8:23 ` Arend van Spriel
2011-05-22 11:23 ` Alan Cox
2011-05-22 12:47 ` Arend van Spriel
[not found] ` <20110522151959.7fd6e87e@lxorguk.ukuu.org.uk>
2011-05-22 15:38 ` Arend van Spriel
2011-05-24 7:45 ` Arend van Spriel
2011-05-24 8:30 ` Arend van Spriel
2011-05-24 9:44 ` Alan Cox
2011-05-24 10:01 ` Arend van Spriel
2011-05-24 10:25 ` Rafał Miłecki
2011-05-24 10:40 ` Arend van Spriel
2011-05-24 10:27 ` Alan Cox
2011-05-24 10:38 ` Arend van Spriel
2011-05-24 12:57 ` Alan Cox
2011-05-24 17:00 ` Arend van Spriel [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-05-22 8:08 Arend van Spriel
2011-05-22 8:59 ` Nicolas Kaiser
2011-05-22 12:49 ` Arend van Spriel
2011-05-24 20:23 Arend van Spriel
2011-05-24 22:52 ` George Spelvin
2011-05-25 5:21 ` Arend van Spriel
2011-05-25 5:46 ` George Spelvin
2011-05-25 6:49 ` Arend van Spriel
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=4DDBE432.3040207@broadcom.com \
--to=arend@broadcom.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=error27@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).