HomeFreeBSD

sockets: use socket buffer mutexes in struct socket directly

Description

sockets: use socket buffer mutexes in struct socket directly

Since c67f3b8b78e the sockbuf mutexes belong to the containing socket,
and socket buffers just point to it. In 74a68313b50 macros that access
this mutex directly were added. Go over the core socket code and
eliminate code that reaches the mutex by dereferencing the sockbuf
compatibility pointer.

This change requires a KPI change, as some functions were given the
sockbuf pointer only without any hint if it is a receive or send buffer.

This change doesn't cover the whole kernel, many protocols still use
compatibility pointers internally. However, it allows operation of a
protocol that doesn't use them.

Reviewed by: markj
Differential revision: https://reviews.freebsd.org/D35152

Details

Provenance
glebiusAuthored on May 12 2022, 8:22 PM
Reviewer
markj
Differential Revision
D35152: sockets: use socket buffer mutexes in struct socket directly
Parents
rG009e8f0a1099: pf: fix pf_rule_to_actions()
Branches
Unknown
Tags
Unknown