Introduce `rt_lock' rwlock(9) and use it instead of kernel lock to
authormvs <mvs@openbsd.org>
Sat, 21 Jan 2023 17:35:01 +0000 (17:35 +0000)
committermvs <mvs@openbsd.org>
Sat, 21 Jan 2023 17:35:01 +0000 (17:35 +0000)
commite686086e7d44315bccc6becf173656a6185bfcba
tree6284cad13fbb672c3484751514de236b64af50ae
parent50b4e57e47b89bc7f53ae67e19705762b29102c7
Introduce `rt_lock' rwlock(9) and use it instead of kernel lock to
serialize arpcache() and arpresolve(). In fact, net stack already has
sleep points, so the rwlock(9) is better here because we avoid
intersection with the rest of kernel locked paths. Also this new lock
assumed to use to route layer protection instead of netlock.

Hrvoje Popovski had tested this diff and found no visible performance
impact.

ok bluhm@
sys/net/route.c
sys/net/route.h
sys/netinet/if_ether.c