CVSROOT: /cvs Module name: src Changes by: bl...@cvs.openbsd.org 2025/03/02 14:28:32
Modified files: sys/net : if.c if.h if_aggr.c if_bpe.c if_bpe.h if_bridge.c if_etherip.c if_etherip.h if_ethersubr.c if_gif.c if_gif.h if_gre.c if_gre.h if_loop.c if_mpe.c if_mpip.c if_mpw.c if_pfsync.c if_pfsync.h if_ppp.c if_pppoe.c if_pppoe.h if_pppx.c if_rport.c if_sec.c if_spppsubr.c if_tpmr.c if_trunk.c if_trunk.h if_tun.c if_var.h if_veb.c if_vlan.c if_vlan_var.h if_vxlan.c if_wg.c ifq.c pipex.c pipex.h pipex_local.h sys/netinet : icmp6.h if_ether.c if_ether.h igmp.c igmp_var.h in.h in_pcb.h ip_ah.c ip_carp.c ip_carp.h ip_divert.c ip_esp.c ip_icmp.c ip_icmp.h ip_input.c ip_ipcomp.c ip_ipip.c ip_ipip.h ip_ipsp.h ip_output.c ip_var.h ipsec_input.c raw_ip.c tcp_input.c tcp_subr.c tcp_var.h udp_usrreq.c udp_var.h sys/netinet6 : dest6.c frag6.c icmp6.c in6.h ip6_divert.c ip6_input.c ip6_output.c ip6_var.h mld6.c raw_ip6.c route6.c sys/netmpls : mpls.h mpls_input.c sys/sys : protosw.h Log message: Cache route per softnet thread with netstack. Introduce struct netstack to pass memory down the network stack. Currently this is only implemented as part of struct softnet serving as thread local storage. Especially the interface input and IP protocol input functions if_input() and pr_input() have been extended by a netstack parameter. if_input_process() selects the netstack pointer of the currently running softnet thread and passes it to the input functions. The first user of this storage is the route cache in ipv4_input() and ipv6_input(). For consecutive packets it can reuse the route to the same destination. Cache invalidation via route generation number has already been implemented before. OK claudio@ dlg@