CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2025/07/09 23:28:13
Modified files: sys/net : art.c art.h if_wg.c if_wg.h route.h rtable.c rtable.h usr.bin/netstat: route.c regress/sys/net/rtable: kern_compat.h util.c regress/sys/net/rtable/delete: main.c regress/sys/net/rtable/fullfeed: main.c Added files: regress/sys/net/rtable: smr_compat.h Log message: use the SMR api instead of SRPs in art/rtable code SRPs complicated this code massively, so moving it to SMR is almost like backing the SRP changes out. it becomes a lot more readable and similar to other ART implementations, which can't hurt. i modified how the heaps are traversed inside ART as well to try and minimise the pointer accesses as much as possible. the other big change is to walking over an ART. there's now a reentract and non-recursive iterator api which art_walk and rtable_walk are now built on top of. rtable_walk can basically do a foreach over the ART directly rather than having to pass a bunch of state into callbacks to apply with art_walk. we can still do that if we want, i just find this easier to deal with in rtable_walk directly. this part a part of a much bigger diff that was tested by hrvoje popovski, bluhm@, and matthieu@. mpi@ was keen ok jmatthew@