HomeFreeBSD

netinet: Deduplicate most in_cksum() implementations

Description

netinet: Deduplicate most in_cksum() implementations

in_cksum() and related routines are implemented separately for each
platform, but only i386 and arm have optimized versions. Other
platforms' copies of in_cksum.c are identical except for style
differences and support for big-endian CPUs.

Deduplicate the implementations for the rest of the platforms. This
will make it easier to implement in_cksum() for unmapped mbufs. On arm
and i386, define HAVE_MD_IN_CKSUM to mean that the MI implementation is
not to be compiled.

No functional change intended.

Reviewed by: kp, glebius
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33095

Details

Provenance
markjAuthored on Nov 24 2021, 6:19 PM
Reviewer
kp
Differential Revision
D33095: netinet: Deduplicate most in_cksum() implementations
Parents
rG5195bcc2126b: netinet: Remove in_cksum.c
Branches
Unknown
Tags
Unknown