DragonFly-2.3.0.498.g98432 master sys/netinet in_rmx.c ip_input.c ip_var.h

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Thu Mar 26 06:16:41 PDT 2009


commit 984322d132f10d865d17b7417ba433f018db4d55
Author: Sepherosa Ziehau <sephe at dragonflybsd.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
         output path
      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(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/984322d132f10d865d17b7417ba433f018db4d55


-- 
DragonFly BSD source repository





More information about the Commits mailing list