Project

General

Profile

Bug #12340

crc16 implementations need disambiguation

Added by Dan McDonald 5 months ago. Updated 5 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
kernel
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

While reviewing a BHYVE upstream today, I noticed this:

http://src.illumos.org/source/search?q=&defs=crc16&refs=&path=&hist=&project=illumos-gate

At least two crc16() implementations, and those are just the ones named "crc16".

History

#1

Updated by Joshua M. Clulow 5 months ago

If one were to collapse these into a single implementation, it would be good to first make sure they all produce the same output for every possible input. There are, as I recall, many different options for CRC routines; e.g., different polynomials, different initialisation vectors, etc.

#2

Updated by Dan McDonald 5 months ago

Wow. I thought crc16 was a single standard... nope:

https://en.wikipedia.org/wiki/Cyclic_redundancy_check

Looks like there are 8 different "crc16" routines. Perhaps this bug should be re-summarized to perhaps say "crc16 implementations need name-level disambiguation"?

#3

Updated by Dan McDonald 5 months ago

  • Subject changed from Too many crc16 implementations to crc16 implementations need disambiguation
  • Priority changed from Normal to Low

Per Josh's comment, and my response.

Also available in: Atom PDF