NetBSD/src MxGB0TCsys/net route.c route.h, sys/netinet ip_input.c

   Avoid having a rtcache directly in a percpu storage

   percpu(9) has a certain memory storage for each CPU and provides it by the piece
   to users.  If the storages went short, percpu(9) enlarges them by allocating new
   larger memory areas, replacing old ones with them and destroying the old ones.
   A percpu storage referenced by a pointer gotten via percpu_getref can be
   destroyed by the mechanism after a running thread sleeps even if percpu_putref
   has not been called.

   Using rtcache, i.e., packet processing, typically involves sleepable operations
   such as rwlock so we must avoid dereferencing a rtcache that is directly stored
   in a percpu storage during packet processing.  Address this situation by having
   just a pointer to a rtcache in a percpu storage instead.

   Reviewed by knakahara@ and yamaguchi@
VersionDeltaFile
1.220+25-2sys/net/route.c
1.125+20-1sys/net/route.h
1.391+10-10sys/netinet/ip_input.c
1.210+8-8sys/netinet6/ip6_input.c
1.83+5-5sys/netipsec/ipsec_output.c
1.97+4-4sys/netinet6/ip6_forward.c
+72-306 files

UnifiedSplitRaw