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
Sponsored by: The FreeBSD Foundation

(cherry picked from commit ecbbe831445a4b94279e5932828d60076e4ca444)

Details

Provenance
markjAuthored on Nov 24 2021, 6:19 PM
Parents
rG53e965ff94c3: netinet: Remove in_cksum.c
Branches
Unknown
Tags
Unknown