Home | History | Annotate | Download | only in qbus
History log of /src/sys/dev/qbus/if_de.c
RevisionDateAuthorComments
 1.36  01-Aug-2021  andvar fix typos in word "otherwise".
 1.35  29-Jan-2020  thorpej branches: 1.35.10;
Adopt <net/if_stats.h>.
 1.34  26-Jun-2018  msaitoh branches: 1.34.2; 1.34.10;
Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.
 1.33  22-Jun-2018  msaitoh It's not required to include net/bpfdesc.h. Remove it.
 1.32  22-May-2017  ragge branches: 1.32.2; 1.32.8;
Update copyright notice for Ludd (remove clause 3 & 4).
 1.31  15-Dec-2016  ozaki-r Move bpf_mtap and if_ipackets++ on Rx of each driver to percpuq if_input

The benefits of the change are:
- We can reduce codes
- We can provide the same behavior between drivers
- Where/When if_ipackets is counted up
- Note that some drivers still update packet statistics in their own
way (periodical update)
- Moved bpf_mtap run in softint
- This makes it easy to MP-ify bpf

Proposed on tech-kern and tech-net
 1.30  09-Feb-2016  ozaki-r branches: 1.30.2;
Introduce softint-based if_input

This change intends to run the whole network stack in softint context
(or normal LWP), not hardware interrupt context. Note that the work is
still incomplete by this change; to that end, we also have to softint-ify
if_link_state_change (and bpf) which can still run in hardware interrupt.

This change softint-ifies at ifp->if_input that is called from
each device driver (and ieee80211_input) to ensure Layer 2 runs
in softint (e.g., ether_input and bridge_input). To this end,
we provide a framework (called percpuq) that utlizes softint(9)
and percpu ifqueues. With this patch, rxintr of most drivers just
queues received packets and schedules a softint, and the softint
dequeues packets and does rest packet processing.

To minimize changes to each driver, percpuq is allocated in struct
ifnet for now and that is initialized by default (in if_attach).
We probably have to move percpuq to softc of each driver, but it's
future work. At this point, only wm(4) has percpuq in its softc
as a reference implementation.

Additional information including performance numbers can be found
in the thread at tech-kern@ and tech-net@:
http://mail-index.netbsd.org/tech-kern/2016/01/14/msg019997.html

Acknowledgment: riastradh@ greatly helped this work.
Thank you very much!
 1.29  05-Apr-2010  joerg branches: 1.29.18; 1.29.36;
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
 1.28  19-Jan-2010  pooka branches: 1.28.2; 1.28.4;
Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client. This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached. However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff. ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
 1.27  12-May-2009  cegger KNF
 1.26  18-Apr-2009  tsutsui Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch
 1.25  18-Mar-2009  cegger bcopy -> memcpy
 1.24  16-Dec-2008  christos branches: 1.24.2;
replace bitmask_snprintf(9) with snprintb(3)
 1.23  11-Mar-2008  matt branches: 1.23.4; 1.23.12;
Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.
 1.22  19-Oct-2007  ad branches: 1.22.12; 1.22.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.21  04-Mar-2007  christos branches: 1.21.2; 1.21.14; 1.21.16; 1.21.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.20  29-Mar-2006  thorpej branches: 1.20.14;
Use device_private().
 1.19  25-Mar-2006  thorpej Use device_parent().
 1.18  11-Dec-2005  christos branches: 1.18.4; 1.18.6; 1.18.8; 1.18.10; 1.18.12;
merge ktrace-lwp.
 1.17  27-Jun-2005  ragge branches: 1.17.2;
Fixes due to cast-qual addition.
 1.16  26-Feb-2005  simonb White space nits.
 1.15  07-Aug-2003  agc branches: 1.15.8; 1.15.10;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.14  02-Oct-2002  thorpej branches: 1.14.6;
Add trailing ; to CFATTACH_DECL.
 1.13  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.12  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.11  13-Nov-2001  lukem add RCSIDs
 1.10  06-May-2001  ragge branches: 1.10.2;
Use if_uba + ether_ioctl routines. Removed ~150 lines of duplicated code.
 1.9  26-Apr-2001  ragge Use ubmemalloc() to get mapped uba memory.
Only copy mbufs if there are more than two in a mbuf chain (on transmit).
This squeezed another 5% out of the DEUNA. (now closing up to 100 K/s :-)
 1.8  14-Dec-2000  thorpej branches: 1.8.2;
