]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ipsec: replace SECASVAR mtx by rmlock
authorKristof Provost <kp@FreeBSD.org>
Thu, 23 Jun 2022 20:35:29 +0000 (22:35 +0200)
committerKristof Provost <kp@FreeBSD.org>
Tue, 19 Jul 2022 03:27:20 +0000 (05:27 +0200)
commit0361f165f2193a098cfbfeef3a58ec2f1eaac0a1
tree8f6082ca374ba9b0b34062781f9c50c98c2a4d51
parent4eaaacc75535befdb9894cca4e0d8da376328fa4
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
sys/netipsec/ipsec.c
sys/netipsec/key.c
sys/netipsec/key_debug.c
sys/netipsec/keydb.h
sys/netipsec/xform_ah.c
sys/netipsec/xform_esp.c
sys/netipsec/xform_ipcomp.c