Home | History | Annotate | Download | only in pci
History log of /src/sys/dev/pci/if_xge.c
RevisionDateAuthorComments
 1.35  24-Sep-2022  thorpej Remove unnecessary include of <sys/malloc.h>.
 1.34  01-Mar-2020  thorpej Use the 64-bit PCI DMA tag if available.
 1.33  30-Jan-2020  thorpej Adopt <net/if_stats.h>.
 1.32  29-May-2019  msaitoh branches: 1.32.4;
Even if we don't use MII(4), use the common path of SIOC[GS]IFMEDIA in
sys/net/if_ethersubr.c if we can.
- Add ec_ifmedia into struct ethercom.
- ec_mii in struct ethercom is kept and used as it is. It might be used in
future. Note that some Ethernet drivers which _DOESN'T_ use mii(4) use
ec_mii for keeping the if_media. Those should be changed in future.
 1.31  28-May-2019  msaitoh Use ETHER_LOCK()/ETHER_UNLOCK() for all ethernet drivers to protect ec_multi*.
 1.30  23-May-2019  msaitoh -No functional change:
- KNF
- u_int*_t -> uint*_t.
 1.29  26-Apr-2019  msaitoh No functional change:
- u_int_{8,16,32}_t -> uint_{8,16,32}_t
- KNF.
- Tabify.
- Remove extra space.
 1.28  09-Dec-2018  jdolecek use pci_intr_establish_xname() everywhere
 1.27  03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.26  26-Jun-2018  msaitoh branches: 1.26.2;
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.25  15-Dec-2016  ozaki-r branches: 1.25.14;
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.24  08-Dec-2016  ozaki-r Apply deferred if_start framework

if_schedule_deferred_start checks if the if_snd queue contains packets,
so drivers don't need to check it by themselves.
 1.23  14-Jul-2016  msaitoh branches: 1.23.2;
- Use aprint*() instead of printf() in xxx_attach().
- Add missing aprint_naive("\n");
- KNF
 1.22  10-Jun-2016  ozaki-r Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.
 1.21  09-Feb-2016  ozaki-r 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.20  13-Apr-2015  riastradh Convert sys/dev to use <sys/rndsource.h>.
 1.19  29-Mar-2014  christos branches: 1.19.6;
make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
 1.18  30-Mar-2013  christos branches: 1.18.4;
remove trailing whitespace
 1.17  27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.16  02-Feb-2012  tls branches: 1.16.6;
Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
avoid expensive operations on disabled entropy sources; make the
rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
system events, and skew between clocks, with a sample implementation
for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files). Tested with release
builds on amd64 and evbarm and live testing on amd64.
 1.15  05-Apr-2010  joerg branches: 1.15.8; 1.15.12;
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.14  19-Jan-2010  pooka branches: 1.14.2; 1.14.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.13  12-May-2009  cegger use device_private().
"looks good" ad@
XXX for the device_t/softc split, please check the driver that no cases have been missed.
 1.12  06-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.11  06-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.10  16-Dec-2008  christos branches: 1.10.2;
replace bitmask_snprintf(9) with snprintb(3)
 1.9  10-Apr-2008  cegger branches: 1.9.4; 1.9.12;
use aprint_*_dev and device_xname
 1.8  07-Feb-2008  dyoung branches: 1.8.6;
Start patching up the kernel so that a network driver always has
the opportunity to handle an ioctl before generic ifioctl handling
occurs. This will ease extending the kernel and sharing of code
between drivers.

First steps: Make the signature of ifioctl_common() match struct
ifinet->if_ioctl. Convert SIOCSIFCAP and SIOCSIFMTU to the new
ifioctl() regime, throughout the kernel.
 1.7  04-Jan-2008  ad Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
 1.6  19-Oct-2007  ad branches: 1.6.2; 1.6.8;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.5  04-Mar-2007  christos branches: 1.5.2; 1.5.14; 1.5.16; 1.5.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.4  16-Nov-2006  christos branches: 1.4.4;
