HomeFreeBSD

ipsec: replace SECASVAR mtx by rmlock

Description

ipsec: replace SECASVAR mtx by rmlock

This mutex is a significant point of contention in the ipsec code, and
can be relatively trivially replaced by a read-mostly lock.
It does require a separate lock for the replay protection, which we do
here by adding a separate mutex.

This improves throughput (without replay protection) by 10-15%.

MFC after: 3 weeks
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D35763

(cherry picked from commit 0361f165f2193a098cfbfeef3a58ec2f1eaac0a1)

Details

Provenance
kpAuthored on Jun 23 2022, 8:35 PM
Differential Revision
D35763: ipsec: replace SECASVAR mtx by rmlock
Parents
rGc536045c51da: lib9p: Remove potential buffer overwrite in l9p_puqids()
Branches
Unknown
Tags
Unknown