CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2015/11/24 20:10:00

Modified files:
        share/man/man9 : Makefile ifq_enqueue.9 
        sys/arch/armv7/imx: imxenet.c 
        sys/arch/armv7/omap: if_cpsw.c 
        sys/arch/armv7/sunxi: sxie.c 
        sys/arch/macppc/dev: if_bm.c if_mc.c 
        sys/arch/octeon/dev: if_cnmac.c 
        sys/arch/sgi/dev: if_iec.c if_mec.c 
        sys/arch/sgi/hpc: if_sq.c 
        sys/arch/socppc/dev: if_tsec.c 
        sys/arch/sparc/dev: be.c hme.c if_ie.c qe.c 
        sys/arch/sparc64/dev: vnet.c 
        sys/arch/vax/if: if_de.c if_qe.c sgec.c 
        sys/dev/ic     : acx.c aic6915.c am7990.c am79900.c an.c 
                         ar5008.c ar9003.c ath.c athn.c atw.c bwi.c dc.c 
                         dp8390.c elink3.c fxp.c gem.c hme.c i82596.c 
                         if_wi.c lance.c lemac.c malo.c mtd8xx.c pgt.c 
                         re.c rt2560.c rt2661.c rt2860.c rtl81x9.c rtw.c 
                         smc83c170.c smc91cxx.c ti.c xl.c 
        sys/dev/isa    : if_ef_isapnp.c if_eg.c if_el.c if_ex.c if_ie.c 
        sys/dev/pci    : if_age.c if_alc.c if_ale.c if_bce.c if_bge.c 
                         if_bnx.c if_cas.c if_de.c if_em.c if_et.c 
                         if_ipw.c if_iwi.c if_iwm.c if_iwn.c if_ix.c 
                         if_ixgb.c if_jme.c if_lge.c if_lii.c if_msk.c 
                         if_myx.c if_nep.c if_nfe.c if_nge.c if_nxe.c 
                         if_oce.c if_pcn.c if_rtwn.c if_se.c if_sis.c 
                         if_sk.c if_ste.c if_stge.c if_tht.c if_tl.c 
                         if_txp.c if_vge.c if_vic.c if_vio.c if_vmx.c 
                         if_vr.c if_vte.c if_wb.c if_wpi.c if_xge.c 
        sys/dev/pcmcia : if_malo.c if_xe.c 
        sys/dev/sbus   : be.c qe.c 
        sys/dev/usb    : if_athn_usb.c if_atu.c if_aue.c if_axe.c 
                         if_axen.c if_cdce.c if_cdcef.c if_cue.c 
                         if_kue.c if_mos.c if_otus.c if_ral.c if_rsu.c 
                         if_rum.c if_run.c if_smsc.c if_uath.c if_udav.c 
                         if_ugl.c if_upgt.c if_upl.c if_url.c 
                         if_urndis.c if_urtw.c if_urtwn.c if_zyd.c 
        sys/net        : if.c if_var.h 
        sys/net80211   : ieee80211_pae_output.c 

Log message:
replace IFF_OACTIVE manipulation with mpsafe operations.

there are two things shared between the network stack and drivers
in the send path: the send queue and the IFF_OACTIVE flag. the send
queue is now protected by a mutex. this diff makes the oactive
functionality mpsafe too.

IFF_OACTIVE is part of if_flags. there are two problems with that.
firstly, if_flags is a short and we dont have any MI atomic operations
to manipulate a short. secondly, while we could make the IFF_OACTIVE
operates mpsafe, all changes to other flags would have to be made
safe at the same time, otherwise a read-modify-write cycle on their
updates could clobber the oactive change.

instead, this moves the oactive mark into struct ifqueue and provides
an API for changing it. there's ifq_set_oactive, ifq_clr_oactive,
and ifq_is_oactive. these are modelled on ifsq_set_oactive,
ifsq_clr_oactive, and ifsq_is_oactive in dragonflybsd.

this diff includes changes to all the drivers manipulating IFF_OACTIVE
to now use the ifsq_{set,clr_is}_oactive API too.

ok kettenis@ mpi@ jmatthew@ deraadt@

Reply via email to