git: kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.
Sascha Wildner
swildner at crater.dragonflybsd.org
Wed Feb 18 16:41:06 PST 2015
commit b5523eac31a95e6876e05e20e6fe836ec3a45202
Author: Sascha Wildner <saw at online.de>
Date: Thu Feb 19 01:16:23 2015 +0100
kernel: Move us to using M_NOWAIT and M_WAITOK for mbuf functions.
The main reason is that our having to use the MB_WAIT and MB_DONTWAIT
flags was a recurring issue when porting drivers from FreeBSD because
it tended to get forgotten and the code would compile anyway with the
wrong constants. And since MB_WAIT and MB_DONTWAIT ended up as ocflags
for an objcache_get() or objcache_reclaimlist call (which use M_WAITOK
and M_NOWAIT), it was just one big converting back and forth with some
sanitization in between.
This commit allows M_* again for the mbuf functions and keeps the
sanitizing as it was before: when M_WAITOK is among the passed flags,
objcache functions will be called with M_WAITOK and when it is absent,
they will be called with M_NOWAIT. All other flags are scrubbed by the
MB_OCFLAG() macro which does the same as the former MBTOM().
Approved-by: dillon
Summary of changes:
share/man/man9/mbuf.9 | 16 ++------
sys/bus/firewire/fwohci.c | 2 +-
sys/bus/u4b/net/if_axe.c | 2 +-
sys/bus/u4b/net/if_axge.c | 2 +-
sys/bus/u4b/net/if_urndis.c | 4 +-
sys/bus/u4b/net/usb_ethernet.c | 2 +-
sys/bus/u4b/wlan/if_rum.c | 2 +-
sys/bus/u4b/wlan/if_run.c | 4 +-
sys/bus/u4b/wlan/if_urtwn.c | 2 +-
sys/dev/crypto/hifn/hifn7751.c | 12 +++---
sys/dev/crypto/safe/safe.c | 12 +++---
sys/dev/crypto/ubsec/ubsec.c | 12 +++---
sys/dev/disk/iscsi/initiator/isc_soc.c | 6 +--
sys/dev/misc/musycc/musycc.c | 10 ++---
sys/dev/netif/acx/if_acx.c | 4 +-
sys/dev/netif/age/if_age.c | 4 +-
sys/dev/netif/alc/if_alc.c | 4 +-
sys/dev/netif/ale/if_ale.c | 2 +-
sys/dev/netif/an/if_an.c | 4 +-
sys/dev/netif/ar/if_ar.c | 2 +-
sys/dev/netif/ath/ath/if_ath_rx.c | 2 +-
sys/dev/netif/ath/ath/if_ath_rx_edma.c | 4 +-
sys/dev/netif/bce/if_bce.c | 2 +-
sys/dev/netif/bfe/if_bfe.c | 2 +-
sys/dev/netif/bge/if_bge.c | 8 ++--
sys/dev/netif/bnx/if_bnx.c | 8 ++--
sys/dev/netif/bwi/if_bwi.c | 6 +--
sys/dev/netif/bwn/bwn/if_bwn.c | 8 ++--
sys/dev/netif/cs/if_cs.c | 4 +-
sys/dev/netif/dc/if_dc.c | 4 +-
sys/dev/netif/de/if_de.c | 10 ++---
sys/dev/netif/ed/if_ed.c | 2 +-
sys/dev/netif/em/if_em.c | 2 +-
sys/dev/netif/emx/if_emx.c | 2 +-
sys/dev/netif/ep/if_ep.c | 4 +-
sys/dev/netif/et/if_et.c | 4 +-
sys/dev/netif/ex/if_ex.c | 6 +--
sys/dev/netif/fe/if_fe.c | 4 +-
sys/dev/netif/fwe/if_fwe.c | 6 +--
sys/dev/netif/fxp/if_fxp.c | 4 +-
sys/dev/netif/igb/if_igb.c | 2 +-
sys/dev/netif/iwi/if_iwi.c | 6 +--
sys/dev/netif/iwl/iwl2100.c | 8 ++--
sys/dev/netif/iwn/if_iwn.c | 10 ++---
sys/dev/netif/ix/if_ix.c | 4 +-
sys/dev/netif/jme/if_jme.c | 2 +-
sys/dev/netif/lge/if_lge.c | 4 +-
sys/dev/netif/lnc/lance.c | 3 +-
sys/dev/netif/mn/if_mn.c | 14 +++----
sys/dev/netif/msk/if_msk.c | 6 +--
sys/dev/netif/mxge/if_mxge.c | 8 ++--
sys/dev/netif/my/if_my.c | 8 ++--
sys/dev/netif/ndis/if_ndis.c | 6 +--
sys/dev/netif/nfe/if_nfe.c | 4 +-
sys/dev/netif/nge/if_nge.c | 4 +-
sys/dev/netif/oce/oce_if.c | 6 +--
sys/dev/netif/pcn/if_pcn.c | 6 +--
sys/dev/netif/ral/rt2560.c | 6 +--
sys/dev/netif/ral/rt2661.c | 6 +--
sys/dev/netif/ral/rt2860.c | 8 ++--
sys/dev/netif/re/if_re.c | 6 +--
sys/dev/netif/rl/if_rl.c | 2 +-
sys/dev/netif/rtw/rtw.c | 4 +-
sys/dev/netif/sbni/if_sbni.c | 4 +-
sys/dev/netif/sbsh/if_sbsh.c | 8 ++--
sys/dev/netif/sf/if_sf.c | 6 +--
sys/dev/netif/sis/if_sis.c | 2 +-
sys/dev/netif/sk/if_sk.c | 4 +-
sys/dev/netif/sln/if_sln.c | 4 +-
sys/dev/netif/sn/if_sn.c | 4 +-
sys/dev/netif/sr/if_sr.c | 4 +-
sys/dev/netif/ste/if_ste.c | 8 ++--
sys/dev/netif/stge/if_stge.c | 4 +-
sys/dev/netif/ti/if_ti.c | 6 +--
sys/dev/netif/tl/if_tl.c | 4 +-
sys/dev/netif/tx/if_tx.c | 8 ++--
sys/dev/netif/txp/if_txp.c | 14 +++----
sys/dev/netif/vge/if_vge.c | 4 +-
sys/dev/netif/vr/if_vr.c | 2 +-
sys/dev/netif/vx/if_vx.c | 10 ++---
sys/dev/netif/wb/if_wb.c | 6 +--
sys/dev/netif/wi/if_wi.c | 4 +-
sys/dev/netif/wpi/if_wpi.c | 6 +--
sys/dev/netif/xe/if_xe.c | 4 +-
sys/dev/netif/xl/if_xl.c | 2 +-
sys/dev/virtual/virtio/net/if_vtnet.c | 12 +++---
sys/dev/virtual/vkernel/net/if_vke.c | 4 +-
sys/emulation/43bsd/43bsd_socket.c | 4 +-
sys/emulation/linux/linux_socket.c | 2 +-
sys/emulation/ndis/kern_ndis.c | 4 +-
sys/kern/libmchain/subr_mchain.c | 10 ++---
sys/kern/subr_busdma.c | 2 +-
sys/kern/uipc_mbuf.c | 36 +++++++++---------
sys/kern/uipc_mbuf2.c | 7 ++--
sys/kern/uipc_sockbuf.c | 5 +--
sys/kern/uipc_socket.c | 20 +++++-----
sys/kern/uipc_socket2.c | 3 +-
sys/kern/uipc_syscalls.c | 4 +-
sys/kern/uipc_usrreq.c | 2 +-
sys/net/bpf.c | 2 +-
sys/net/bridge/bridgestp.c | 4 +-
sys/net/bridge/if_bridge.c | 20 +++++-----
sys/net/bsd_comp.c | 16 ++++----
sys/net/gre/if_gre.c | 4 +-
sys/net/if_ethersubr.c | 8 ++--
sys/net/if_loop.c | 2 +-
sys/net/ip6fw/ip6_fw.c | 8 ++--
sys/net/ip_mroute/ip_mroute.c | 16 ++++----
sys/net/ipfw/ip_fw2.c | 8 ++--
sys/net/lagg/ieee8023ad_lacp.c | 4 +-
sys/net/netmap/netmap_generic.c | 2 +-
sys/net/pf/pf.c | 6 +--
sys/net/pf/pf_norm.c | 2 +-
sys/net/ppp/if_ppp.c | 8 ++--
sys/net/ppp_layer/ppp_deflate.c | 16 ++++----
sys/net/ppp_layer/ppp_tty.c | 11 +++---
sys/net/raw_cb.c | 3 +-
sys/net/raw_usrreq.c | 3 +-
sys/net/route.c | 2 +-
sys/net/rtsock.c | 6 +--
sys/net/sl/if_sl.c | 5 +--
sys/net/sppp/if_spppsubr.c | 10 ++---
sys/net/stf/if_stf.c | 3 +-
sys/net/tap/if_tap.c | 4 +-
sys/net/tun/if_tun.c | 8 ++--
sys/net/vlan/if_vlan_ether.c | 4 +-
sys/netbt/hci_link.c | 5 +--
sys/netbt/hci_socket.c | 4 +-
sys/netbt/hci_unit.c | 3 +-
sys/netbt/l2cap_signal.c | 3 +-
sys/netbt/l2cap_socket.c | 6 +--
sys/netbt/l2cap_upper.c | 2 +-
sys/netbt/rfcomm_dlc.c | 3 +-
sys/netbt/rfcomm_session.c | 7 ++--
sys/netbt/rfcomm_socket.c | 4 +-
sys/netbt/sco_socket.c | 6 +--
sys/netbt/sco_upper.c | 2 +-
sys/netgraph/UI/ng_UI.c | 2 +-
sys/netgraph/bridge/ng_bridge.c | 2 +-
sys/netgraph/cisco/ng_cisco.c | 4 +-
sys/netgraph/frame_relay/ng_frame_relay.c | 2 +-
sys/netgraph/l2tp/ng_l2tp.c | 14 +++----
sys/netgraph/lmi/ng_lmi.c | 2 +-
sys/netgraph/ppp/ng_ppp.c | 4 +-
sys/netgraph/pppoe/ng_pppoe.c | 16 ++++----
sys/netgraph/pptpgre/ng_pptpgre.c | 4 +-
sys/netgraph/rfc1490/ng_rfc1490.c | 4 +-
sys/netgraph/tee/ng_tee.c | 2 +-
sys/netgraph/tty/ng_tty.c | 2 +-
sys/netgraph/vjc/ng_vjc.c | 4 +-
sys/netgraph7/UI/ng_UI.c | 2 +-
.../bluetooth/drivers/bt3c/ng_bt3c_pccard.c | 4 +-
sys/netgraph7/bluetooth/drivers/h4/ng_h4.c | 2 +-
sys/netgraph7/bluetooth/drivers/ubt/ng_ubt.c | 12 +++---
sys/netgraph7/bluetooth/hci/ng_hci_cmds.c | 2 +-
sys/netgraph7/bluetooth/hci/ng_hci_evnt.c | 2 +-
sys/netgraph7/bluetooth/hci/ng_hci_misc.c | 2 +-
sys/netgraph7/bluetooth/hci/ng_hci_ulpi.c | 10 ++---
sys/netgraph7/bluetooth/l2cap/ng_l2cap_cmds.h | 22 +++++------
sys/netgraph7/bluetooth/l2cap/ng_l2cap_evnt.c | 2 +-
sys/netgraph7/bluetooth/l2cap/ng_l2cap_llpi.c | 2 +-
sys/netgraph7/bluetooth/l2cap/ng_l2cap_misc.c | 2 +-
.../bluetooth/socket/ng_btsocket_hci_raw.c | 6 +--
sys/netgraph7/bluetooth/socket/ng_btsocket_l2cap.c | 6 +--
.../bluetooth/socket/ng_btsocket_rfcomm.c | 14 +++----
sys/netgraph7/bridge/ng_bridge.c | 2 +-
sys/netgraph7/cisco/ng_cisco.c | 4 +-
sys/netgraph7/frame_relay/ng_frame_relay.c | 3 +-
sys/netgraph7/hub/ng_hub.c | 3 +-
sys/netgraph7/iface/ng_iface.c | 2 +-
sys/netgraph7/ksocket/ng_ksocket.c | 4 +-
sys/netgraph7/l2tp/ng_l2tp.c | 15 ++++----
sys/netgraph7/lmi/ng_lmi.c | 4 +-
sys/netgraph7/mppc/ng_mppc.c | 7 ++--
sys/netgraph7/netflow/netflow.c | 2 +-
sys/netgraph7/ng_device.c | 2 +-
sys/netgraph7/ng_gif.c | 3 +-
sys/netgraph7/ng_gif_demux.c | 2 +-
sys/netgraph7/ng_ipfw.c | 4 +-
sys/netgraph7/ng_source.c | 4 +-
sys/netgraph7/ng_tag.c | 3 +-
sys/netgraph7/ng_vlan.c | 2 +-
sys/netgraph7/one2many/ng_one2many.c | 3 +-
sys/netgraph7/ppp/ng_ppp.c | 6 +--
sys/netgraph7/pppoe/ng_pppoe.c | 20 +++++-----
sys/netgraph7/pptpgre/ng_pptpgre.c | 5 +--
sys/netgraph7/rfc1490/ng_rfc1490.c | 10 ++---
sys/netgraph7/tee/ng_tee.c | 3 +-
sys/netgraph7/tty/ng_tty.c | 2 +-
sys/netgraph7/vjc/ng_vjc.c | 4 +-
sys/netinet/if_ether.c | 2 +-
sys/netinet/igmp.c | 4 +-
sys/netinet/in_gif.c | 3 +-
sys/netinet/ip_carp.c | 8 ++--
sys/netinet/ip_divert.c | 6 +--
sys/netinet/ip_encap.c | 2 +-
sys/netinet/ip_icmp.c | 4 +-
sys/netinet/ip_input.c | 10 ++---
sys/netinet/ip_output.c | 10 ++---
sys/netinet/raw_ip.c | 4 +-
sys/netinet/tcp_output.c | 6 +--
sys/netinet/tcp_subr.c | 4 +-
sys/netinet/tcp_syncache.c | 2 +-
sys/netinet/udp_usrreq.c | 6 +--
sys/netinet6/ah_core.c | 8 ++--
sys/netinet6/ah_input.c | 4 +-
sys/netinet6/ah_output.c | 5 +--
sys/netinet6/esp_core.c | 4 +-
sys/netinet6/esp_input.c | 4 +-
sys/netinet6/esp_output.c | 6 +--
sys/netinet6/frag6.c | 3 +-
sys/netinet6/icmp6.c | 26 ++++++-------
sys/netinet6/in6_gif.c | 2 +-
sys/netinet6/ip6_input.c | 6 +--
sys/netinet6/ip6_mroute.c | 3 +-
sys/netinet6/ip6_output.c | 20 +++++-----
sys/netinet6/ipcomp_core.c | 3 +-
sys/netinet6/ipcomp_output.c | 6 +--
sys/netinet6/ipsec.c | 20 +++++-----
sys/netinet6/mld6.c | 5 +--
sys/netinet6/nd6_nbr.c | 4 +-
sys/netinet6/raw_ip6.c | 2 +-
sys/netinet6/udp6_output.c | 2 +-
sys/netproto/802_11/README.DRAGONFLY | 6 +--
sys/netproto/802_11/wlan/ieee80211_dragonfly.c | 8 ++--
sys/netproto/802_11/wlan/ieee80211_hostap.c | 4 +-
sys/netproto/802_11/wlan/ieee80211_ht.c | 2 +-
sys/netproto/802_11/wlan/ieee80211_hwmp.c | 2 +-
sys/netproto/802_11/wlan/ieee80211_input.c | 2 +-
sys/netproto/802_11/wlan/ieee80211_mesh.c | 6 +--
sys/netproto/802_11/wlan/ieee80211_output.c | 26 ++++++-------
sys/netproto/802_11/wlan/ieee80211_superg.c | 6 +--
sys/netproto/802_11/wlan/ieee80211_wds.c | 2 +-
.../802_11/wlan_ccmp/ieee80211_crypto_ccmp.c | 2 +-
.../802_11/wlan_tkip/ieee80211_crypto_tkip.c | 2 +-
.../802_11/wlan_wep/ieee80211_crypto_wep.c | 2 +-
sys/netproto/ipsec/ipsec_input.c | 5 +--
sys/netproto/ipsec/ipsec_mbuf.c | 14 +++----
sys/netproto/ipsec/ipsec_output.c | 7 ++--
sys/netproto/ipsec/key.c | 32 ++++++++--------
sys/netproto/ipsec/keysock.c | 4 +-
sys/netproto/ipsec/xform_ipip.c | 4 +-
sys/netproto/key/key.c | 44 +++++++++++-----------
sys/netproto/key/keysock.c | 8 ++--
sys/netproto/mpls/mpls_output.c | 4 +-
sys/netproto/smb/smb_iod.c | 2 +-
sys/netproto/smb/smb_rq.c | 2 +-
sys/netproto/smb/smb_trantcp.c | 2 +-
sys/sys/mbuf.h | 16 ++------
sys/vfs/nfs/krpc_subr.c | 8 ++--
sys/vfs/nfs/nfs_mountrpc.c | 2 +-
sys/vfs/nfs/nfs_serv.c | 4 +-
sys/vfs/nfs/nfs_socket.c | 26 ++++++-------
sys/vfs/nfs/nfs_srvcache.c | 4 +-
sys/vfs/nfs/nfs_syscalls.c | 6 +--
sys/vfs/nfs/nfsm_subs.c | 28 +++++++-------
tools/tools/netrate/pktgen/pktgen.c | 8 ++--
257 files changed, 757 insertions(+), 814 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b5523eac31a95e6876e05e20e6fe836ec3a45202
--
DragonFly BSD source repository
More information about the Commits
mailing list