Commit Graph

2 Commits

Author SHA1 Message Date
rin 6745eb6476 No need to update mlen also in the case of (mlen & 16) != 0. 2018-08-28 07:28:01 +00:00
joerg 6e869e402d Refactor in_cksum/in4_cksum/in6_cksum implementations:
- All three functions are included in the kernel by default.
  They call a backend function cpu_in_cksum after possibly
  computing the checksum of the pseudo header.
- cpu_in_cksum is the core to implement the one-complement sum.
  The default implementation is moderate fast on most platforms
  and provides a 32bit accumulator with 16bit addends for L32 platforms
  and a 64bit accumulator with 32bit addends for L64 platforms.
  It handles edge cases like very large mbuf chains (could happen with
  native IPv6 in the future) and provides a good base for new native
  implementations.
- Modify i386 and amd64 assembly to use the new interface.

This disables the MD implementations on !x86 until the conversion is
done. For Alpha, the portable version is faster.
2008-01-25 21:12:10 +00:00