__unused removal on arguments; approved by core.
 1.3  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.2  11-Dec-2005  christos branches: 1.2.18; 1.2.22; 1.2.24;
merge ktrace-lwp.
 1.1  09-Sep-2005  ragge branches: 1.1.2; 1.1.8;
Device driver for the Neterion (S2io) Xframe-I 10Gbit ethernet card.
Still missing: VLAN + IPv6 checksum support.
 1.1.8.2  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.8.1  09-Sep-2005  skrll file if_xge.c was added on branch ktrace-lwp on 2005-11-10 14:06:02 +0000
 1.1.2.2  13-Sep-2005  tron Pull up following revision(s) (requested by ragge in ticket #768):
sys/dev/pci/if_xge.c: revision 1.1 via patch
sys/dev/pci/if_xgereg.h: revision 1.1
sys/dev/pci/files.pci: revision 1.238
Device driver for the Neterion (S2io) Xframe-I 10Gbit ethernet card.
Still missing: VLAN + IPv6 checksum support.
 1.1.2.1  09-Sep-2005  tron file if_xge.c was added on branch netbsd-3 on 2005-09-13 20:59:37 +0000
 1.2.24.2  10-Dec-2006  yamt sync with head.
 1.2.24.1  22-Oct-2006  yamt sync with head
 1.2.22.1  18-Nov-2006  ad Sync with head.
 1.2.18.6  11-Feb-2008  yamt sync with head.
 1.2.18.5  21-Jan-2008  yamt sync with head
 1.2.18.4  27-Oct-2007  yamt sync with head.
 1.2.18.3  03-Sep-2007  yamt sync with head.
 1.2.18.2  21-Jun-2006  yamt sync with head.
 1.2.18.1  11-Dec-2005  yamt file if_xge.c was added on branch yamt-lazymbuf on 2006-06-21 15:05:05 +0000
 1.4.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.5.20.1  25-Oct-2007  bouyer Sync with HEAD.
 1.5.16.3  23-Mar-2008  matt sync with HEAD
 1.5.16.2  09-Jan-2008  matt sync with HEAD
 1.5.16.1  06-Nov-2007  matt sync with HEAD
 1.5.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.5.2.1  23-Oct-2007  ad Sync with head.
 1.6.8.1  08-Jan-2008  bouyer Sync with HEAD
 1.6.2.1  18-Feb-2008  mjf Sync with HEAD.
 1.8.6.2  17-Jan-2009  mjf Sync with HEAD.
 1.8.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.9.12.1  19-Jan-2009  skrll Sync with HEAD.
 1.9.4.4  11-Aug-2010  yamt sync with head.
 1.9.4.3  11-Mar-2010  yamt sync with head
 1.9.4.2  16-May-2009  yamt sync with head
 1.9.4.1  04-May-2009  yamt sync with head.
 1.10.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.4.1  30-May-2010  rmind sync with head
 1.14.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.15.12.1  18-Feb-2012  mrg merge to -current.
 1.15.8.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15.8.2  30-Oct-2012  yamt sync with head
 1.15.8.1  17-Apr-2012  yamt sync with head
 1.16.6.4  03-Dec-2017  jdolecek update from HEAD
 1.16.6.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.16.6.2  23-Jun-2013  tls resync from head
 1.16.6.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.4.1  18-May-2014  rmind sync with head
 1.19.6.5  05-Feb-2017  skrll Sync with HEAD
 1.19.6.4  05-Oct-2016  skrll Sync with HEAD
 1.19.6.3  09-Jul-2016  skrll Sync with HEAD
 1.19.6.2  19-Mar-2016  skrll Sync with HEAD
 1.19.6.1  06-Jun-2015  skrll Sync with HEAD
 1.23.2.1  07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.25.14.3  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.25.14.2  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.25.14.1  28-Jul-2018  pgoyette Sync with HEAD
 1.26.2.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.26.2.1  10-Jun-2019  christos Sync with HEAD
 1.32.4.1  29-Feb-2020  ad Sync with head.

RSS XML Feed