git: ifnet: Make blocking operation in if_addrheads iteration MPSAFE

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Sun Mar 1 21:29:46 PST 2015


commit 9a74b5922bf37459c2ab956c7ddb8cc1a54c933f
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Wed Feb 18 21:01:15 2015 +0800

    ifnet: Make blocking operation in if_addrheads iteration MPSAFE
    
    Two methods are used:
    - Dispatch blocking operation in if_addrheads iteration to netisr0
      to run for functions which do not copy data into user space.
    - Use ifaddr marker to make sure that the ifaddr list is not broken
      if the ifaddr list is changed during the blocking operation.  And
      reference the ifaddr being used so it will not be destroyed during
      the blocking operation.

Summary of changes:
 sys/emulation/linux/linux_ioctl.c |  26 +++++-
 sys/net/if.c                      | 173 ++++++++++++++++++++++++++++++++++----
 sys/net/if_var.h                  |   9 ++
 sys/net/pf/pf_if.c                |  42 ++++++++-
 sys/net/rtsock.c                  |  41 ++++++++-
 sys/netgraph/eiface/ng_eiface.c   |  10 ++-
 sys/netgraph7/eiface/ng_eiface.c  |  10 ++-
 test/{mcast => ifconf}/Makefile   |   6 +-
 test/ifconf/ifconf.c              | 117 ++++++++++++++++++++++++++
 9 files changed, 403 insertions(+), 31 deletions(-)
 copy test/{mcast => ifconf}/Makefile (57%)
 create mode 100644 test/ifconf/ifconf.c

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9a74b5922bf37459c2ab956c7ddb8cc1a54c933f


-- 
DragonFly BSD source repository


More information about the Commits mailing list