From: "Bob Pearson" <rpearson@systemfabricworks.com>
To: "'Joakim Tjernlund'" <joakim.tjernlund@transmode.se>
Cc: <akpm@linux-foundation.org>, <fzago@systemfabricworks.com>,
<linux@horizon.com>, <linux-kernel@vger.kernel.org>
Subject: RE: [patch v5 resending 0/8] Add slicing-by-8 to crc32
Date: Fri, 12 Aug 2011 12:01:59 -0500 [thread overview]
Message-ID: <027d01cc5911$8d388770$a7a99650$@systemfabricworks.com> (raw)
In-Reply-To: <026a01cc5907$d4917f50$7db47df0$@systemfabricworks.com>
>
> > The changes to gen_crc32table.c looks random, where did this come from
> > (in v5 6/8):
> > -static uint32_t crc32table_le[4][LE_TABLE_SIZE];
> > -static uint32_t crc32table_be[4][BE_TABLE_SIZE];
> > +static uint32_t crc32table_le[4][256];
> > +static uint32_t crc32table_be[4][256];
>
> The table was declared as shown but is passed from main to output_table as
> "uint32_t table[4][256]"
>
> This causes a compiler warning because the types don't match. As it
happens
> the program prints out correct results because rows other than 0 are only
> used of the column size is 256. I interpreted LE_TABLE_SIZE as the desired
> size of the output table (which it is) and let the working table in
> gen_crc32table.c be dimensioned at 256. I suppose that one could have
> changed the dimension in output_table as well.
>
One more point I forgot when I wrote this. Output_table is used for both LE
and BE tables which could have different values for ?E_TABLE_SIZE. There is
no sensible choice for changing the declaration in output_table to try to
match the various table sizes. It is much simpler to just make the tables
"by 256" and leave it at that. Since this is a build time resource there is
no penalty for the kernel itself.
next prev parent reply other threads:[~2011-08-12 17:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-11 17:52 Bob Pearson
2011-08-12 6:39 ` Joakim Tjernlund
2011-08-12 15:52 ` Bob Pearson
2011-08-12 17:01 ` Bob Pearson [this message]
2011-08-12 20:27 ` Bob Pearson
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='027d01cc5911$8d388770$a7a99650$@systemfabricworks.com' \
--to=rpearson@systemfabricworks.com \
--cc=akpm@linux-foundation.org \
--cc=fzago@systemfabricworks.com \
--cc=joakim.tjernlund@transmode.se \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@horizon.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
all inboxes | Powered by JetHome®