ALTQ'ify.
 1.7  15-Nov-2000  thorpej branches: 1.7.2;
Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach().
 1.6  01-Oct-2000  thorpej Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
 1.5  08-Jun-2000  ragge Fix a transmit bug and get a little more out from the receive logic.
 1.4  05-Jun-2000  matt Adjust to new evcnt stuff.
 1.3  04-Jun-2000  matt More event counter stuff. Plus a little cruft cleanup while doing it.
 1.2  28-May-2000  ragge Some updates to the DEUNA driver:
- Change the transmit logic to send from a pre-allocated buffer instead
of doing DMA out of the mbufs directly. Timing shows that it takes
4 times longer to map in the mbufs via the sgmap routines instead of
just copying the data! This must be fixed sometine in the future.
- A bunch of other minor fixes.
 1.1  30-Apr-2000  ragge branches: 1.1.2;
Rewritten (most of) the DEUNA/DELUA driver. No more data copy, packet
header fiddling and forget driver support for trailers.
 1.1.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.7.2.4  05-Jan-2001  bouyer Sync with HEAD
 1.7.2.3  22-Nov-2000  bouyer Sync with HEAD.
 1.7.2.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.2.1  15-Nov-2000  bouyer file if_de.c was added on branch thorpej_scsipi on 2000-11-20 11:42:49 +0000
 1.8.2.3  18-Oct-2002  nathanw Catch up to -current.
 1.8.2.2  14-Nov-2001  nathanw Catch up to -current.
 1.8.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.10.2.2  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.10.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.6.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.14.6.4  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.14.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.14.6.1  03-Aug-2004  skrll Sync with HEAD
 1.15.10.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.15.8.1  29-Apr-2005  kent sync with -current
 1.17.2.4  17-Mar-2008  yamt sync with head.
 1.17.2.3  27-Oct-2007  yamt sync with head.
 1.17.2.2  03-Sep-2007  yamt sync with head.
 1.17.2.1  21-Jun-2006  yamt sync with head.
 1.18.12.2  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.18.12.1  28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.18.10.1  19-Apr-2006  elad sync with head.
 1.18.8.1  01-Apr-2006  yamt sync with head.
 1.18.6.1  22-Apr-2006  simonb Sync with head.
 1.18.4.1  09-Sep-2006  rpaulo sync with head
 1.20.14.1  12-Mar-2007  rmind Sync with HEAD.
 1.21.20.1  25-Oct-2007  bouyer Sync with HEAD.
 1.21.16.2  23-Mar-2008  matt sync with HEAD
 1.21.16.1  06-Nov-2007  matt sync with HEAD
 1.21.14.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.21.2.1  23-Oct-2007  ad Sync with head.
 1.22.16.2  17-Jan-2009  mjf Sync with HEAD.
 1.22.16.1  03-Apr-2008  mjf Sync with HEAD.
 1.22.12.1  24-Mar-2008  keiichi sync with head.
 1.23.12.2  28-Apr-2009  skrll Sync with HEAD.
 1.23.12.1  19-Jan-2009  skrll Sync with HEAD.
 1.23.4.4  11-Aug-2010  yamt sync with head.
 1.23.4.3  11-Mar-2010  yamt sync with head
 1.23.4.2  16-May-2009  yamt sync with head
 1.23.4.1  04-May-2009  yamt sync with head.
 1.24.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.28.4.1  30-May-2010  rmind sync with head
 1.28.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.29.36.3  28-Aug-2017  skrll Sync with HEAD
 1.29.36.2  05-Feb-2017  skrll Sync with HEAD
 1.29.36.1  19-Mar-2016  skrll Sync with HEAD
 1.29.18.1  03-Dec-2017  jdolecek update from HEAD
 1.30.2.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.32.8.2  28-Jul-2018  pgoyette Sync with HEAD
 1.32.8.1  25-Jun-2018  pgoyette Sync with HEAD
 1.32.2.1  26-Jul-2018  snj Pull up following revision(s) (requested by msaitoh in ticket #938):
sys/arch/acorn32/podulebus/if_ie.c: revision 1.41
sys/arch/amiga/dev/if_es.c: revision 1.58
sys/arch/amiga/dev/if_qn.c: revision 1.45
sys/arch/arm/at91/at91emac.c: revision 1.20
sys/arch/arm/ep93xx/epe.c: revision 1.37
sys/arch/emips/ebus/if_le_ebus.c: revision 1.14
sys/arch/emips/ebus/if_le_ebus.c: revision 1.15
sys/arch/mac68k/dev/if_mc.c: revision 1.46
sys/arch/macppc/dev/am79c950.c: revision 1.39
sys/arch/newsmips/apbus/if_sn.c: revision 1.40
sys/arch/next68k/dev/mb8795.c: revision 1.59
sys/arch/playstation2/dev/if_smap.c: revision 1.25
sys/arch/playstation2/dev/if_smap.c: revision 1.26
sys/arch/sun2/dev/if_ec.c: revision 1.28
sys/arch/sun3/dev/if_ie.c: revision 1.63
sys/arch/x68k/dev/if_ne_intio.c: revision 1.19
sys/arch/xen/xen/if_xennet_xenbus.c: revision 1.75
sys/arch/xen/xen/xennetback_xenbus.c: revision 1.63
sys/dev/bi/if_ni.c: revision 1.45
sys/dev/cadence/if_cemac.c: revision 1.12
sys/dev/ic/am7990.c: revision 1.78
sys/dev/ic/am79900.c: revision 1.27
sys/dev/ic/an.c: revision 1.67
sys/dev/ic/cs89x0.c: revision 1.40
sys/dev/ic/dm9000.c: revision 1.13
sys/dev/ic/dm9000.c: revision 1.14
sys/dev/ic/dp8390.c: revision 1.88
sys/dev/ic/elink3.c: revision 1.141
sys/dev/ic/elinkxl.c: revision 1.122
sys/dev/ic/hme.c: revision 1.98
sys/dev/ic/i82586.c: revision 1.77
sys/dev/ic/lance.c: revision 1.53
sys/dev/ic/mb86950.c: revision 1.27
sys/dev/ic/mb86960.c: revision 1.86
sys/dev/ic/mtd803.c: revision 1.34
sys/dev/ic/pdq_ifsubr.c: revision 1.59
sys/dev/ic/rrunner.c: revision 1.86
sys/dev/ic/seeq8005.c: revision 1.58
sys/dev/ic/sgec.c: revision 1.47
sys/dev/ic/smc90cx6.c: revision 1.72
sys/dev/ic/smc91cxx.c: revision 1.96
sys/dev/ic/tropic.c: revision 1.49
sys/dev/ic/wi.c: revision 1.245
sys/dev/isa/if_eg.c: revision 1.93
sys/dev/isa/if_el.c: revision 1.95
sys/dev/isa/if_iy.c: revision 1.101
sys/dev/ofw/ofnet.c: revision 1.58
sys/dev/pci/if_alc.c: revision 1.27
sys/dev/pci/if_de.c: revision 1.152
sys/dev/pci/if_fpa.c: revision 1.61
sys/dev/pci/if_jme.c: revision 1.34
sys/dev/pci/if_tl.c: revision 1.108
sys/dev/pci/if_vte.c: revision 1.19
sys/dev/pci/ixgbe/ixgbe.h: revision 1.50
sys/dev/pcmcia/if_cnw.c: revision 1.62
sys/dev/pcmcia/if_malo_pcmcia.c: revision 1.17
sys/dev/pcmcia/if_ray.c: revision 1.89
sys/dev/pcmcia/if_xi.c: revision 1.81
sys/dev/pcmcia/mhzc.c: revision 1.51
sys/dev/pcmcia/xirc.c: revision 1.34
sys/dev/qbus/if_de.c: revision 1.33
sys/dev/qbus/if_qe.c: revision 1.78
sys/dev/qbus/if_qt.c: revision 1.22
sys/dev/sbus/be.c: revision 1.87
sys/dev/sbus/qe.c: revision 1.68
sys/dev/scsipi/if_se.c: revision 1.96
sys/dev/usb/if_atu.c: revision 1.59
sys/net/if_l2tp.c: revision 1.28 via patch
sys/net/if_ppp.c: revision 1.160
It's not required to include net/bpfdesc.h. Remove it.
--
Simplify like other drivers. NULL check of ifp->if_bpf is done in
bpf_mtap(), so it's not required to do it here.
--
Remove duplicated inclusion of net/bpf.h.
--
Remove duplicated inclusion of net/bpf.h.
--
Simplify bpf_mtap() call. No functional change.
 1.34.10.1  29-Feb-2020  ad Sync with head.
 1.34.2.1  08-Apr-2020  martin Merge changes from current as of 20200406
 1.35.10.1  01-Aug-2021  thorpej Sync with HEAD.

RSS XML Feed