From: Ivo van Doorn <ivdoorn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Dmitry Eremin-Solenikov"
<dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Ben Hutchings <ben-/+tVBieCtBitmTQ+vhA3Yw@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org,
Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>,
Sergey Lapin <slapin-9cOl001CZnBAfugRpC6u6w@public.gmane.org>,
Darren Salt
<linux-Ym6Ivm/Ks7B65+NM0QMiFAbYiX8G1TQY9dF7HbQ/qKg@public.gmane.org>
Subject: Re: [PATCH 1/6] crc-itu-t: add bit-reversed calculation
Date: Sun, 21 Jun 2009 12:18:25 +0200 [thread overview]
Message-ID: <200906211218.25709.IvDoorn@gmail.com> (raw)
In-Reply-To: <20090621082921.GA12749-nIupHZaCssqR2kOLt6zJ8ErlnG4Plg33XqFh9Ls21Oc@public.gmane.org>
[non-HTML reply, sorry about that]
On Sunday 21 June 2009, Dmitry Eremin-Solenikov wrote:
> Hi,
>
>
> On Wed, Jun 03, 2009 at 01:43:24PM +0100, Ben Hutchings wrote:
> > On Wed, 2009-06-03 at 13:33 +0400, Dmitry Eremin-Solenikov wrote:
> > [...]
> > > +/**
> > > + * crc_itu_t_bitreversed - Compute the CRC-ITU-T for the data buffer;
> > > + * the buffer content is assumed to be bit-reversed
> > [...]
> >
> > This short description spills onto two lines which is invalid and breaks
> > the generation of docs. Sorry to point this out after recommending the
> > patch to you.
> >
> > I've changed the description to "crc_itu_t_bitreversed - Compute the
> > CRC-ITU-T for a bit-reversed data buffer" all on one line.
>
> Just another not w.r.t. this patch: one should add 'select BITREVERSE'
> to this Kconfig entry, as it depends on bitreversing stuff.
What also might be interesting, have you checked the crc-ccitt algorithm?
I had come across a crc_itu_t with bitreverse implementation in the past as
well, and I could simplify the implementation by using crc-ccit and only call
bitreverse on the last output. So something like:
u16 crc = crc_ccitt(~0, data, len);
u16 crc_itu_t = swab16(crc);
Instead of bitreverse for every step, only a single byteswap was needed.
You need to check if this indeed works for your driver, but this would
reduce the number of times bitrev is called, and also prevents the BITREV
dependency for the crc implementation.
Ivo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2009-06-21 10:18 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-03 9:33 [MERGE REQUEST] IEEE 802.15.4 stack: generic parts Dmitry Eremin-Solenikov
2009-06-03 9:33 ` [PATCH 1/6] crc-itu-t: add bit-reversed calculation Dmitry Eremin-Solenikov
2009-06-03 9:33 ` [PATCH 2/6] Add constants for the ieee 802.15.4/ZigBee stack Dmitry Eremin-Solenikov
2009-06-03 9:33 ` [PATCH 3/6] net: add IEEE 802.15.4 socket family implementation Dmitry Eremin-Solenikov
[not found] ` <1244021629-18409-4-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-06-03 9:33 ` [PATCH 4/6] net: add NL802154 interface for configuration of 802.15.4 devices Dmitry Eremin-Solenikov
[not found] ` <1244021629-18409-5-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-06-03 9:33 ` [PATCH 5/6] ieee802154: add documentation about our stack Dmitry Eremin-Solenikov
[not found] ` <1244021629-18409-6-git-send-email-dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-06-03 9:33 ` [PATCH 6/6] ieee802154: add simple HardMAC driver sample Dmitry Eremin-Solenikov
2009-06-03 9:39 ` [PATCH 4/6] net: add NL802154 interface for configuration of 802.15.4 devices Johannes Berg
[not found] ` <1244021964.10665.5.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>
2009-06-03 10:09 ` David Miller
2009-06-03 10:52 ` Dmitry Eremin-Solenikov
2009-06-03 11:05 ` Johannes Berg
[not found] ` <1244027110.1693.9.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>
2009-06-03 12:27 ` Dmitry Eremin-Solenikov
2009-06-04 14:12 ` Johannes Berg
[not found] ` <1244124749.22576.71.camel-YfaajirXv2244ywRPIzf9A@public.gmane.org>
2009-06-04 14:51 ` Dmitry Eremin-Solenikov
[not found] ` <bc64b4640906040751i3c64c317i4eedb7d53307092a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-06-04 15:12 ` Patrick McHardy
[not found] ` <4A27E448.3040305-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
2009-06-04 15:14 ` Dmitry Eremin-Solenikov
[not found] ` <bc64b4640906040814m1756ea13s19e20592ecf90e9b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-06-04 15:15 ` Patrick McHardy
2009-06-03 12:55 ` Sergey Lapin
2009-06-03 14:21 ` Patrick McHardy
2009-06-03 23:12 ` Dmitry Eremin-Solenikov
2009-06-03 10:08 ` [PATCH 2/6] Add constants for the ieee 802.15.4/ZigBee stack David Miller
[not found] ` <20090603.030826.03512651.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-06-03 10:51 ` Dmitry Eremin-Solenikov
2009-06-03 21:19 ` David Miller
[not found] ` <20090603.141919.261921857.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2009-06-03 23:15 ` Dmitry Eremin-Solenikov
2009-06-04 0:49 ` David Miller
2009-06-03 12:43 ` [PATCH 1/6] crc-itu-t: add bit-reversed calculation Ben Hutchings
2009-06-03 12:48 ` Dmitry Eremin-Solenikov
2009-06-04 0:49 ` Dmitry Eremin-Solenikov
2009-06-21 8:29 ` Dmitry Eremin-Solenikov
[not found] ` <20090621082921.GA12749-nIupHZaCssqR2kOLt6zJ8ErlnG4Plg33XqFh9Ls21Oc@public.gmane.org>
2009-06-21 10:18 ` Ivo van Doorn [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=200906211218.25709.IvDoorn@gmail.com \
--to=ivdoorn-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=ben-/+tVBieCtBitmTQ+vhA3Yw@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-Ym6Ivm/Ks7B65+NM0QMiFAbYiX8G1TQY9dF7HbQ/qKg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org \
--cc=slapin-9cOl001CZnBAfugRpC6u6w@public.gmane.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).