TODO.smpnet revision 1.10
1$NetBSD: TODO.smpnet,v 1.10 2017/03/30 04:37:58 ozaki-r Exp $ 2 3MP-safe components 4================== 5 6 - Device drivers 7 - vioif(4) 8 - vmx(4) 9 - wm(4) 10 - ixg(4) 11 - ixv(4) 12 - Layer 2 13 - Ethernet (if_ethersubr.c) 14 - bridge(4) 15 - STP 16 - Fast forward (ipflow) 17 - Layer 3 18 - All except for items in the below section 19 - Interfaces 20 - gif(4) 21 - l2tp(4) 22 - pppoe(4) 23 - if_spppsubr.c 24 - tun(4) 25 - Packet filters 26 - npf(7) 27 - Others 28 - bpf(4) 29 - pfil(9) 30 31Non MP-safe components and kernel options 32========================================= 33 34 - Device drivers 35 - Most drivers other than ones listed in the above section 36 - Layer 2 37 - ARCNET (if_arcsubr.c) 38 - ATM (if_atmsubr.c) 39 - BRIDGE_IPF 40 - if_ecosubr.c 41 - FDDI (if_fddisubr.c) 42 - HIPPI (if_hippisubr.c) 43 - IEEE 1394 (if_ieee1394subr.c) 44 - IEEE 802.11 (ieee80211(4)) 45 - Token ring (if_tokensubr.c) 46 - Layer 3 47 - IPSELSRC 48 - MROUTING 49 - PIM 50 - MPLS (mpls(4)) 51 - Layer 4 52 - DCCP 53 - SCTP 54 - TCP 55 - UDP 56 - Interfaces 57 - agr(4) 58 - carp(4) 59 - etherip(4) 60 - faith(4) 61 - gre(4) 62 - ppp(4) 63 - sl(4) 64 - stf(4) 65 - strip(4) 66 - if_srt 67 - tap(4) 68 - vlan(4) 69 - Packet filters 70 - ipf(4) 71 - pf(4) 72 - Others 73 - AppleTalk (sys/netatalk/) 74 - ATM (sys/netnatm/) 75 - Bluetooth (sys/netbt/) 76 - altq(4) 77 - CIFS (sys/netsmb/) 78 - ipsec(4) 79 - ISDN (sys/netisbn/) 80 - kttcp(4) 81 - NFS 82 - opencrypto(9) 83 84Know issues 85=========== 86 87bpf 88--- 89 90MP-ification of bpf requires all of bpf_mtap* are called in normal LWP context 91or softint context, i.e., not in hardware interrupt context. For Tx, all 92bpf_mtap satisfy the requrement. For Rx, most of bpf_mtap are called in softint. 93Unfortunately some bpf_mtap on Rx are still called in hardware interrupt context. 94 95This is the list of the functions that have such bpf_mtap: 96 97 - sca_frame_process() @ sys/dev/ic/hd64570.c 98 - en_intr() @ sys/dev/ic/midway.c 99 - rxintr_cleanup() and txintr_cleanup() @ sys/dev/pci/if_lmc.c 100 - ipr_rx_data_rdy() @ sys/netisdn/i4b_ipr.c 101 102Ideally we should make the functions run in softint somehow, but we don't have 103actual devices, no time (or interest/love) to work on the task, so instead we 104provide a deferred bpf_mtap mechanism that forcibly runs bpf_mtap in softint 105context. It's a workaround and once the functions run in softint, we should use 106the original bpf_mtap again. 107 108Lingering obsolete variables 109----------------------------- 110 111Some obsolete global variables and member variables of structures remain to 112avoid breaking old userland programs which directly access such variables via 113kvm(3). 114 115The following programs still use kvm(3) to get some information related to 116the network stack. 117 118 - netstat(1) 119 - vmstat(1) 120 - fstat(1) 121 122netstat(1) accesses ifnet_list, the head of a list of interface objects 123(struct ifnet), and traverses each object through ifnet#if_list member variable. 124ifnet_list and ifnet#if_list is obsoleted by ifnet_pslist and 125ifnet#if_pslist_entry respectively. netstat also accesses the IP address list 126of an interface throught ifnet#if_addrlist. struct ifaddr, struct in_ifaddr 127and struct in6_ifaddr are accessed and the following obsolete member variables 128are stuck: ifaddr#ifa_list, in_ifaddr#ia_hash, in_ifaddr#ia_list, 129in6_ifaddr#ia_next and in6_ifaddr#_ia6_multiaddrs. Note that netstat already 130implements alternative methods to fetch the above information via sysctl(3). 131 132vmstat(1) shows statistics of hash tables created by hashinit(9) in the kernel. 133The statistic information is retrieved via kvm(3). The global variables 134in_ifaddrhash and in_ifaddrhashtbl, which are for a hash table of IPv4 135addresses and obsoleted by in_ifaddrhash_pslist and in_ifaddrhashtbl_pslist, 136are kept for this purpose. We should provide a means to fetch statistics of 137hash tables via sysctl(3). 138 139fstat(1) shows information of bpf instances. Each bpf instance (struct bpf) is 140obtained via kvm(3). bpf_d#_bd_next, bpf_d#_bd_filter and bpf_d#_bd_list 141member variables are obsolete but remain. ifnet#if_xname is also accessed 142via struct bpf_if and obsolete ifnet#if_list is required to remain to not change 143the offset of ifnet#if_xname. 144