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
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32941

Details

Provenance
markjAuthored on Nov 16 2021, 6:36 PM
Reviewer
tuexen
Differential Revision
D32941: sctp: Use m_apply() to calcuate a checksum for an mbuf chain
Parents
rGfcaa890c4469: mbuf: Only allow extpg mbufs if the system has a direct map
Branches
Unknown
Tags
Unknown