[lkml]   [2007]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 1/6] firewire: handling of cards, buses, nodes
    Pekka Enberg wrote:
    > On 5/2/07, Stefan Richter <> wrote:
    >> +/* The lib/crc16.c implementation uses the standard (0x8005)
    >> + * polynomial, but we need the ITU-T (or CCITT) polynomial (0x1021).
    >> + * The implementation below works on an array of host-endian u32
    >> + * words, assuming they'll be transmited msb first. */
    >> +u16
    >> +crc16_itu_t(const u32 *buffer, size_t length)
    >> +{
    > [snip]
    > So put it in lib/crc-itu-t.c? Btw, there's apparently another ITU-T
    > implementation floating around by Ivo van Doorn.

    I looked around a bit with grep -R and a few search terms but didn't
    find something definite. Is there any other user of a crc16_itu_t or
    crc_ccitt or whatever which operates on a (CPU byte ordered) u32[]
    instead of on a (network byte ordered) u8[]?

    The only value in having a shared implementation would be a potentially
    smaller kernel. Sharing it to ensure correctness is not an issue;
    fw-topology.c::crc16_itu_t is simply the one in IEEE 1212 table 5.
    Performance is also not an issue (if better algorithms exist) because
    the FireWire stack uses it only infrequently on a moderate amount of data.
    Stefan Richter
    -=====-=-=== -=-= ---=-
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-05-02 21:19    [W:0.026 / U:35.376 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site