git: ifnet: Make ifnet and ifindex2ifnet MPSAFE

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Sun Feb 8 03:48:23 PST 2015


commit b4051e25526dea89b12de0bacd6b8e84e3c7dd96
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Thu Jan 22 21:28:43 2015 +0800

    ifnet: Make ifnet and ifindex2ifnet MPSAFE
    
    - Accessing to these two global variables from non-netisr threads uses
      ifnet lock.  This kind of accessing is from
    - Accessing to ifindex2ifnet from netisrs are lockless MPSAFE.
    - Netisrs no longer access ifnet, instead they access ifnet array as of
      this commit, which is lockless MPSAFE.
    
    Rules for accessing ifnet and ifindex2ifnet is commented near the
    declaration of the related global variables/functions in net/if_var.h.

Summary of changes:
 .../linux/i386/linprocfs/linprocfs_misc.c          |   6 +-
 sys/emulation/linux/linux_ioctl.c                  |  58 +++-
 sys/kern/lwkt_token.c                              |   1 -
 sys/net/altq/altq_cbq.c                            |  21 +-
 sys/net/altq/altq_fairq.c                          |  21 +-
 sys/net/altq/altq_hfsc.c                           |  21 +-
 sys/net/altq/altq_priq.c                           |  21 +-
 sys/net/altq/altq_subr.c                           |  26 +-
 sys/net/bpf.c                                      |  14 +-
 sys/net/bridge/if_bridge.c                         |   6 +-
 sys/net/if.c                                       | 377 ++++++++++++++++-----
 sys/net/if_clone.c                                 |  22 +-
 sys/net/if_mib.c                                   |  30 +-
 sys/net/if_var.h                                   |  51 ++-
 sys/net/lagg/if_lagg.c                             |  54 ++-
 sys/net/netmap/netmap.c                            |  10 +-
 sys/net/netmap/netmap_vale.c                       |  13 +-
 sys/net/pf/if_pfsync.c                             |  11 +-
 sys/net/pf/pf_if.c                                 |  10 +-
 sys/net/pf/pf_ioctl.c                              |  20 +-
 sys/net/rtsock.c                                   |  21 +-
 sys/net/vlan/if_vlan.c                             |   2 +-
 sys/netgraph/ether/ng_ether.c                      |   4 +-
 sys/netgraph/fec/ng_fec.c                          |  17 +-
 sys/netgraph7/ng_source.c                          |   4 +
 sys/netinet/ip_icmp.c                              |   3 +-
 sys/netinet/ip_output.c                            |   2 +-
 sys/netinet/raw_ip.c                               |   4 +-
 sys/netinet6/icmp6.c                               |  34 +-
 sys/netinet6/in6.c                                 |  17 +-
 sys/netinet6/in6_ifattach.c                        |  40 ++-
 sys/netinet6/nd6.c                                 |   9 +-
 sys/netinet6/raw_ip6.c                             |   4 +-
 sys/netproto/802_11/wlan/ieee80211_dragonfly.c     |  14 +-
 sys/platform/pc64/x86_64/autoconf.c                |  15 +-
 sys/sys/thread.h                                   |   1 -
 sys/vfs/nfs/bootp_subr.c                           |   5 +-
 37 files changed, 775 insertions(+), 214 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b4051e25526dea89b12de0bacd6b8e84e3c7dd96


-- 
DragonFly BSD source repository



More information about the Commits mailing list