Something like a blog

Combining and splitting Cyclic Redundancy Checksum (CRC)

A data chunk's CRC can be efficiently derived from some CRCs already calculated for its individual subchunks using a well known, but rather undocumented algorithm.

The inverse question, that of *un*merging CRCs again, is also of practical interest. For example, any soft-RoCE implementation could be enabled to reuse CRCs already calculated in Ethernet cards on the receiving side. Although solving the problem of unmerging CRCs is not exceptionally hard mathematically, I wasn't able to find anything about it on the web.

Both questions are answered formally with nice pictures and everything in a small article I've prepared for you.

A great part of this article deals with the tuning of the resulting algorithms' parameters for efficiency as well as optimizing the hotspots on x86_64 as well as on ARM.

You can find the result here: Combining and splitting CRCs (PDF, ~600kiB).

Linux kernel hacking tips

  • For those of us who lack dedicated hardware for doing their kernel development, I've written together a short guide on how to setup a suitable VM with QEMU.
  • A few instructions on how to easily navigate the Linux kernel sources (or whatever) from Emacs with the helm-gtags mode.
  • Rebooting a 1000 times provides you with a systemd integrated solution based on kexec for rebooting a specified number of times and collecting some data in between .


About me

Author: Nicolai Stange

Created: 2018-03-11 Sun 11:26

Emacs 25.3.1 (Org mode 8.2.10)