DragonFly commits List (threaded) for 2009-03
DragonFly-22.214.171.1248.g98432 master sys/netinet in_rmx.c ip_input.c ip_var.h
Author: Sepherosa Ziehau <firstname.lastname@example.org>
Date: Thu Mar 26 20:57:19 2009 +0800
ip_forward: Don't cache IP forwarding route.
There are two problems with this cached route:
- Any newly created route will nuke this cached route. If any new
route was created when the ip_output() was put to sleep due to
contention on the output path, then the rtentry of this cached
route would be ripped away behind our back.
The reported panic was caused by this problem. The call path:
ip_forward()->ip_output()->ipflow_create(); the cached route was
ripped before ipflow_create() was called.
- All network threads on the same CPU share this cached route:
o Network thread1 and network thread2 are on the same CPU
o Network thread1 uses this cached route to do the ip_output()
o Network thread1 is put to sleep due to contention on the
o Network thread2 uses this cached route to do the ip_output()
o Now network thread1 was scheduled ...
If we ever want to cached previously used route, we will have to
use per-thread route cache.
Summary of changes:
sys/netinet/in_rmx.c | 12 ---------
sys/netinet/ip_input.c | 59 ++++++++++++++++++------------------------------
sys/netinet/ip_var.h | 1 -
3 files changed, 22 insertions(+), 50 deletions(-)
DragonFly BSD source repository