HomeFreeBSD

sctp: Use m_apply() to calcuate a checksum for an mbuf chain

Description

sctp: Use m_apply() to calcuate a checksum for an mbuf chain

m_apply() works on unmapped mbufs, so this will let us elide
mb_unmapped_to_ext() calls preceding sctp_calculate_cksum() calls in
the network stack.

Modify sctp_calculate_cksum() to assume it's passed an mbuf header.
This assumption appears to be true in practice, and we need to know the
full length of the chain.

No functional change intended.

Reviewed by: tuexen, jhb
Sponsored by: The FreeBSD Foundation

(cherry picked from commit b4d758a0cc54d991d2bdf7f697ec0b6b3fd6230d)

Details

Provenance
markjAuthored on Nov 16 2021, 6:36 PM
Parents
rG02e3eb8d482d: mbuf: Only allow extpg mbufs if the system has a direct map
Branches
Unknown
Tags
Unknown