cvs commit: src/sys/net/ipfw ip_fw2.c

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Fri Aug 1 23:37:58 PDT 2008


sephe       2008/08/01 23:35:20 PDT

DragonFly src repository

  Modified files:
    sys/net/ipfw         ip_fw2.c 
  Log:
  - Make dynamic rule allocation non-blocking
  - Make dynamic rule hash array allocaion non-blocking
    Old behaviour of the hash array allocation is changed in following aspects:
    o  Old hash array is freed only if new hash array allocation succeed
    o  Old hash array is reused, if the allocation makes the hash array size
       less than the old one
  
  After this change, the static rules iteration is non-blocking, so we will not
  have trouble to duplicate static rules (using netmsg forwarding) on all CPUs.
  
  # send_reject() called in the rule iteration may block, but it is the last step
  # in the rule iteration, so we don't need to worry about it.
  
  Revision  Changes    Path
  1.62      +40 -13    src/sys/net/ipfw/ip_fw2.c


http://www.dragonflybsd.org/cvsweb/src/sys/net/ipfw/ip_fw2.c.diff?r1=1.61&r2=1.62&f=u





More information about the Commits mailing list