Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 2009 10:06:02 +0000 (UTC)
From:      Marko Zec <zec@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/netinet ip_divert.c ip_divert.h
Message-ID:  <200908241006.n7OA6ONj040541@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
zec         2009-08-24 10:06:02 UTC

  FreeBSD src repository

  Modified files:
    sys/netinet          ip_divert.c ip_divert.h 
  Log:
  SVN rev 196502 on 2009-08-24 10:06:02Z by zec
  
  Introduce a div_destroy() function which takes over per-vnet cleanup tasks
  from the existing modevent / MOD_UNLOAD handler, and register div_destroy()
  in protosw as per-vnet .pr_destroy() handler for options VIMAGE builds.  In
  nooptions VIMAGE builds, div_destroy() will be invoked from the modevent
  handler, resulting in effectively identical operation as it was prior this
  change.  div_destroy() also tears down hashtables used by ipdivert, which
  were previously left behind on ipdivert kldunloads.
  
  For options VIMAGE builds only, temporarily disable kldunloading of ipdivert,
  because without introducing additional locking logic it is impossible to
  atomically check whether all ipdivert instances in all vnets are idle, and
  proceed with cleanup without opening a race window for a vnet to open an
  ipdivert socket while ipdivert tear-down is in progress.
  
  While here, staticize div_init(), because it is not used outside of
  ip_divert.c.
  
  In cooperation with:    julian
  Approved by:    re (rwatson), julian (mentor)
  MFC after:      3 days
  
  Revision  Changes    Path
  1.157     +30 -5     src/sys/netinet/ip_divert.c
  1.5       +0 -1      src/sys/netinet/ip_divert.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908241006.n7OA6ONj040541>