CPU localize dummynet(4) step 2/2:
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 18 Nov 2007 13:00:28 +0000 (13:00 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 18 Nov 2007 13:00:28 +0000 (13:00 +0000)
commit879652a3f4203c18e0d258b4c48105d1b3799f54
tree42fc95b1a8c508cc24e794cbbd664b56d1822794
parent6c92c1f21811149277e1f74b367ac4e8358fab33
CPU localize dummynet(4) step 2/2:
- Add ip_dn_sockopt() in net/dummynet/ip_dummynet_glue.c, which
  o  Copy socket option from user space.
  o  Dispatch get/config/delete/flush operation to CPU ip_dn_cpu, so we don't
     even need to enter critical section when iterating pipes/flow_sets or
     checking whether dummynet has loaded.
  o  Copy out information from kernel space to user space.
- Adjust raw_ip.c to call ip_dn_sockopt() instead of checking DUMMYNET_LOADED
  and calling ip_dn_ctl_ptr.
- Remove now unnecessary critical section protection, however, replying dn_msg,
  setting and clearing ip_dn_io_ptr still need to be protected by critical
  section, since dn_msg and ip_dn_io_ptr are touched/checked by systimer
  callback.
sys/net/dummynet/ip_dummynet.c
sys/net/dummynet/ip_dummynet.h
sys/net/dummynet/ip_dummynet_glue.c
sys/netinet/raw_ip.c