The NetBSD Project

CVS log for src/sys/net/bpf.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / net

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.216.6.9 / (download) - annotate - [select for diffs], Fri Aug 4 15:00:28 2023 UTC (6 months, 3 weeks ago) by martin
Branch: netbsd-8
Changes since 1.216.6.8: +4 -2 lines
Diff to previous 1.216.6.8 (colored) to branchpoint 1.216 (colored) next main 1.217 (colored)

Apply patch, requested by ozaki-r in ticket #1885:

	sys/net/bpf.c			(apply patch)

bpf: allow to read with no filter (regressed at revision 1.213,
fixed differently in -current)

Revision 1.229.2.3 / (download) - annotate - [select for diffs], Fri Aug 4 14:57:52 2023 UTC (6 months, 3 weeks ago) by martin
Branch: netbsd-9
Changes since 1.229.2.2: +4 -2 lines
Diff to previous 1.229.2.2 (colored) to branchpoint 1.229 (colored) next main 1.230 (colored)

Apply patch, requested by ozaki-r in ticket #1708:

	sys/net/bpf.c			(apply patch)

bpf: allow to read with no filter (regressed at revision 1.213,
fixed differently in -current)

Revision 1.252 / (download) - annotate - [select for diffs], Mon Jul 31 17:41:18 2023 UTC (6 months, 4 weeks ago) by christos
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.251: +4 -4 lines
Diff to previous 1.251 (colored)

Don't call versioned stuff "old". Follow the naming convention for versioning
and name them after the last version of the OS they appeared on.

Revision 1.249.2.1 / (download) - annotate - [select for diffs], Fri Feb 24 13:10:53 2023 UTC (12 months ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.249: +8 -3 lines
Diff to previous 1.249 (colored) next main 1.250 (colored)

Pull up following revision(s) (requested by gutteridge in ticket #103):

	sys/net/bpf.c: revision 1.251

bpf.c: support loopback writes when BIOCSHDRCMPLT is set

Following changes in r. 1.249 "bpf: support sending packets on loopback
interfaces", also allow for this to succeed when the "header complete"
flag is set, which is the practice of some tools, e.g., tcpreplay and
Scapy. With this change, both of those example tools now work, e.g.,
Scapy passes "L3bpfSocket - send and sniff on loopback" in its test
suite.

There are several ways of addressing this issue; this commit is
intended to be the most conservative and consistent with the previous
changes. (E.g., FreeBSD instead has special handling of this condition
in its if_loop.c.)

Revision 1.216.6.8 / (download) - annotate - [select for diffs], Wed Feb 22 19:51:47 2023 UTC (12 months ago) by martin
Branch: netbsd-8
Changes since 1.216.6.7: +22 -4 lines
Diff to previous 1.216.6.7 (colored) to branchpoint 1.216 (colored)

Pull up following revision(s) (requested by riastradh in ticket #1802):

	sys/net/bpf.c: revision 1.247 (manually merged)

bpf(4): Reject bogus timeout values before arithmetic overflows.

Revision 1.229.2.2 / (download) - annotate - [select for diffs], Wed Feb 22 19:50:33 2023 UTC (12 months ago) by martin
Branch: netbsd-9
Changes since 1.229.2.1: +22 -4 lines
Diff to previous 1.229.2.1 (colored) to branchpoint 1.229 (colored)

Pull up following revision(s) (requested by riastradh in ticket #1605):

	sys/net/bpf.c: revision 1.247 (manually merged)

bpf(4): Reject bogus timeout values before arithmetic overflows.

Revision 1.251 / (download) - annotate - [select for diffs], Wed Feb 8 01:37:53 2023 UTC (12 months, 2 weeks ago) by gutteridge
Branch: MAIN
Changes since 1.250: +8 -3 lines
Diff to previous 1.250 (colored)

bpf.c: support loopback writes when BIOCSHDRCMPLT is set

Following changes in r. 1.249 "bpf: support sending packets on loopback
interfaces", also allow for this to succeed when the "header complete"
flag is set, which is the practice of some tools, e.g., tcpreplay and
Scapy. With this change, both of those example tools now work, e.g.,
Scapy passes "L3bpfSocket - send and sniff on loopback" in its test
suite.

There are several ways of addressing this issue; this commit is
intended to be the most conservative and consistent with the previous
changes. (E.g., FreeBSD instead has special handling of this condition
in its if_loop.c.)

Revision 1.250 / (download) - annotate - [select for diffs], Tue Feb 7 01:46:37 2023 UTC (12 months, 2 weeks ago) by gutteridge
Branch: MAIN
Changes since 1.249: +6 -6 lines
Diff to previous 1.249 (colored)

bpf.c: fix a few typos and grammatical issues in comments

Revision 1.249 / (download) - annotate - [select for diffs], Wed Nov 30 06:02:37 2022 UTC (14 months, 4 weeks ago) by ozaki-r
Branch: MAIN
CVS Tags: netbsd-10-base
Branch point for: netbsd-10
Changes since 1.248: +20 -8 lines
Diff to previous 1.248 (colored)

bpf: support sending packets on loopback interfaces

Previously sending packets on a loopback interface via bpf failed
because the packets are treated as AF_UNSPEC by bpf and the loopback
interface couldn't handle such packets.

This fix enables user programs to prepend a protocol family (AF_INET or
AF_INET6) to a payload.  bpf interprets it and treats a packet as so,
not just AF_UNSPEC.  The protocol family is encoded as 4 bytes, host byte
order as per DLT_NULL in the specification(*).

(*) https://www.tcpdump.org/linktypes.html

Proposed on tech-net and tech-kern

Revision 1.248 / (download) - annotate - [select for diffs], Sat Nov 19 08:53:06 2022 UTC (15 months, 1 week ago) by yamt
Branch: MAIN
Changes since 1.247: +17 -2 lines
Diff to previous 1.247 (colored)

bpf: refresh bd_pid in a few more places as well

This made "netstat -B" show hostapd and wpa_supplicant for me.

kingcrab# netstat -B
Active BPF peers
PID     Int     Recv     Drop     Capt     Flags  Bufsize  Comm
433     urtwn0  102      0        2        I-RSH  524288   hostapd
211     urtwn0  102      0        4        I-RS-  32768    dhcpd
670     bwfm0   295      0        2        I-RSH  524288   wpa_supplicant
kingcrab#

Revision 1.247 / (download) - annotate - [select for diffs], Sat Sep 3 10:03:20 2022 UTC (17 months, 3 weeks ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.246: +12 -4 lines
Diff to previous 1.246 (colored)

bpf(4): Reject bogus timeout values before arithmetic overflows.

Reported-by: syzbot+fbd86bdf579944b64a98@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?id=60d46fd4863952897cbf67c6b1bcc8b20ec7bde6

XXX pullup-8
XXX pullup-9

Revision 1.246 / (download) - annotate - [select for diffs], Tue Mar 15 13:00:44 2022 UTC (23 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.245: +4 -4 lines
Diff to previous 1.245 (colored)

bpf(4): Handle null bf_insn on free.

This is not guaranteed by bpf_setf to be nonnull.

Reported-by: syzbot+de1ec9471dfc2f283dda@syzkaller.appspotmail.com

Revision 1.245 / (download) - annotate - [select for diffs], Sat Mar 12 17:23:32 2022 UTC (23 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.244: +4 -5 lines
Diff to previous 1.244 (colored)

bpf(4): Nix KM_NOSLEEP and prune dead branch.

https://syzkaller.appspot.com/bug?id=0fa7029d5565d9670a24c364d44bd116c76d7e7f

Revision 1.244 / (download) - annotate - [select for diffs], Sat Mar 12 16:19:08 2022 UTC (23 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.243: +14 -4 lines
Diff to previous 1.243 (colored)

bpf(4): Clamp read timeout to INT_MAX ticks to avoid overflow.

Reported-by: syzbot+c543d35064d3492b9091@syzkaller.appspotmail.com

Revision 1.243 / (download) - annotate - [select for diffs], Sun Sep 26 01:16:10 2021 UTC (2 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.242: +3 -3 lines
Diff to previous 1.242 (colored)

Change the kqueue filterops::f_isfd field to filterops::f_flags, and
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd.
Field and flag name aligned with OpenBSD.

This does not constitute a functional or ABI change, as the field location
and size, and the value placed in that field, are the same as the previous
code, but we're bumping __NetBSD_Version__ so 3rd-party module source code
can adapt, as needed.

NetBSD 9.99.89

Revision 1.242 / (download) - annotate - [select for diffs], Thu Sep 16 22:19:11 2021 UTC (2 years, 5 months ago) by andvar
Branch: MAIN
Changes since 1.241: +3 -3 lines
Diff to previous 1.241 (colored)

fix typos in word "successful".

Revision 1.239.4.2 / (download) - annotate - [select for diffs], Sun Aug 1 22:42:41 2021 UTC (2 years, 6 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.239.4.1: +2 -3 lines
Diff to previous 1.239.4.1 (colored) to branchpoint 1.239 (colored) next main 1.240 (colored)

Sync with HEAD.

Revision 1.241 / (download) - annotate - [select for diffs], Wed Jul 14 06:50:22 2021 UTC (2 years, 7 months ago) by yamaguchi
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2
Changes since 1.240: +2 -3 lines
Diff to previous 1.240 (colored)

unset IFF_PROMISC at bpf_detach()

Doing "d->bd_promisc = 0" is that bpf_detach() does not call
ifpromisc(ifp, 0). Currently, there is no reason for
this behavior so that it is removed.
In addition to the change, the workaround for it in vlan(4)
is also removed.

Revision 1.239.4.1 / (download) - annotate - [select for diffs], Thu Jun 17 04:46:34 2021 UTC (2 years, 8 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.239: +84 -3 lines
Diff to previous 1.239 (colored)

Sync w/ HEAD.

Revision 1.240 / (download) - annotate - [select for diffs], Wed Jun 9 15:44:15 2021 UTC (2 years, 8 months ago) by martin
Branch: MAIN
Changes since 1.239: +84 -3 lines
Diff to previous 1.239 (colored)

Add a bpf_register_track_event() function (and deregister equivalent)
that allows a driver to track listeners attaching/detaching from tap
points.

This is usefull for drivers that would have to do extra work for some
taps and can not easily decide (at the driver level) if the work would
be needed further up the stack.

An example is providing radiotap headers for IEEE 802.11 frames.

Revision 1.238.2.1 / (download) - annotate - [select for diffs], Sun Jan 3 16:35:04 2021 UTC (3 years, 1 month ago) by thorpej
Branch: thorpej-futex
Changes since 1.238: +5 -8 lines
Diff to previous 1.238 (colored) next main 1.239 (colored)

Sync w/ HEAD.

Revision 1.239 / (download) - annotate - [select for diffs], Fri Dec 18 01:31:49 2020 UTC (3 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.238: +5 -8 lines
Diff to previous 1.238 (colored)

Use sel{record,remove}_knote().

Revision 1.238 / (download) - annotate - [select for diffs], Sun Aug 2 07:19:39 2020 UTC (3 years, 6 months ago) by maxv
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.237: +3 -3 lines
Diff to previous 1.237 (colored)

Use a more informative panic message.

Revision 1.237 / (download) - annotate - [select for diffs], Thu Jun 11 13:36:20 2020 UTC (3 years, 8 months ago) by roy
Branch: MAIN
Changes since 1.236: +96 -39 lines
Diff to previous 1.236 (colored)

bpf(4): Add ioctls BIOCSETWF and BIOCLOCK

Once BIOCLOCK is executed, the device becomes locked which prevents the
execution of ioctl(2) commands which can change the underlying parameters
of the bpf(4) device. An example might be the setting of bpf(4) filter
programs or attaching to different network interfaces.

BIOCSETWF can be used to set write filters for outgoing packets.
Currently if a bpf(4) consumer is compromised, the bpf(4) descriptor can
essentially be used as a raw socket, regardless of consumer's UID.
Write filters give users the ability to constrain which packets can be sent
through the bpf(4) descriptor.

Taken from OpenBSD.

Revision 1.226.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:15 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.226.2.2: +8 -2 lines
Diff to previous 1.226.2.2 (colored) to branchpoint 1.226 (colored) next main 1.227 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.226.2.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:57 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.226.2.1: +51 -51 lines
Diff to previous 1.226.2.1 (colored) to branchpoint 1.226 (colored)

Merge changes from current as of 20200406

Revision 1.236 / (download) - annotate - [select for diffs], Mon Mar 16 21:20:11 2020 UTC (3 years, 11 months ago) by pgoyette
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh
Changes since 1.235: +8 -12 lines
Diff to previous 1.235 (colored)

Use the module subsystem's ability to process SYSCTL_SETUP() entries to
automate installation of sysctl nodes.

Note that there are still a number of device and pseudo-device modules
that create entries tied to individual device units, rather than to the
module itself.  These are not changed.

Revision 1.232.2.2 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:06 2020 UTC (3 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.232.2.1: +18 -19 lines
Diff to previous 1.232.2.1 (colored) to branchpoint 1.232 (colored) next main 1.233 (colored)

Sync with head.

Revision 1.235 / (download) - annotate - [select for diffs], Fri Feb 7 12:35:33 2020 UTC (4 years ago) by thorpej
Branch: MAIN
CVS Tags: ad-namecache-base3
Changes since 1.234: +9 -3 lines
Diff to previous 1.234 (colored)

Use percpu_foreach_xcall() to gather volatile per-cpu counters.  These
must be serialized against the interrupts / soft-interrupts in which
they're manipulated, as well as protected from non-atomic 64-bit memory
loads on 32-bit platforms.

Revision 1.234 / (download) - annotate - [select for diffs], Sat Feb 1 02:54:02 2020 UTC (4 years ago) by riastradh
Branch: MAIN
Changes since 1.233: +11 -18 lines
Diff to previous 1.233 (colored)

Fix wrong memory order and switch bpf to atomic_load/store_*.

Revision 1.232.2.1 / (download) - annotate - [select for diffs], Sat Jan 25 22:38:51 2020 UTC (4 years, 1 month ago) by ad
Branch: ad-namecache
Changes since 1.232: +2 -3 lines
Diff to previous 1.232 (colored)

Sync with head.

Revision 1.233 / (download) - annotate - [select for diffs], Sun Jan 19 05:07:22 2020 UTC (4 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: ad-namecache-base2
Changes since 1.232: +2 -3 lines
Diff to previous 1.232 (colored)

Stop including strip.h (it's no longer generated).

Revision 1.232 / (download) - annotate - [select for diffs], Fri Nov 29 17:29:31 2019 UTC (4 years, 2 months ago) by ryo
Branch: MAIN
CVS Tags: ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.231: +29 -23 lines
Diff to previous 1.231 (colored)

bpf can send a packet greater than MCLBYTES (JumboFrame) using multiple mbuf.

Revision 1.229.2.1 / (download) - annotate - [select for diffs], Wed Oct 16 09:46:55 2019 UTC (4 years, 4 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Changes since 1.229: +8 -2 lines
Diff to previous 1.229 (colored)

Pull up following revision(s) (requested by maxv in ticket #335):

	sys/net/bpf.c: revision 1.230
	sys/net/bpf.c: revision 1.231

Add KASSERT to catch bugs. Something tells me it could easily fire.

 -

As I suspected, the KASSERT I added yesterday can fire if we try to process
zero-sized packets. Skip them to prevent a type confusion that can trigger
random page faults later.

Revision 1.231 / (download) - annotate - [select for diffs], Fri Sep 13 06:39:29 2019 UTC (4 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.230: +7 -2 lines
Diff to previous 1.230 (colored)

As I suspected, the KASSERT I added yesterday can fire if we try to process
zero-sized packets. Skip them to prevent a type confusion that can trigger
random page faults later.

Reported-by: syzbot+3e447ebdcb2bcfa402ac@syzkaller.appspotmail.com

Revision 1.230 / (download) - annotate - [select for diffs], Thu Sep 12 07:38:19 2019 UTC (4 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.229: +3 -2 lines
Diff to previous 1.229 (colored)

Add KASSERT to catch bugs. Something tells me it could easily fire.

Revision 1.216.6.7 / (download) - annotate - [select for diffs], Sun Aug 4 11:19:03 2019 UTC (4 years, 6 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE
Changes since 1.216.6.6: +4 -4 lines
Diff to previous 1.216.6.6 (colored) to branchpoint 1.216 (colored)

Pull up following revision(s) (requested by maxv in ticket #1323):

	sys/net/bpf.c: revision 1.229

Fix info leak: use kmem_zalloc, because we align the buffers, and the
otherwise uninitialized padding bytes get copied to userland in bpf_read().

Revision 1.229 / (download) - annotate - [select for diffs], Wed Jul 10 17:55:33 2019 UTC (4 years, 7 months ago) by maxv
Branch: MAIN
CVS Tags: netbsd-9-base
Branch point for: netbsd-9
Changes since 1.228: +4 -4 lines
Diff to previous 1.228 (colored)

Fix info leak: use kmem_zalloc, because we align the buffers, and the
otherwise uninitialized padding bytes get copied to userland in bpf_read().

Revision 1.226.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:45 2019 UTC (4 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.226: +11 -4 lines
Diff to previous 1.226 (colored)

Sync with HEAD

Revision 1.223.2.4 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:44 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.223.2.3: +4 -4 lines
Diff to previous 1.223.2.3 (colored) to branchpoint 1.223 (colored) next main 1.224 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.228 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:35 2018 UTC (5 years, 5 months ago) by riastradh
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, isaki-audio2-base, isaki-audio2
Changes since 1.227: +4 -4 lines
Diff to previous 1.227 (colored)

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!)

Revision 1.223.2.3 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:09 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.223.2.2: +56 -30 lines
Diff to previous 1.223.2.2 (colored) to branchpoint 1.223 (colored)

Sync with HEAD

Revision 1.227 / (download) - annotate - [select for diffs], Wed Jul 25 07:55:45 2018 UTC (5 years, 7 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0728
Changes since 1.226: +9 -2 lines
Diff to previous 1.226 (colored)

 Initialize some members in a mbuf which is on stack.

Revision 1.226 / (download) - annotate - [select for diffs], Tue Jun 26 06:48:02 2018 UTC (5 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-base
Branch point for: phil-wifi
Changes since 1.225: +49 -30 lines
Diff to previous 1.225 (colored)

 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.

Revision 1.223.2.2 / (download) - annotate - [select for diffs], Mon Jun 25 07:26:06 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.223.2.1: +2 -16 lines
Diff to previous 1.223.2.1 (colored) to branchpoint 1.223 (colored)

Sync with HEAD

Revision 1.225 / (download) - annotate - [select for diffs], Mon Jun 25 03:22:14 2018 UTC (5 years, 8 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0625
Changes since 1.224: +2 -16 lines
Diff to previous 1.224 (colored)

 Removal of bpf_tap().

Revision 1.223.2.1 / (download) - annotate - [select for diffs], Mon May 21 04:36:15 2018 UTC (5 years, 9 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.223: +8 -4 lines
Diff to previous 1.223 (colored)

Sync with HEAD

Revision 1.216.6.6 / (download) - annotate - [select for diffs], Tue May 15 13:48:37 2018 UTC (5 years, 9 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.216.6.5: +8 -4 lines
Diff to previous 1.216.6.5 (colored) to branchpoint 1.216 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #826):

	sys/net/if_bridge.c: revision 1.155
	sys/net/if.c: revision 1.421
	sys/net/bpf.c: revision 1.224
	sys/net/if.c: revision 1.422
	sys/net/if.c: revision 1.423

Use if_is_mpsafe (NFC)

Protect packet input routines with KERNEL_LOCK and splsoftnet
if_input, i.e, ether_input and friends, now runs in softint without any
protections.  It's ok for ether_input itself because it's already MP-safe,
however, subsequent routines called from it such as carp_input and agr_input
aren't safe because they're not MP-safe.  Protect if_input with KERNEL_LOCK.
if_input can be called from a normal LWP context.  In that case we need to
prevent interrupts (softint) from running by splsoftnet to protect
non-MP-safe
codes (e.g., carp_input and agr_input).

Pointed out by mlelstv@

Protect if_deferred_start_softint with KERNEL_LOCK if the interface isn't
MP-safe

Revision 1.224 / (download) - annotate - [select for diffs], Mon May 14 02:55:03 2018 UTC (5 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-0521
Changes since 1.223: +8 -4 lines
Diff to previous 1.223 (colored)

Protect packet input routines with KERNEL_LOCK and splsoftnet

if_input, i.e, ether_input and friends, now runs in softint without any
protections.  It's ok for ether_input itself because it's already MP-safe,
however, subsequent routines called from it such as carp_input and agr_input
aren't safe because they're not MP-safe.  Protect if_input with KERNEL_LOCK.

if_input can be called from a normal LWP context.  In that case we need to
prevent interrupts (softint) from running by splsoftnet to protect non-MP-safe
codes (e.g., carp_input and agr_input).

Pointed out by mlelstv@

Revision 1.216.6.5 / (download) - annotate - [select for diffs], Mon Feb 5 14:18:00 2018 UTC (6 years ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.216.6.4: +3 -19 lines
Diff to previous 1.216.6.4 (colored) to branchpoint 1.216 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #526):
	sys/net/bpfdesc.h: revision 1.45
	sys/net/bpf.c: revision 1.223
Abandon unnecessary softint
The softint was introduced to defer fownsignal that was called in bpf_wakeup to
softint at v1.139, but now bpf_wakeup always runs in softint so we don't need
the softint anymore.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Jan 25 02:45:02 2018 UTC (6 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.222: +3 -19 lines
Diff to previous 1.222 (colored)

Abandon unnecessary softint

The softint was introduced to defer fownsignal that was called in bpf_wakeup to
softint at v1.139, but now bpf_wakeup always runs in softint so we don't need
the softint anymore.

Revision 1.216.6.4 / (download) - annotate - [select for diffs], Tue Jan 2 10:20:33 2018 UTC (6 years, 1 month ago) by snj
Branch: netbsd-8
Changes since 1.216.6.3: +8 -20 lines
Diff to previous 1.216.6.3 (colored) to branchpoint 1.216 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #456):
	sys/arch/arm/sunxi/sunxi_emac.c: 1.9
	sys/dev/ic/dwc_gmac.c: 1.43-1.44
	sys/dev/pci/if_iwm.c: 1.75
	sys/dev/pci/if_wm.c: 1.543
	sys/dev/pci/ixgbe/ixgbe.c: 1.112
	sys/dev/pci/ixgbe/ixv.c: 1.74
	sys/kern/sys_socket.c: 1.75
	sys/net/agr/if_agr.c: 1.43
	sys/net/bpf.c: 1.219
	sys/net/if.c: 1.397, 1.399, 1.401-1.403, 1.406-1.410, 1.412-1.416
	sys/net/if.h: 1.242-1.247, 1.250, 1.252-1.257
	sys/net/if_bridge.c: 1.140 via patch, 1.142-1.146
	sys/net/if_etherip.c: 1.40
	sys/net/if_ethersubr.c: 1.243, 1.246
	sys/net/if_faith.c: 1.57
	sys/net/if_gif.c: 1.132
	sys/net/if_l2tp.c: 1.15, 1.17
	sys/net/if_loop.c: 1.98-1.101
	sys/net/if_media.c: 1.35
	sys/net/if_pppoe.c: 1.131-1.132
	sys/net/if_spppsubr.c: 1.176-1.177
	sys/net/if_tun.c: 1.142
	sys/net/if_vlan.c: 1.107, 1.109, 1.114-1.121
	sys/net/npf/npf_ifaddr.c: 1.3
	sys/net/npf/npf_os.c: 1.8-1.9
	sys/net/rtsock.c: 1.230
	sys/netcan/if_canloop.c: 1.3-1.5
	sys/netinet/if_arp.c: 1.255
	sys/netinet/igmp.c: 1.65
	sys/netinet/in.c: 1.210-1.211
	sys/netinet/in_pcb.c: 1.180
	sys/netinet/ip_carp.c: 1.92, 1.94
	sys/netinet/ip_flow.c: 1.81
	sys/netinet/ip_input.c: 1.362
	sys/netinet/ip_mroute.c: 1.147
	sys/netinet/ip_output.c: 1.283, 1.285, 1.287
	sys/netinet6/frag6.c: 1.61
	sys/netinet6/in6.c: 1.251, 1.255
	sys/netinet6/in6_pcb.c: 1.162
	sys/netinet6/ip6_flow.c: 1.35
	sys/netinet6/ip6_input.c: 1.183
	sys/netinet6/ip6_output.c: 1.196
	sys/netinet6/mld6.c: 1.90
	sys/netinet6/nd6.c: 1.239-1.240
	sys/netinet6/nd6_nbr.c: 1.139
	sys/netinet6/nd6_rtr.c: 1.136
	sys/netipsec/ipsec_output.c: 1.65
	sys/rump/net/lib/libnetinet/netinet_component.c: 1.9-1.10
kmem_intr_free kmem_intr_[z]alloced memory
the underlying pools are the same but api-wise those should match
Unify IFEF_*_MPSAFE into IFEF_MPSAFE
There are already two flags for if_output and if_start, however, it seems such
MPSAFE flags are eventually needed for all if_XXX operations. Having discrete
flags for each operation is wasteful of if_extflags bits. So let's unify
the flags into one: IFEF_MPSAFE.
Fortunately IFEF_*_MPSAFE flags have never been included in any releases, so
we can change them without breaking backward compatibility of the releases
(though the kernel version of -current should be bumped).
Note that if an interface have both MP-safe and non-MP-safe operations at a
time, we have to set the IFEF_MPSAFE flag and let callees of non-MP-safe
opeartions take the kernel lock.
Proposed on tech-kern@ and tech-net@
Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch
It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..."
scattered all over the source code and makes it easy to identify remaining
KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.
No functional change
Hold KERNEL_LOCK on if_ioctl selectively based on IFEF_MPSAFE
If IFEF_MPSAFE is set, hold the lock and otherwise don't hold.
This change requires additions of KERNEL_LOCK to subsequence functions from
if_ioctl such as ifmedia_ioctl and ifioctl_common to protect non-MP-safe
components.
Proposed on tech-kern@ and tech-net@
Ensure to hold if_ioctl_lock when calling if_flags_set
Fix locking against myself on ifpromisc
vlan_unconfig_locked could be called with holding if_ioctl_lock.
Ensure to not turn on IFF_RUNNING of an interface until its initialization completes
And ensure to turn off it before destruction as per IFF_RUNNING's description
"resource allocated". (The description is a bit doubtful though, I believe the
change is still proper.)
Ensure to hold if_ioctl_lock on if_up and if_down
One exception for if_down is if_detach; in the case the lock isn't needed
because it's guaranteed that no other one can access ifp at that point.
Make if_link_queue MP-safe if IFEF_MPSAFE
if_link_queue is a queue to store events of link state changes, which is
used to pass events from (typically) an interrupt handler to
if_link_state_change softint. The queue was protected by KERNEL_LOCK so far,
but if IFEF_MPSAFE is enabled, it becomes unsafe because (perhaps) an interrupt
handler of an interface with IFEF_MPSAFE doesn't take KERNEL_LOCK. Protect it
by a spin mutex.
Additionally with this change KERNEL_LOCK of if_link_state_change softint is
omitted if NET_MPSAFE is enabled.
Note that the spin mutex is now ifp->if_snd.ifq_lock as well as the case of
if_timer (see the comment).
Use IFADDR_WRITER_FOREACH instead of IFADDR_READER_FOREACH
At that point no other one modifies the list so IFADDR_READER_FOREACH
is unnecessary. Use of IFADDR_READER_FOREACH is harmless in general though,
if we try to detect contract violations of pserialize, using it violates
the contract. So avoid using it makes life easy.
Ensure to call if_addr_init with holding if_ioctl_lock
Get rid of outdated comments
Fix build of kernels without ether
By throwing out if_enable_vlan_mtu and if_disable_vlan_mtu that
created a unnecessary dependency from if.c to if_ethersubr.c.
PR kern/52790
Rename IFNET_LOCK to IFNET_GLOBAL_LOCK
IFNET_LOCK will be used in another lock, if_ioctl_lock (might be renamed then).
Wrap if_ioctl_lock with IFNET_* macros (NFC)
Also if_ioctl_lock perhaps needs to be renamed to something because it's now
not just for ioctl...
Reorder some destruction routines in if_detach
- Destroy if_ioctl_lock at the end of the if_detach because it's used in various
  destruction routines
- Move psref_target_destroy after pr_purgeif because we want to use psref in
  pr_purgeif (otherwise destruction procedures can be tricky)
Ensure to call if_mcast_op with holding IFNET_LOCK
Note that CARP doesn't deal with IFNET_LOCK yet.
Remove IFNET_GLOBAL_LOCK where it's unnecessary because IFNET_LOCK is held
Describe which lock is used to protect each member variable of struct ifnet
Requested by skrll@
Write a guideline for converting an interface to IFEF_MPSAFE
Requested by skrll@
Note that IFNET_LOCK must not be held in softint
Don't set IFEF_MPSAFE unless NET_MPSAFE at this point
Because recent investigations show that interfaces with IFEF_MPSAFE need to
follow additional restrictions to work with the flag safely. We should enable it
on an interface by default only if the interface surely satisfies the
restrictions, which are described in if.h.
Note that enabling IFEF_MPSAFE solely gains a few benefit on performance because
the network stack is still serialized by the big kernel locks by default.

Revision 1.216.6.3 / (download) - annotate - [select for diffs], Thu Dec 21 21:51:37 2017 UTC (6 years, 2 months ago) by snj
Branch: netbsd-8
Changes since 1.216.6.2: +9 -4 lines
Diff to previous 1.216.6.2 (colored) to branchpoint 1.216 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #454):
	sys/net/bpf.c: revision 1.222
Make softint and callout MP-safe

Revision 1.216.6.2 / (download) - annotate - [select for diffs], Thu Dec 21 21:38:23 2017 UTC (6 years, 2 months ago) by snj
Branch: netbsd-8
Changes since 1.216.6.1: +3 -3 lines
Diff to previous 1.216.6.1 (colored) to branchpoint 1.216 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #446):
	sys/net/bpf.c: revision 1.221
Fix panic in callout_halt (fix typo)
Reported by wiz@

Revision 1.222 / (download) - annotate - [select for diffs], Fri Dec 15 07:29:11 2017 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.221: +9 -4 lines
Diff to previous 1.221 (colored)

Make softint and callout MP-safe

Revision 1.221 / (download) - annotate - [select for diffs], Tue Dec 12 06:26:57 2017 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.220: +3 -3 lines
Diff to previous 1.220 (colored)

Fix panic in callout_halt (fix typo)

Reported by wiz@

Revision 1.171.2.3 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:02 2017 UTC (6 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.171.2.2: +613 -228 lines
Diff to previous 1.171.2.2 (colored) next main 1.172 (colored)

update from HEAD

Revision 1.220 / (download) - annotate - [select for diffs], Thu Nov 30 20:25:55 2017 UTC (6 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.219: +3 -2 lines
Diff to previous 1.219 (colored)

add fo_name so we can identify the fileops in a simple way.

Revision 1.219 / (download) - annotate - [select for diffs], Fri Nov 17 07:37:12 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.218: +8 -20 lines
Diff to previous 1.218 (colored)

Provide macros for softnet_lock and KERNEL_LOCK hiding NET_MPSAFE switch

It reduces C&P codes such as "#ifndef NET_MPSAFE KERNEL_LOCK(1, NULL); ..."
scattered all over the source code and makes it easy to identify remaining
KERNEL_LOCK and/or softnet_lock that are held even if NET_MPSAFE.

No functional change

Revision 1.218 / (download) - annotate - [select for diffs], Wed Oct 25 08:12:40 2017 UTC (6 years, 4 months ago) by maya
Branch: MAIN
Changes since 1.217: +8 -4 lines
Diff to previous 1.217 (colored)

Use C99 initializer for filterops

Mostly done with spatch with touchups for indentation

@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- 	{ a, b, c, d
+ 	{
+ 	.f_isfd = a,
+ 	.f_attach = b,
+ 	.f_detach = c,
+ 	.f_event = d,
};

Revision 1.216.6.1 / (download) - annotate - [select for diffs], Wed Oct 25 07:14:09 2017 UTC (6 years, 4 months ago) by snj
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.216: +3 -3 lines
Diff to previous 1.216 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #329):
	sys/net/bpf.c: revision 1.217
Turn on D_MPSAFE flag of bpf_cdevsw that is already MP-safe
Pointed out by k-goda@IIJ

Revision 1.217 / (download) - annotate - [select for diffs], Thu Oct 19 01:57:15 2017 UTC (6 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.216: +3 -3 lines
Diff to previous 1.216 (colored)

Turn on D_MPSAFE flag of bpf_cdevsw that is already MP-safe

Pointed out by k-goda@IIJ

Revision 1.189.2.8 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:11 2017 UTC (6 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.189.2.7: +274 -147 lines
Diff to previous 1.189.2.7 (colored) to branchpoint 1.189 (colored) next main 1.190 (colored)

Sync with HEAD

Revision 1.216.4.2 / (download) - annotate - [select for diffs], Sat Apr 29 11:12:15 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.216.4.1: +2 -3 lines
Diff to previous 1.216.4.1 (colored) to branchpoint 1.216 (colored) next main 1.217 (colored)

Remove more unnecessary #include for sys/localcount.h

Revision 1.216.4.1 / (download) - annotate - [select for diffs], Thu Apr 27 05:36:38 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.216: +4 -2 lines
Diff to previous 1.216 (colored)

Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita.  There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.

Revision 1.203.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:04 2017 UTC (6 years, 10 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.203: +565 -192 lines
Diff to previous 1.203 (colored) next main 1.204 (colored)

Sync with HEAD

Revision 1.199.2.4 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:49 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.199.2.3: +565 -193 lines
Diff to previous 1.199.2.3 (colored) to branchpoint 1.199 (colored) next main 1.200 (colored)

Sync with HEAD

Revision 1.216 / (download) - annotate - [select for diffs], Mon Feb 20 03:08:38 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: prg-localcount2, netbsd-8
Changes since 1.215: +6 -3 lines
Diff to previous 1.215 (colored)

Reinit a pslist entry before inserting it to a pslist again

Fix PR kern/51984
Tested by nonaka@

Revision 1.215 / (download) - annotate - [select for diffs], Sun Feb 19 13:58:42 2017 UTC (7 years ago) by christos
Branch: MAIN
Changes since 1.214: +4 -4 lines
Diff to previous 1.214 (colored)

typo

Revision 1.214 / (download) - annotate - [select for diffs], Mon Feb 13 03:44:45 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.213: +3 -4 lines
Diff to previous 1.213 (colored)

Update comments to reflect bpf MP-ification

Revision 1.213 / (download) - annotate - [select for diffs], Thu Feb 9 09:30:26 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.212: +267 -142 lines
Diff to previous 1.212 (colored)

Make bpf MP-safe

By the change, bpf_mtap can run without any locks as long as its bpf filter
doesn't match a target packet. Pushing data to a bpf buffer still needs
a lock. Removing the lock requires big changes and it's a future work.

Another known issue is that we need to remain some obsolete variables to
avoid breaking kvm(3) users such as netstat and fstat. One problem for
MP-ification is that in order to keep statistic counters of bpf_d we need
to use atomic operations for them. Once we retire the kvm(3) users, we
should make the counters per-CPU and remove the atomic operations.

Revision 1.189.2.7 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:57 2017 UTC (7 years ago) by skrll
Branch: nick-nhusb
Changes since 1.189.2.6: +322 -76 lines
Diff to previous 1.189.2.6 (colored) to branchpoint 1.189 (colored)

Sync with HEAD

Revision 1.212 / (download) - annotate - [select for diffs], Wed Feb 1 08:18:33 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.211: +11 -15 lines
Diff to previous 1.211 (colored)

Reduce return points

Revision 1.211 / (download) - annotate - [select for diffs], Wed Feb 1 08:16:42 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.210: +17 -5 lines
Diff to previous 1.210 (colored)

Kill tsleep/wakeup and use cv

Revision 1.210 / (download) - annotate - [select for diffs], Wed Feb 1 08:15:15 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.209: +49 -10 lines
Diff to previous 1.209 (colored)

Make bpf_gstats percpu

Revision 1.209 / (download) - annotate - [select for diffs], Wed Feb 1 08:13:45 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.208: +98 -34 lines
Diff to previous 1.208 (colored)

Use pslist(9) instead of queue(9) for psz/psref

As usual some member variables of struct bpf_d and bpf_if remain to avoid
breaking kvm(3) users (netstat and fstat).

Revision 1.208 / (download) - annotate - [select for diffs], Wed Feb 1 08:07:27 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.207: +25 -18 lines
Diff to previous 1.207 (colored)

Use kmem(9) instead of malloc/free

Revision 1.207 / (download) - annotate - [select for diffs], Wed Feb 1 08:06:01 2017 UTC (7 years ago) by ozaki-r
Branch: MAIN
Changes since 1.206: +8 -8 lines
Diff to previous 1.206 (colored)

Make global variables static

Revision 1.206 / (download) - annotate - [select for diffs], Wed Jan 25 01:04:23 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.205: +11 -7 lines
Diff to previous 1.205 (colored)

Use bpf_ops for bpf_mtap_softint

By doing so we don't need to care whether a kernel enables bpfilter or not.

Revision 1.205 / (download) - annotate - [select for diffs], Tue Jan 24 09:05:28 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.204: +125 -2 lines
Diff to previous 1.204 (colored)

Defer bpf_mtap in Rx interrupt context to softint

bpf_mtap of some drivers is still called in hardware interrupt context.
We want to run them in softint as well as bpf_mtap of most drivers
(see if_percpuq_softint and if_input).

To this end, bpf_mtap_softint mechanism is implemented; it defers
bpf_mtap processing to a dedicated softint for a target driver.
By using the machanism, we can move bpf_mtap processing to softint
without changing target drivers much while it adds some overhead
on CPU and memory. Once target drivers are changed to softint-based,
we should return to normal bpf_mtap.

Proposed on tech-kern and tech-net

Revision 1.204 / (download) - annotate - [select for diffs], Mon Jan 23 10:17:36 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
Changes since 1.203: +4 -3 lines
Diff to previous 1.203 (colored)

Make bpf_setf static

Revision 1.189.2.6 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:08 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.189.2.5: +14 -15 lines
Diff to previous 1.189.2.5 (colored) to branchpoint 1.189 (colored)

Sync with HEAD

Revision 1.199.2.3 / (download) - annotate - [select for diffs], Tue Jul 26 05:54:40 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.199.2.2: +3 -3 lines
Diff to previous 1.199.2.2 (colored) to branchpoint 1.199 (colored)

Rename LOCALCOUNT_INITIALIZER to DEVSW_MODULE_INIT.  This better describes
what we're doing, and why.

Revision 1.199.2.2 / (download) - annotate - [select for diffs], Tue Jul 19 06:27:00 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.199.2.1: +10 -18 lines
Diff to previous 1.199.2.1 (colored) to branchpoint 1.199 (colored)

Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it.  This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@

Revision 1.203 / (download) - annotate - [select for diffs], Tue Jul 19 02:47:45 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.202: +9 -12 lines
Diff to previous 1.202 (colored)

Fix regression introduced in tests/net/bpf and tests/net/bpfilter

The rump code needs to call devsw_attach() in order to assign a dev_major
for bpf;  it then uses this to create rumps /dev/bpf node.  Unfortunately,
this leaves the devsw attached, so when the bpf module tries to initialize
itself, it gets an EEXIST error and fails.

So, once rump has figured what the dev_major should be, call devsw_detach()
to remove the devsw.  Then, when the module initialization code calls
devsw_attach() it will succeed.

Revision 1.199.2.1 / (download) - annotate - [select for diffs], Sun Jul 17 05:05:10 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.199: +16 -7 lines
Diff to previous 1.199 (colored)

Adapt some modular drivers to the localcount(9) world.  We're still
not actually using the localcount stuff, but we need to differentiate
between built-in vs loaded drivers and allocate a "struct localcount"
only for loaded drivers.

Revision 1.202 / (download) - annotate - [select for diffs], Sun Jul 17 02:49:52 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: MAIN
Changes since 1.201: +3 -5 lines
Diff to previous 1.201 (colored)

Now that we're only calling devsw_attach() in the modular driver, it
is not ok for the driver/module to already exist.  So don't ignore
EEXIST.

Revision 1.201 / (download) - annotate - [select for diffs], Sun Jul 17 01:16:30 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: MAIN
Changes since 1.200: +3 -3 lines
Diff to previous 1.200 (colored)

Don't initialize variables that no longer exist in built-in module.

Revision 1.200 / (download) - annotate - [select for diffs], Sun Jul 17 01:03:46 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: MAIN
Changes since 1.199: +6 -2 lines
Diff to previous 1.199 (colored)

Don't try to call devsw_attach() for built-in driver code.

Revision 1.189.2.5 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:21 2016 UTC (7 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.189.2.4: +10 -10 lines
Diff to previous 1.189.2.4 (colored) to branchpoint 1.189 (colored)

Sync with HEAD

Revision 1.199 / (download) - annotate - [select for diffs], Mon Jun 20 06:46:37 2016 UTC (7 years, 8 months ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.198: +3 -3 lines
Diff to previous 1.198 (colored)

apply if_output_lock() to L3 callers which call ifp->if_output() of L2(or L3 tunneling).

Revision 1.198 / (download) - annotate - [select for diffs], Fri Jun 10 13:31:44 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.197: +6 -6 lines
Diff to previous 1.197 (colored)

Avoid storing a pointer of an interface in a mbuf

Having a pointer of an interface in a mbuf isn't safe if we remove big
kernel locks; an interface object (ifnet) can be destroyed anytime in any
packet processing and accessing such object via a pointer is racy. Instead
we have to get an object from the interface collection (ifindex2ifnet) via
an interface index (if_index) that is stored to a mbuf instead of an
pointer.

The change provides two APIs: m_{get,put}_rcvif_psref that use psref(9)
for sleep-able critical sections and m_{get,put}_rcvif that use
pserialize(9) for other critical sections. The change also adds another
API called m_get_rcvif_NOMPSAFE, that is NOT MP-safe and for transition
moratorium, i.e., it is intended to be used for places where are not
planned to be MP-ified soon.

The change adds some overhead due to psref to performance sensitive paths,
however the overhead is not serious, 2% down at worst.

Proposed on tech-kern and tech-net.

Revision 1.197 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:15 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.196: +4 -4 lines
Diff to previous 1.196 (colored)

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.

Revision 1.196 / (download) - annotate - [select for diffs], Tue Jun 7 01:06:28 2016 UTC (7 years, 8 months ago) by pgoyette
Branch: MAIN
Changes since 1.195: +3 -3 lines
Diff to previous 1.195 (colored)

Create separate modules for i2c_bitbang and bpf_filter so these files
can be included in kernels which need them without also duplicating
them in other modules.  Removes the duplicate symbols I found which
prevented loading i2c and bpf modules after having fixed PR 45125.

Revision 1.189.2.4 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:32 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.189.2.3: +15 -8 lines
Diff to previous 1.189.2.3 (colored) to branchpoint 1.189 (colored)

Sync with HEAD

Revision 1.195 / (download) - annotate - [select for diffs], Tue Feb 9 08:32:12 2016 UTC (8 years ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319
Changes since 1.194: +3 -3 lines
Diff to previous 1.194 (colored)

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!

Revision 1.194 / (download) - annotate - [select for diffs], Mon Feb 1 16:32:28 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.193: +14 -7 lines
Diff to previous 1.193 (colored)

Do less work under the kernel lock, otherwise dhcpcd aborting causes us
to deadlock.

Revision 1.189.2.3 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:06 2015 UTC (8 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.189.2.2: +22 -7 lines
Diff to previous 1.189.2.2 (colored) to branchpoint 1.189 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.193 / (download) - annotate - [select for diffs], Wed Dec 16 23:14:42 2015 UTC (8 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.192: +4 -3 lines
Diff to previous 1.192 (colored)

don't free mbuf twice.
XXX: pullup 7.

Revision 1.192 / (download) - annotate - [select for diffs], Wed Oct 14 19:40:09 2015 UTC (8 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.191: +20 -6 lines
Diff to previous 1.191 (colored)

PR/49386: Ryota Ozaki: Add a mutex for bpf creation/removal to avoid races.
Add M_CANFAIL to malloc.

Revision 1.189.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:25 2015 UTC (8 years, 8 months ago) by skrll
Branch: nick-nhusb
Changes since 1.189.2.1: +6 -6 lines
Diff to previous 1.189.2.1 (colored) to branchpoint 1.189 (colored)

Sync with HEAD

Revision 1.191 / (download) - annotate - [select for diffs], Sat May 30 19:14:46 2015 UTC (8 years, 9 months ago) by joerg
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921, nick-nhusb-base-20150606
Changes since 1.190: +3 -3 lines
Diff to previous 1.190 (colored)

Improve wording.

Revision 1.189.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:22 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.189: +4 -5 lines
Diff to previous 1.189 (colored)

Sync with HEAD

Revision 1.190 / (download) - annotate - [select for diffs], Mon Dec 29 13:38:13 2014 UTC (9 years, 2 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.189: +4 -5 lines
Diff to previous 1.189 (colored)

Remove unnecessary variable bc

Revision 1.187.2.1 / (download) - annotate - [select for diffs], Sun Sep 21 18:41:39 2014 UTC (9 years, 5 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.187: +7 -8 lines
Diff to previous 1.187 (colored) next main 1.188 (colored)

Pull up following revision(s) (requested by rmind in ticket #106):
	sys/net/bpf.c: revision 1.189
PR/49190: bpf_deliver: set scratch memory store in bpf_args_t.

Revision 1.189 / (download) - annotate - [select for diffs], Sat Sep 13 17:18:45 2014 UTC (9 years, 5 months ago) by rmind
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.188: +7 -8 lines
Diff to previous 1.188 (colored)

PR/49190: bpf_deliver: set scratch memory store in bpf_args_t.

Revision 1.188 / (download) - annotate - [select for diffs], Fri Sep 5 09:22:22 2014 UTC (9 years, 5 months ago) by matt
Branch: MAIN
Changes since 1.187: +10 -10 lines
Diff to previous 1.187 (colored)

Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get
a correctly typed pointer.

Revision 1.171.2.2 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:34 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.171.2.1: +107 -69 lines
Diff to previous 1.171.2.1 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.182.2.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:56:15 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.182: +40 -34 lines
Diff to previous 1.182 (colored) next main 1.183 (colored)

Rebase.

Revision 1.187 / (download) - annotate - [select for diffs], Thu Aug 7 03:40:21 2014 UTC (9 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.186: +25 -25 lines
Diff to previous 1.186 (colored)

Use NULL instead of 0 for pointers

Revision 1.186 / (download) - annotate - [select for diffs], Mon Jul 28 07:32:46 2014 UTC (9 years, 7 months ago) by alnsn
Branch: MAIN
Changes since 1.185: +7 -3 lines
Diff to previous 1.185 (colored)

Enable net.bpf.jit only if MODULAR and BPFJIT. Tweak a warning about postponed
jit activation.

Revision 1.185 / (download) - annotate - [select for diffs], Fri Jul 25 08:10:40 2014 UTC (9 years, 7 months ago) by dholland
Branch: MAIN
Changes since 1.184: +3 -2 lines
Diff to previous 1.184 (colored)

Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.

Revision 1.184 / (download) - annotate - [select for diffs], Thu Jul 10 15:32:09 2014 UTC (9 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.183: +9 -7 lines
Diff to previous 1.183 (colored)

initialize args the same way we do in filter.

Revision 1.183 / (download) - annotate - [select for diffs], Tue Jun 24 10:53:30 2014 UTC (9 years, 8 months ago) by alnsn
Branch: MAIN
Changes since 1.182: +14 -15 lines
Diff to previous 1.182 (colored)

Implement copfuncs and external memory in bpfjit.

Revision 1.166.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:08 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.166.2.2: +74 -42 lines
Diff to previous 1.166.2.2 (colored) to branchpoint 1.166 (colored) next main 1.167 (colored)

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")

Revision 1.173.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:12 2014 UTC (9 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.173: +74 -42 lines
Diff to previous 1.173 (colored) next main 1.174 (colored)

sync with head

Revision 1.182 / (download) - annotate - [select for diffs], Sun Mar 16 05:20:30 2014 UTC (9 years, 11 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.181: +13 -4 lines
Diff to previous 1.181 (colored)

Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.

Revision 1.181 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:12 2014 UTC (10 years ago) by pooka
Branch: MAIN
Changes since 1.180: +2 -8 lines
Diff to previous 1.180 (colored)

Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

Revision 1.180 / (download) - annotate - [select for diffs], Thu Dec 5 15:55:35 2013 UTC (10 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.179: +7 -5 lines
Diff to previous 1.179 (colored)

It is silly to kill the system when an interface failed to clear promiscuous
mode. Some return EINVAL when they are dying, but others like USB return EIO.
Downgrade to a DIAGNOSTIC printf. Same should be done for the malloc/NOWAIT,
but this is rarely hit.

Revision 1.179 / (download) - annotate - [select for diffs], Sat Nov 16 01:13:52 2013 UTC (10 years, 3 months ago) by rmind
Branch: MAIN
Changes since 1.178: +11 -4 lines
Diff to previous 1.178 (colored)

bpf_deliver: convert to bpf_filter_ext().

Revision 1.178 / (download) - annotate - [select for diffs], Fri Nov 15 00:12:44 2013 UTC (10 years, 3 months ago) by rmind
Branch: MAIN
Changes since 1.177: +26 -11 lines
Diff to previous 1.177 (colored)

- Add bpf_args_t and convert bpf_filter_ext() to use it.  This allows the
  caller to initialise (and re-use) the memory store.
- Add bpf_jit_generate() and bpf_jit_freecode() wrappers.

Revision 1.177 / (download) - annotate - [select for diffs], Wed Sep 18 23:34:55 2013 UTC (10 years, 5 months ago) by rmind
Branch: MAIN
Changes since 1.176: +3 -4 lines
Diff to previous 1.176 (colored)

Add bpf_filter_ext() to use with BPF COP, restore bpf_filter() as it was
originally to preserve compatibility.  Similarly, add bpf_validate_ext()
which takes bpf_ctx_t.

Revision 1.141.6.1.6.1 / (download) - annotate - [select for diffs], Wed Sep 11 07:31:20 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: netbsd-5-1
CVS Tags: netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE
Changes since 1.141.6.1: +12 -4 lines
Diff to previous 1.141.6.1 (colored) next main 1.141.6.2 (colored)

Pull up following revision(s) (requested by spz in ticket #1874):
	sys/net/bpf.c: revision 1.176 via patch
PR/48198: Peter Bex: Avoid kernel panic caused by setting a very small bpf
buffer size.

Revision 1.141.6.2.2.1 / (download) - annotate - [select for diffs], Wed Sep 11 07:04:32 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: netbsd-5-2
CVS Tags: netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE
Changes since 1.141.6.2: +12 -4 lines
Diff to previous 1.141.6.2 (colored) next main 1.141.6.3 (colored)

Pull up following revision(s) (requested by spz in ticket #1874):
	sys/net/bpf.c: revision 1.176 via patch
PR/48198: Peter Bex: Avoid kernel panic caused by setting a very small bpf
buffer size.

Revision 1.141.6.3 / (download) - annotate - [select for diffs], Wed Sep 11 07:02:46 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: netbsd-5
Changes since 1.141.6.2: +12 -4 lines
Diff to previous 1.141.6.2 (colored) to branchpoint 1.141 (colored) next main 1.142 (colored)

Pull up following revision(s) (requested by spz in ticket #1874):
	sys/net/bpf.c: revision 1.176 via patch
PR/48198: Peter Bex: Avoid kernel panic caused by setting a very small bpf
buffer size.

Revision 1.168.6.1 / (download) - annotate - [select for diffs], Wed Sep 11 04:01:10 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: netbsd-6-0
CVS Tags: netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE
Changes since 1.168: +25 -20 lines
Diff to previous 1.168 (colored) next main 1.169 (colored)

Pull up following revision(s) (requested by spz in ticket #941):
	sys/net/bpf.c: revision 1.176
PR/48198: Peter Bex: Avoid kernel panic caused by setting a very small bpf
buffer size.

Revision 1.168.8.1 / (download) - annotate - [select for diffs], Wed Sep 11 04:00:54 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: netbsd-6-1
CVS Tags: netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE
Changes since 1.168: +25 -20 lines
Diff to previous 1.168 (colored) next main 1.169 (colored)

Pull up following revision(s) (requested by spz in ticket #941):
	sys/net/bpf.c: revision 1.176
PR/48198: Peter Bex: Avoid kernel panic caused by setting a very small bpf
buffer size.

Revision 1.168.2.1 / (download) - annotate - [select for diffs], Wed Sep 11 03:54:35 2013 UTC (10 years, 5 months ago) by msaitoh
Branch: netbsd-6
Changes since 1.168: +25 -20 lines
Diff to previous 1.168 (colored) next main 1.169 (colored)

Pull up following revision(s) (requested by spz in ticket #941):
	sys/net/bpf.c: revision 1.176
PR/48198: Peter Bex: Avoid kernel panic caused by setting a very small bpf
buffer size.

Revision 1.176 / (download) - annotate - [select for diffs], Mon Sep 9 20:53:51 2013 UTC (10 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.175: +25 -20 lines
Diff to previous 1.175 (colored)

PR/48198: Peter Bex: Avoid kernel panic caused by setting a very small bpf
buffer size.
XXX: Pullup -6

Revision 1.175 / (download) - annotate - [select for diffs], Fri Aug 30 15:00:08 2013 UTC (10 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.174: +3 -3 lines
Diff to previous 1.174 (colored)

bpf_filter: add a custom argument which can be passed to coprocessor routine.

Revision 1.174 / (download) - annotate - [select for diffs], Thu Aug 29 14:25:41 2013 UTC (10 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.173: +4 -3 lines
Diff to previous 1.173 (colored)

Implement BPF_COP/BPF_COPX instructions in the misc category (BPF_MISC)
which add a capability to call external functions in a predetermined way.

It can be thought as a BPF "coprocessor" -- a generic mechanism to offload
more complex packet inspection operations.  There is no default coprocessor
and this functionality is not targeted to the /dev/bpf.  This is primarily
targeted to the kernel subsystems, therefore there is no way to set a custom
coprocessor at the userlevel.

Discussed on: tech-net@
OK: core@

Revision 1.171.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:46 2012 UTC (11 years, 3 months ago) by tls
Branch: tls-maxphys
Changes since 1.171: +68 -33 lines
Diff to previous 1.171 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.166.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:42 2012 UTC (11 years, 3 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.166.2.1: +143 -87 lines
Diff to previous 1.166.2.1 (colored) to branchpoint 1.166 (colored)

sync with head

Revision 1.173 / (download) - annotate - [select for diffs], Sat Oct 27 22:36:14 2012 UTC (11 years, 4 months ago) by alnsn
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.172: +69 -3 lines
Diff to previous 1.172 (colored)

Add bpfjit and enable it for amd64.

Revision 1.172 / (download) - annotate - [select for diffs], Thu Sep 27 18:28:56 2012 UTC (11 years, 5 months ago) by alnsn
Branch: MAIN
Changes since 1.171: +4 -35 lines
Diff to previous 1.171 (colored)

Remove bpf_jit which was ported from FreeBSD recently.

It will soon be replaced with the new bpfjit kernel module.

Revision 1.171 / (download) - annotate - [select for diffs], Wed Aug 15 20:59:51 2012 UTC (11 years, 6 months ago) by alnsn
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.170: +12 -7 lines
Diff to previous 1.170 (colored)

Fix two bugs introduced by recent commit.

 - When handling contiguous buffer in _bpf_tap(), pass its real size
   rather than 0 to avoid reading packet data as mbuf struct on
   out-of-bounds loads.
 - Correctly pass pktlen and buflen arguments from bpf_deliver() to
   bpf_filter() to avoid reading mbuf struct as packet data.
   JIT case is still broken.

Also, test pointers againts NULL.

Revision 1.170 / (download) - annotate - [select for diffs], Thu Aug 2 00:40:51 2012 UTC (11 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.169: +4 -4 lines
Diff to previous 1.169 (colored)

Build fix for some ports.

Revision 1.169 / (download) - annotate - [select for diffs], Wed Aug 1 23:24:29 2012 UTC (11 years, 6 months ago) by rmind
Branch: MAIN
Changes since 1.168: +104 -88 lines
Diff to previous 1.168 (colored)

Add BPF JIT compiler, currently supporting amd64 and i386.  Code obtained
from FreeBSD.  Also, make few BPF fixes and simplifications while here.
Note that bpf_jit_enable is false for now.

OK dyoung@, some feedback from matt@

Revision 1.166.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:37 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.166: +8 -7 lines
Diff to previous 1.166 (colored)

sync with head

Revision 1.166.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:37 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.166: +8 -7 lines
Diff to previous 1.166 (colored) next main 1.167 (colored)

merge to -current.

Revision 1.168 / (download) - annotate - [select for diffs], Fri Dec 16 03:05:23 2011 UTC (12 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10
Branch point for: netbsd-6-1, netbsd-6-0, netbsd-6
Changes since 1.167: +7 -6 lines
Diff to previous 1.167 (colored)

make comment reflect reality

Revision 1.167 / (download) - annotate - [select for diffs], Thu Dec 15 22:20:26 2011 UTC (12 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.166: +3 -3 lines
Diff to previous 1.166 (colored)

don't leak mbufs.

Revision 1.166 / (download) - annotate - [select for diffs], Tue Aug 30 14:22:22 2011 UTC (12 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.165: +69 -28 lines
Diff to previous 1.165 (colored)

Provide netbsd32 compat for bpf. Beside the ioctls, the structure
returned to userland by read(2) also needs to be converted.
For this, the bpf descriptor is flagged as compat32 (or not) in the
open and ioctl functions (where the user process's pid is also updated
in the descriptor). When the bpf buffer is filled in, the 32bits or native
header is used depending on the information stored in the descriptor.

This won't work if a 64bit binary does the open and ioctls, and then
exec a 32bit program which will do the read. But this is very
unlikely to happen in real life ...

Tested on i386 and loongson; with these changes my loongson can run
dhclient and tcpdump with a n32 userland.

Revision 1.164.2.1 / (download) - annotate - [select for diffs], Thu Jun 23 14:20:25 2011 UTC (12 years, 8 months ago) by cherry
Branch: cherry-xenmp
Changes since 1.164: +2 -3 lines
Diff to previous 1.164 (colored) next main 1.165 (colored)

Catchup with rmind-uvmplock merge.

Revision 1.156.2.4 / (download) - annotate - [select for diffs], Sun Jun 12 00:24:30 2011 UTC (12 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.156.2.3: +0 -1 lines
Diff to previous 1.156.2.3 (colored) next main 1.157 (colored)

sync with head

Revision 1.165 / (download) - annotate - [select for diffs], Fri Jun 10 00:10:35 2011 UTC (12 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base
Changes since 1.164: +2 -3 lines
Diff to previous 1.164 (colored)

setting things once is enough.

Revision 1.160.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:52 2011 UTC (12 years, 8 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.160: +5 -4 lines
Diff to previous 1.160 (colored) next main 1.161 (colored)

Sync with HEAD.

Revision 1.156.2.3 / (download) - annotate - [select for diffs], Thu Apr 21 01:42:13 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.156.2.2: +3 -2 lines
Diff to previous 1.156.2.2 (colored)

sync with head

Revision 1.141.6.2 / (download) - annotate - [select for diffs], Tue Apr 5 06:10:50 2011 UTC (12 years, 10 months ago) by riz
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1
Branch point for: netbsd-5-2
Changes since 1.141.6.1: +4 -4 lines
Diff to previous 1.141.6.1 (colored) to branchpoint 1.141 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1587):
	sys/net/bpf.c: revision 1.163
Allocate buffers with (M_WAITOK | M_CANFAIL) instead of M_NOWAIT.
M_NOWAIT cause dhcpd on a low-memory server with lots of interfaces to
occasionally fail to start with ENOBUFS; (M_WAITOK | M_CANFAIL) seems to
fix this.
Tested on 3 different dhcp servers.

Revision 1.164 / (download) - annotate - [select for diffs], Wed Mar 30 21:34:08 2011 UTC (12 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: cherry-xenmp-base
Branch point for: cherry-xenmp
Changes since 1.163: +3 -2 lines
Diff to previous 1.163 (colored)

lib/44807: something broken in stat(2), return that we are a character
device in st_mode.

Revision 1.163 / (download) - annotate - [select for diffs], Wed Mar 30 18:04:27 2011 UTC (12 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.162: +4 -4 lines
Diff to previous 1.162 (colored)

Allocate buffers with (M_WAITOK | M_CANFAIL) instead of M_NOWAIT.
M_NOWAIT cause dhcpd on a low-memory server with lots of interfaces to
occasionally fail to start with ENOBUFS; (M_WAITOK | M_CANFAIL) seems to
fix this.
Tested on 3 different dhcp servers.

Revision 1.156.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:50 2011 UTC (12 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.156.2.1: +23 -19 lines
Diff to previous 1.156.2.1 (colored)

sync with head

Revision 1.160.4.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:20:01 2011 UTC (13 years ago) by bouyer
Branch: bouyer-quota2
Changes since 1.160: +2 -2 lines
Diff to previous 1.160 (colored) next main 1.161 (colored)

Sync with HEAD

Revision 1.162 / (download) - annotate - [select for diffs], Sat Jan 22 19:12:58 2011 UTC (13 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: bouyer-quota2-nbase, bouyer-quota2-base
Changes since 1.161: +4 -3 lines
Diff to previous 1.161 (colored)

undo previous. Read the diff wrong.

Revision 1.161 / (download) - annotate - [select for diffs], Sat Jan 22 16:54:48 2011 UTC (13 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.160: +3 -4 lines
Diff to previous 1.160 (colored)

fix comment

Revision 1.160 / (download) - annotate - [select for diffs], Sun Jan 2 21:03:45 2011 UTC (13 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.159: +13 -13 lines
Diff to previous 1.159 (colored)

kern/44310: Alexander Nasonov: write to /dev/bpf truncates size_t to int

Revision 1.159 / (download) - annotate - [select for diffs], Wed Dec 8 17:10:13 2010 UTC (13 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231
Changes since 1.158: +12 -8 lines
Diff to previous 1.158 (colored)

linkset no more

Revision 1.139.2.3 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:53 2010 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139.2.2: +90 -47 lines
Diff to previous 1.139.2.2 (colored) to branchpoint 1.139 (colored) next main 1.140 (colored)

sync with head.

Revision 1.156.2.1 / (download) - annotate - [select for diffs], Sun May 30 05:18:00 2010 UTC (13 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.156: +42 -45 lines
Diff to previous 1.156 (colored)

sync with head

Revision 1.155.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:18 2010 UTC (13 years, 10 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.155: +90 -47 lines
Diff to previous 1.155 (colored) next main 1.156 (colored)

Sync with HEAD.

Revision 1.158 / (download) - annotate - [select for diffs], Wed Apr 14 13:31:33 2010 UTC (13 years, 10 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1
Changes since 1.157: +20 -4 lines
Diff to previous 1.157 (colored)

Add a little comment on how bpf can be made unloadable, per pointer from ad.

Revision 1.157 / (download) - annotate - [select for diffs], Mon Apr 5 07:22:22 2010 UTC (13 years, 10 months ago) by joerg
Branch: MAIN
Changes since 1.156: +24 -43 lines
Diff to previous 1.156 (colored)

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.

Revision 1.156 / (download) - annotate - [select for diffs], Sat Mar 13 20:38:48 2010 UTC (13 years, 11 months ago) by christos
Branch: MAIN
Branch point for: rmind-uvmplock
Changes since 1.155: +50 -4 lines
Diff to previous 1.155 (colored)

add BIOC{G,S}FEEDBACK which allows one to receive injected outgoing packets
via bpf.

Revision 1.139.2.2 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:26 2010 UTC (13 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139.2.1: +103 -61 lines
Diff to previous 1.139.2.1 (colored) to branchpoint 1.139 (colored)

sync with head

Revision 1.155 / (download) - annotate - [select for diffs], Tue Jan 26 01:06:23 2010 UTC (14 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.154: +3 -2 lines
Diff to previous 1.154 (colored)

Include sys/atomic.h now that it's used but gets stealth-included
only on some archs.

Revision 1.154 / (download) - annotate - [select for diffs], Mon Jan 25 22:18:17 2010 UTC (14 years, 1 month ago) by pooka
Branch: MAIN
Changes since 1.153: +57 -12 lines
Diff to previous 1.153 (colored)

Make bpf dynamically loadable.

Revision 1.153 / (download) - annotate - [select for diffs], Tue Jan 19 22:08:00 2010 UTC (14 years, 1 month ago) by pooka
Branch: MAIN
Changes since 1.152: +35 -27 lines
Diff to previous 1.152 (colored)

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.

Revision 1.152 / (download) - annotate - [select for diffs], Sun Jan 17 19:45:06 2010 UTC (14 years, 1 month ago) by pooka
Branch: MAIN
Changes since 1.151: +16 -20 lines
Diff to previous 1.151 (colored)

Forward declare struct bpf_if and use that as the type for bpf_if
instead of "void *".  Buys us oo times the type-safety for 0 times
the price.
(no functional change)

Revision 1.151 / (download) - annotate - [select for diffs], Fri Jan 15 22:16:46 2010 UTC (14 years, 1 month ago) by pooka
Branch: MAIN
Changes since 1.150: +3 -10 lines
Diff to previous 1.150 (colored)

* remove just-for-kicks locking
* KNF
* remove outdated comment (quite a funny one to read in 2010, though)

Revision 1.150 / (download) - annotate - [select for diffs], Sun Dec 20 09:36:06 2009 UTC (14 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.149: +3 -3 lines
Diff to previous 1.149 (colored)

If a multithreaded app closes an fd while another thread is blocked in
read/write/accept, then the expectation is that the blocked thread will
exit and the close complete.
Since only one fd is affected, but many fd can refer to the same file,
the close code can only request the fs code unblock with ERESTART.
Fixed for pipes and sockets, ERESTART will only be generated after such
a close - so there should be no change for other programs.
Also rename fo_abort() to fo_restart() (this used to be fo_drain()).
Fixes PR/26567

Revision 1.149 / (download) - annotate - [select for diffs], Wed Dec 9 21:32:59 2009 UTC (14 years, 2 months ago) by dsl
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.148: +3 -3 lines
Diff to previous 1.148 (colored)

Rename fo_drain() to fo_abort(), 'drain' is used to mean 'wait for output
do drain' in many places, whereas fo_drain() was called in order to force
blocking read()/write() etc calls to return to userspace so that a close()
call from a different thread can complete.
In the sockets code comment out the broken code in the inner function,
it was being called from compat code.

Revision 1.148 / (download) - annotate - [select for diffs], Mon Nov 23 02:13:48 2009 UTC (14 years, 3 months ago) by rmind
Branch: MAIN
Changes since 1.147: +2 -3 lines
Diff to previous 1.147 (colored)

Remove some unecessary includes sys/user.h header.

Revision 1.147 / (download) - annotate - [select for diffs], Mon Oct 5 17:58:15 2009 UTC (14 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.146: +4 -4 lines
Diff to previous 1.146 (colored)

add the error from ifpromisc to the panic.

Revision 1.142.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:22:19 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.142: +37 -15 lines
Diff to previous 1.142 (colored) next main 1.143 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.139.2.1 / (download) - annotate - [select for diffs], Mon May 4 08:14:14 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.139: +115 -32 lines
Diff to previous 1.139 (colored)

sync with head.

Revision 1.141.4.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:16 2009 UTC (14 years, 10 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.141.4.1: +37 -15 lines
Diff to previous 1.141.4.1 (colored) to branchpoint 1.141 (colored) next main 1.142 (colored)

Sync with HEAD.

Revision 1.146 / (download) - annotate - [select for diffs], Sat Apr 11 23:05:26 2009 UTC (14 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Changes since 1.145: +4 -2 lines
Diff to previous 1.145 (colored)

Fix locking as Andy explained. Also fill in uid and gid like sys_pipe did.

Revision 1.145 / (download) - annotate - [select for diffs], Sat Apr 11 15:47:33 2009 UTC (14 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.144: +24 -3 lines
Diff to previous 1.144 (colored)

Fix PR/37878 and PR/37550: Provide stat(2) for all devices and don't use
fbadop_stat.

Revision 1.141.6.1 / (download) - annotate - [select for diffs], Sat Apr 4 23:36:28 2009 UTC (14 years, 10 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Branch point for: netbsd-5-1
Changes since 1.141: +11 -10 lines
Diff to previous 1.141 (colored)

Pull up following revision(s) (requested by ad in ticket #661):
	sys/arch/xen/xen/xenevt.c: revision 1.32
	sys/compat/svr4/svr4_net.c: revision 1.56
	sys/compat/svr4_32/svr4_32_net.c: revision 1.19
	sys/dev/dmover/dmover_io.c: revision 1.32
	sys/dev/putter/putter.c: revision 1.21
	sys/kern/kern_descrip.c: revision 1.190
	sys/kern/kern_drvctl.c: revision 1.23
	sys/kern/kern_event.c: revision 1.64
	sys/kern/sys_mqueue.c: revision 1.14
	sys/kern/sys_pipe.c: revision 1.109
	sys/kern/sys_socket.c: revision 1.59
	sys/kern/uipc_syscalls.c: revision 1.136
	sys/kern/vfs_vnops.c: revision 1.164
	sys/kern/uipc_socket.c: revision 1.188
	sys/net/bpf.c: revision 1.144
	sys/net/if_tap.c: revision 1.55
	sys/opencrypto/cryptodev.c: revision 1.47
	sys/sys/file.h: revision 1.67
	sys/sys/param.h: patch
	sys/sys/socketvar.h: revision 1.119
Add fileops::fo_drain(), to be called from fd_close() when there is more
than one active reference to a file descriptor. It should dislodge threads
sleeping while holding a reference to the descriptor. Implemented only for
sockets but should be extended to pipes, fifos, etc.
Fixes the case of a multithreaded process doing something like the
following, which would have hung until the process got a signal.
thr0	accept(fd, ...)
thr1	close(fd)

Revision 1.144 / (download) - annotate - [select for diffs], Sat Apr 4 10:12:51 2009 UTC (14 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.143: +11 -10 lines
Diff to previous 1.143 (colored)

Add fileops::fo_drain(), to be called from fd_close() when there is more
than one active reference to a file descriptor. It should dislodge threads
sleeping while holding a reference to the descriptor. Implemented only for
sockets but should be extended to pipes, fifos, etc.

Fixes the case of a multithreaded process doing something like the
following, which would have hung until the process got a signal.

thr0	accept(fd, ...)
thr1	close(fd)

Revision 1.143 / (download) - annotate - [select for diffs], Wed Mar 11 05:55:22 2009 UTC (14 years, 11 months ago) by mrg
Branch: MAIN
Changes since 1.142: +5 -7 lines
Diff to previous 1.142 (colored)

like KERN_FILE2: *do* update "needed" when there is no count.  we want
userland to know what sort of size to provide..

while here, slightly normalise the previous to init_sysctl.c.

Revision 1.141.4.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:20:11 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.141: +42 -12 lines
Diff to previous 1.141 (colored)

Sync with HEAD.

Revision 1.133.6.5 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:30 2009 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.133.6.4: +40 -10 lines
Diff to previous 1.133.6.4 (colored) to branchpoint 1.133 (colored) next main 1.134 (colored)

Sync with HEAD.

Revision 1.142 / (download) - annotate - [select for diffs], Sun Jan 11 02:45:54 2009 UTC (15 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.141: +42 -12 lines
Diff to previous 1.141 (colored)

merge christos-time_t

Revision 1.137.2.3 / (download) - annotate - [select for diffs], Sun Dec 28 20:53:44 2008 UTC (15 years, 2 months ago) by christos
Branch: christos-time_t
Changes since 1.137.2.2: +3 -3 lines
Diff to previous 1.137.2.2 (colored) to branchpoint 1.137 (colored) next main 1.138 (colored)

back to usecs now for source compatibility

Revision 1.137.2.2 / (download) - annotate - [select for diffs], Sat Nov 1 21:22:28 2008 UTC (15 years, 3 months ago) by christos
Branch: christos-time_t
Changes since 1.137.2.1: +66 -25 lines
Diff to previous 1.137.2.1 (colored) to branchpoint 1.137 (colored)

Sync with head.

Revision 1.133.6.4 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:18 2008 UTC (15 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.133.6.3: +1 -3 lines
Diff to previous 1.133.6.3 (colored) to branchpoint 1.133 (colored)

Sync with HEAD.

Revision 1.139.4.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:57 2008 UTC (15 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.139: +40 -9 lines
Diff to previous 1.139 (colored) next main 1.140 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.140.2.1 / (download) - annotate - [select for diffs], Wed Jun 18 16:33:50 2008 UTC (15 years, 8 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.140: +3 -5 lines
Diff to previous 1.140 (colored) next main 1.141 (colored)

Sync with head.

Revision 1.137.4.3 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:12 2008 UTC (15 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.137.4.2: +3 -5 lines
Diff to previous 1.137.4.2 (colored) to branchpoint 1.137 (colored) next main 1.138 (colored)

sync with head.

Revision 1.141 / (download) - annotate - [select for diffs], Sun Jun 15 16:37:21 2008 UTC (15 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, christos-time_t-nbase, christos-time_t-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.140: +3 -5 lines
Diff to previous 1.140 (colored)

- add if_alloc (ours just mallocs), and if_initname and use them (from FreeBSD)
- kill memsets where M_ZERO can be used.

Revision 1.137.4.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:47 2008 UTC (15 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.137.4.1: +39 -6 lines
Diff to previous 1.137.4.1 (colored) to branchpoint 1.137 (colored)

sync with head

Revision 1.133.6.3 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:21 2008 UTC (15 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.133.6.2: +63 -20 lines
Diff to previous 1.133.6.2 (colored) to branchpoint 1.133 (colored)

Sync with HEAD.

Revision 1.140 / (download) - annotate - [select for diffs], Wed May 21 13:48:52 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3
Branch point for: simonb-wapbl
Changes since 1.139: +39 -6 lines
Diff to previous 1.139 (colored)

Acquire kernel_lock in the bpf fileops.

Revision 1.137.4.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:26 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.137: +28 -18 lines
Diff to previous 1.137 (colored)

sync with head.

Revision 1.139 / (download) - annotate - [select for diffs], Thu Apr 24 15:35:30 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2, yamt-nfs-mp-base, hpcarm-cleanup-nbase
Branch point for: yamt-nfs-mp, wrstuden-revivesa
Changes since 1.138: +15 -4 lines
Diff to previous 1.138 (colored)

Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.

Revision 1.138 / (download) - annotate - [select for diffs], Sun Apr 20 15:27:10 2008 UTC (15 years, 10 months ago) by scw
Branch: MAIN
Changes since 1.137: +15 -16 lines
Diff to previous 1.137 (colored)

Pull in a couple of fixes from FreeBSD, the first of which addresses a
failure of wpa_supplicant(8) to re-key promptly, as reported in
http://mail-index.netbsd.org/tech-net/2008/04/18/msg000459.html

- Make bpf's read timeout work more correctly with select/poll.

- A fix for catchpacket() which delays calling bpf_wakeup() until
  the state has been updated.

Revision 1.133.6.2 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:07 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.133.6.1: +29 -26 lines
Diff to previous 1.133.6.1 (colored) to branchpoint 1.133 (colored)

Sync with HEAD.

Revision 1.137.2.1 / (download) - annotate - [select for diffs], Sat Mar 29 20:47:01 2008 UTC (15 years, 11 months ago) by christos
Branch: christos-time_t
Changes since 1.137: +42 -12 lines
Diff to previous 1.137 (colored)

Welcome to the time_t=long long dev_t=uint64_t branch.

Revision 1.133.6.1 / (download) - annotate - [select for diffs], Sat Mar 29 16:17:58 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.133: +9 -2 lines
Diff to previous 1.133 (colored)

- etc/devfsd.conf: Add some rules to give nodes like /dev/tty and
  		   /dev/null better default modes, i.e. 0666.

- sbin/init: Run devfsd -s before going to multiuser.

- sys/arch: Provide arm32, i386, sparc with a mem_init() function to request
  	    device nodes for /dev/null, /dev/zero, etc.

- sys/dev: Convert rnd, wd, agp, raid, cd, sd, wsdisplay, wskbd, wsmouse,
	   wsmux, tty, bpf, swap to devfs New World Order.

- sys/fs/devfs: Make the visibility attribute of device nodes configurable.
	        Also provide a function to mount a devfs on boot.

- sys/kern: Add a new boot flag, -n. This disables devfs support. Unless
	    the -n flag is specified the kernel will mount a devfs file
	    system on boot.

Revision 1.137 / (download) - annotate - [select for diffs], Wed Mar 26 02:21:52 2008 UTC (15 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, ad-socklock-base1
Branch point for: yamt-pf42, christos-time_t
Changes since 1.136: +15 -13 lines
Diff to previous 1.136 (colored)

- put const back, no reason to modify the prototype.
1. Please don't cast function pointers to (void *), use the full function
   prototype cast; this is for archs where a function pointer is not a regular
   pointer.
2. Compare pointers to NULL not 0.

Revision 1.136 / (download) - annotate - [select for diffs], Mon Mar 24 12:24:37 2008 UTC (15 years, 11 months ago) by yamt
Branch: MAIN
Changes since 1.135: +12 -13 lines
Diff to previous 1.135 (colored)

merge yamt-lazymbuf branch.

Revision 1.109.2.9 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:09 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109.2.8: +16 -16 lines
Diff to previous 1.109.2.8 (colored) next main 1.110 (colored)

sync with head.

Revision 1.133.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:23 2008 UTC (15 years, 11 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.133: +6 -4 lines
Diff to previous 1.133 (colored) next main 1.134 (colored)

sync with head.

Revision 1.130.8.2 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:04 2008 UTC (15 years, 11 months ago) by matt
Branch: matt-armv6
Changes since 1.130.8.1: +12 -10 lines
Diff to previous 1.130.8.1 (colored) to branchpoint 1.130 (colored) next main 1.131 (colored)

sync with HEAD

Revision 1.135 / (download) - annotate - [select for diffs], Fri Mar 21 21:55:00 2008 UTC (15 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14
Changes since 1.134: +16 -16 lines
Diff to previous 1.134 (colored)

Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.

Revision 1.109.2.8 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:41 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109.2.7: +6 -4 lines
Diff to previous 1.109.2.7 (colored)

sync with head.

Revision 1.134 / (download) - annotate - [select for diffs], Sat Mar 1 14:16:52 2008 UTC (16 years ago) by rmind
Branch: MAIN
CVS Tags: matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base
Changes since 1.133: +6 -4 lines
Diff to previous 1.133 (colored)

Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>

Revision 1.109.2.7 / (download) - annotate - [select for diffs], Wed Feb 27 08:37:00 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109.2.6: +8 -8 lines
Diff to previous 1.109.2.6 (colored)

sync with head.

Revision 1.133 / (download) - annotate - [select for diffs], Wed Feb 20 17:05:52 2008 UTC (16 years ago) by matt
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.132: +8 -8 lines
Diff to previous 1.132 (colored)

s/u_\(int[0-9]*_t\)/u\1/g
(change u_int*_t to uint*_t)

Revision 1.109.2.6 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:59 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109.2.5: +3 -3 lines
Diff to previous 1.109.2.5 (colored)

sync with head

Revision 1.130.8.1 / (download) - annotate - [select for diffs], Wed Jan 9 01:57:07 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.130: +4 -4 lines
Diff to previous 1.130 (colored)

sync with HEAD

Revision 1.131.4.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:56:59 2008 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored) next main 1.132 (colored)

Sync with HEAD

Revision 1.130.14.2 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:26 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.130.14.1: +3 -3 lines
Diff to previous 1.130.14.1 (colored) to branchpoint 1.130 (colored) next main 1.131 (colored)

Sync with HEAD.

Revision 1.130.16.2 / (download) - annotate - [select for diffs], Wed Dec 26 21:39:50 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.130.16.1: +3 -3 lines
Diff to previous 1.130.16.1 (colored) to branchpoint 1.130 (colored) next main 1.131 (colored)

Sync with head.

Revision 1.132 / (download) - annotate - [select for diffs], Thu Dec 20 18:13:26 2007 UTC (16 years, 2 months ago) by dyoung
Branch: MAIN
CVS Tags: vmlocking2-base3, mjf-devfs-base, matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored)

Use LIST_FOREACH().

Revision 1.130.6.1 / (download) - annotate - [select for diffs], Sun Dec 9 19:38:33 2007 UTC (16 years, 2 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored) next main 1.131 (colored)

Sync with HEAD.

Revision 1.130.14.1 / (download) - annotate - [select for diffs], Sat Dec 8 18:21:05 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored)

Sync with HEAD.

Revision 1.130.16.1 / (download) - annotate - [select for diffs], Sat Dec 8 17:57:52 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored)

Sync with head.

Revision 1.109.2.5 / (download) - annotate - [select for diffs], Fri Dec 7 17:34:14 2007 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109.2.4: +3 -3 lines
Diff to previous 1.109.2.4 (colored)

sync with head

Revision 1.131 / (download) - annotate - [select for diffs], Wed Dec 5 17:20:00 2007 UTC (16 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored)

Do not "return 1" from kqfilter for errors.  That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.

Revision 1.109.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:42:00 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109.2.3: +31 -23 lines
Diff to previous 1.109.2.3 (colored)

sync with head.

Revision 1.126.2.5 / (download) - annotate - [select for diffs], Sun Jul 15 15:52:58 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.126.2.4: +6 -6 lines
Diff to previous 1.126.2.4 (colored) to branchpoint 1.126 (colored) next main 1.127 (colored)

Sync with head.

Revision 1.126.2.4 / (download) - annotate - [select for diffs], Sun Jul 15 13:27:52 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.126.2.3: +8 -8 lines
Diff to previous 1.126.2.3 (colored) to branchpoint 1.126 (colored)

Sync with head.

Revision 1.130 / (download) - annotate - [select for diffs], Wed Jul 11 21:26:53 2007 UTC (16 years, 7 months ago) by xtraeme
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking2-base1, vmlocking-nbase, vmlocking-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, jmcneill-base, hpcarm-cleanup, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: vmlocking2, mjf-devfs, matt-armv6, jmcneill-pm
Changes since 1.129: +12 -12 lines
Diff to previous 1.129 (colored)

Replace a simple lock with a mutex and make it static (as it's only used
on this file). Ok by ad@.

Revision 1.126.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:10:51 2007 UTC (16 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.126: +18 -10 lines
Diff to previous 1.126 (colored) next main 1.127 (colored)

Sync with head.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:59 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: mjf-ufs-trans-base
Changes since 1.128: +4 -5 lines
Diff to previous 1.128 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.126.2.3 / (download) - annotate - [select for diffs], Sun Jul 1 21:50:41 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.126.2.2: +4 -3 lines
Diff to previous 1.126.2.2 (colored) to branchpoint 1.126 (colored)

Adapt to callout API change.

Revision 1.126.2.2 / (download) - annotate - [select for diffs], Sat Jun 9 23:58:09 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.126.2.1: +16 -7 lines
Diff to previous 1.126.2.1 (colored) to branchpoint 1.126 (colored)

Sync with head.

Revision 1.128 / (download) - annotate - [select for diffs], Wed May 30 21:02:03 2007 UTC (16 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.127: +2 -8 lines
Diff to previous 1.127 (colored)

Move the nasty ifdefs in one place. Requested by ad and dyoung.

Revision 1.127 / (download) - annotate - [select for diffs], Tue May 29 21:32:29 2007 UTC (16 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.126: +21 -6 lines
Diff to previous 1.126 (colored)

Add a sockaddr_storage member to "struct ifreq" maintaining backwards
compatibility with the older ioctls. This avoids stack smashing and
abuse of "struct sockaddr" when ioctls placed "struct sockaddr_foo's" that
were longer than "struct sockaddr".
XXX: Some of the emulations might be broken; I tried to add code for
them but I did not test them.

Revision 1.126.2.1 / (download) - annotate - [select for diffs], Tue Apr 10 00:22:12 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.126: +2 -4 lines
Diff to previous 1.126 (colored)

Changes to select/poll:

- Make them MP safe and decouple from the proc locks.
- selwakeup: don't call p_find, or traverse per-proc LWP lists (ouch).
- selwakeup: don't lock the sleep queue unless we need to.

Revision 1.125.4.1 / (download) - annotate - [select for diffs], Mon Mar 12 05:59:09 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.125: +5 -5 lines
Diff to previous 1.125 (colored) next main 1.126 (colored)

Sync with HEAD.

Revision 1.126 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:14 2007 UTC (16 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.125: +5 -5 lines
Diff to previous 1.125 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.109.2.3 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:20 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109.2.2: +43 -27 lines
Diff to previous 1.109.2.2 (colored)

sync with head.

Revision 1.122.4.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:19:00 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.122.4.1: +14 -12 lines
Diff to previous 1.122.4.1 (colored) to branchpoint 1.122 (colored) next main 1.123 (colored)

sync with head.

Revision 1.122.2.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:29 2006 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.122: +9 -7 lines
Diff to previous 1.122 (colored) next main 1.123 (colored)

Sync with head.

Revision 1.125 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:40 2006 UTC (17 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Changes since 1.124: +9 -9 lines
Diff to previous 1.124 (colored)

__unused removal on arguments; approved by core.

Revision 1.124 / (download) - annotate - [select for diffs], Wed Oct 25 20:28:45 2006 UTC (17 years, 4 months ago) by elad
Branch: MAIN
Changes since 1.123: +7 -5 lines
Diff to previous 1.123 (colored)

Kill some KAUTH_GENERIC_ISSUSER uses.

Revision 1.122.4.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:24 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.122: +9 -9 lines
Diff to previous 1.122 (colored)

sync with head

Revision 1.123 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:27 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.122: +9 -9 lines
Diff to previous 1.122 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.115.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:58:06 2006 UTC (17 years, 5 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.115: +46 -26 lines
Diff to previous 1.115 (colored) next main 1.116 (colored)

sync with head

Revision 1.115.8.3 / (download) - annotate - [select for diffs], Sun Sep 3 15:25:35 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.115.8.2: +3 -3 lines
Diff to previous 1.115.8.2 (colored) to branchpoint 1.115 (colored) next main 1.116 (colored)

sync with head.

Revision 1.122 / (download) - annotate - [select for diffs], Mon Aug 28 00:09:28 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.121: +3 -3 lines
Diff to previous 1.121 (colored)

add missing initializer

Revision 1.115.8.2 / (download) - annotate - [select for diffs], Fri Aug 11 15:46:14 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.115.8.1: +38 -23 lines
Diff to previous 1.115.8.1 (colored) to branchpoint 1.115 (colored)

sync with head

Revision 1.121 / (download) - annotate - [select for diffs], Fri Aug 4 23:18:53 2006 UTC (17 years, 6 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.120: +3 -3 lines
Diff to previous 1.120 (colored)

Fix typo in comment

Revision 1.120 / (download) - annotate - [select for diffs], Wed Jul 26 13:54:13 2006 UTC (17 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.119: +32 -16 lines
Diff to previous 1.119 (colored)

Patch from Dheeraj S, inspired by the following FreeBSD change:

Rather than calling mircotime() in catchpacket(), make catchpacket()
take a timeval indicating when the packet was captured. Move
microtime() to the calling functions and grab the timestamp as soon
as we know that we're going to call catchpacket at least once.

This means that we call microtime() once per matched packet, as
opposed to once per matched packet per bpf listener. It also means
that we return the same timestamp to all bpf listeners, rather than
slightly different ones.

It would be more accurate to call microtime() even earlier for all
packets, as you have to grab (1+#listener) locks before you can
determine if the packet will be logged. You could always grab a
timestamp before the locks, but microtime() can be costly, so this
didn't seem like a good idea.

(I guess most ethernet interfaces will have a bpf listener these
days because of dhclient. That means that we could be doing two bpf
locks on most packets going through the interface.)

Revision 1.119 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:12 2006 UTC (17 years, 7 months ago) by ad
Branch: MAIN
Changes since 1.118: +5 -6 lines
Diff to previous 1.118 (colored)

Use the LWP cached credentials where sane.

Revision 1.117.4.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:49:57 2006 UTC (17 years, 7 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.117: +4 -4 lines
Diff to previous 1.117 (colored) next main 1.118 (colored)

Merge from HEAD.

Revision 1.118 / (download) - annotate - [select for diffs], Tue Jun 27 10:45:09 2006 UTC (17 years, 8 months ago) by tron
Branch: MAIN
Changes since 1.117: +4 -4 lines
Diff to previous 1.117 (colored)

Make this build with GCC 4.x.

Revision 1.109.2.2 / (download) - annotate - [select for diffs], Wed Jun 21 15:10:26 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109.2.1: +168 -88 lines
Diff to previous 1.109.2.1 (colored)

sync with head.

Revision 1.115.6.1 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:36 2006 UTC (17 years, 9 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.115: +12 -7 lines
Diff to previous 1.115 (colored) next main 1.116 (colored)

Sync with head.

Revision 1.115.12.1 / (download) - annotate - [select for diffs], Wed May 24 15:50:43 2006 UTC (17 years, 9 months ago) by tron
Branch: peter-altq
Changes since 1.115: +12 -7 lines
Diff to previous 1.115 (colored) next main 1.116 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.115.8.1 / (download) - annotate - [select for diffs], Wed May 24 10:58:56 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.115: +12 -7 lines
Diff to previous 1.115 (colored)

sync with head.

Revision 1.117 / (download) - annotate - [select for diffs], Sun May 14 21:19:33 2006 UTC (17 years, 9 months ago) by elad
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base, chap-midi
Branch point for: gdamore-uart
Changes since 1.116: +10 -7 lines
Diff to previous 1.116 (colored)

integrate kauth.

Revision 1.115.10.4 / (download) - annotate - [select for diffs], Thu May 11 23:31:08 2006 UTC (17 years, 9 months ago) by elad
Branch: elad-kernelauth
Changes since 1.115.10.3: +4 -2 lines
Diff to previous 1.115.10.3 (colored) to branchpoint 1.115 (colored) next main 1.116 (colored)

sync with head

Revision 1.116 / (download) - annotate - [select for diffs], Wed May 10 21:53:18 2006 UTC (17 years, 9 months ago) by mrg
Branch: MAIN
CVS Tags: elad-kernelauth-base
Changes since 1.115: +4 -2 lines
Diff to previous 1.115 (colored)

quell GCC 4.1 uninitialised variable warnings.

XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..

Revision 1.115.10.3 / (download) - annotate - [select for diffs], Sat May 6 23:31:58 2006 UTC (17 years, 9 months ago) by christos
Branch: elad-kernelauth
Changes since 1.115.10.2: +3 -2 lines
Diff to previous 1.115.10.2 (colored) to branchpoint 1.115 (colored)

- Move kauth_cred_t declaration to <sys/types.h>
- Cleanup struct ucred; forward declarations that are unused.
- Don't include <sys/kauth.h> in any header, but include it in the c files
  that need it.

Approved by core.

Revision 1.115.10.2 / (download) - annotate - [select for diffs], Fri Mar 10 15:05:22 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.115.10.1: +3 -3 lines
Diff to previous 1.115.10.1 (colored) to branchpoint 1.115 (colored)

generic_authorize() -> kauth_authorize_generic().

Revision 1.115.10.1 / (download) - annotate - [select for diffs], Wed Mar 8 01:11:55 2006 UTC (17 years, 11 months ago) by elad
Branch: elad-kernelauth
Changes since 1.115: +9 -7 lines
Diff to previous 1.115 (colored)

Adapt to kernel authorization KPI.

Revision 1.115 / (download) - annotate - [select for diffs], Mon Dec 26 15:45:48 2005 UTC (18 years, 2 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.114: +2 -40 lines
Diff to previous 1.114 (colored)

Kill BPF_KERN_FILTER. Seems like it died with the new pppd import.
No replies from tech-kern@, but who introduced this option 8 years ago
(Christos) said it's ok to remove it.

Revision 1.114 / (download) - annotate - [select for diffs], Sat Dec 24 20:45:09 2005 UTC (18 years, 2 months ago) by perry
Branch: MAIN
Changes since 1.113: +5 -5 lines
Diff to previous 1.113 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.113 / (download) - annotate - [select for diffs], Wed Dec 14 22:46:52 2005 UTC (18 years, 2 months ago) by rpaulo
Branch: MAIN
Changes since 1.112: +4 -4 lines
Diff to previous 1.112 (colored)

Correct typo in comments.

Revision 1.112 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:51 2005 UTC (18 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.111: +18 -18 lines
Diff to previous 1.111 (colored)

merge ktrace-lwp.

Revision 1.82.2.10 / (download) - annotate - [select for diffs], Thu Nov 10 14:10:32 2005 UTC (18 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.9: +149 -34 lines
Diff to previous 1.82.2.9 (colored) next main 1.83 (colored)

Sync with HEAD. Here we go again...

Revision 1.111 / (download) - annotate - [select for diffs], Mon Sep 5 18:32:24 2005 UTC (18 years, 5 months ago) by rpaulo
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.110: +15 -30 lines
Diff to previous 1.110 (colored)

Use ANSI function declarations everywhere and a consistent indentation on
them.

Revision 1.110 / (download) - annotate - [select for diffs], Thu Aug 4 19:30:47 2005 UTC (18 years, 6 months ago) by rpaulo
Branch: MAIN
Changes since 1.109: +132 -4 lines
Diff to previous 1.109 (colored)

Implemented the kernel part of BPF statistics and BPF peers, net.bpf.stats
and net.bpf.peers sysctls respectively.

A new structure was added to describe the external (user viewable)
representation of a BPF file; a new entry was added to the bpf_d
structure to store the PID of the calling process; a simple_lock was added
to protect the insert/removal from the net.bpf.peers sysctl handler.

This idea came from FreeBSD (Christian S.J. Peron) but while it is
implemented with sysctl's it differs a bit.

Reviewed by: christos@ and atatat@ (who gave me the tip for the net.bpf.peers
sysctl helper function).

Revision 1.109.2.1 / (download) - annotate - [select for diffs], Thu Jul 7 12:03:16 2005 UTC (18 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.109: +12 -12 lines
Diff to previous 1.109 (colored)

de-constify mbuf.

Revision 1.109 / (download) - annotate - [select for diffs], Wed Jun 22 10:36:16 2005 UTC (18 years, 8 months ago) by peter
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.108: +5 -3 lines
Diff to previous 1.108 (colored)

Missing m_freem() in bpf_write. PR/29138.

Revision 1.108 / (download) - annotate - [select for diffs], Mon Jun 20 02:49:19 2005 UTC (18 years, 8 months ago) by atatat
Branch: MAIN
Changes since 1.107: +3 -3 lines
Diff to previous 1.107 (colored)

Change the rest of the sysctl subsystem to use const consistently.
The __UNCONST macro is now used only where necessary and the RW macros
are gone.  Most of the changes here are consumers of the
sysctl_createv(9) interface that now takes a pair of const pointers
which used not to be.

Revision 1.105.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:31 2005 UTC (18 years, 10 months ago) by kent
Branch: kent-audio2
Changes since 1.105: +4 -4 lines
Diff to previous 1.105 (colored) next main 1.106 (colored)

sync with -current

Revision 1.105.6.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:31 2005 UTC (18 years, 11 months ago) by yamt
Branch: yamt-km
Changes since 1.105: +4 -4 lines
Diff to previous 1.105 (colored) next main 1.106 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.82.2.9 / (download) - annotate - [select for diffs], Fri Mar 4 16:52:56 2005 UTC (18 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.8: +3 -3 lines
Diff to previous 1.82.2.8 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.107 / (download) - annotate - [select for diffs], Sat Feb 26 22:45:09 2005 UTC (19 years ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, kent-audio2-base
Changes since 1.106: +3 -3 lines
Diff to previous 1.106 (colored)

nuke trailing whitespace

Revision 1.82.2.8 / (download) - annotate - [select for diffs], Tue Feb 15 21:33:29 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.7: +3 -3 lines
Diff to previous 1.82.2.7 (colored)

Sync with HEAD.

Revision 1.106 / (download) - annotate - [select for diffs], Sat Feb 12 23:14:03 2005 UTC (19 years ago) by christos
Branch: MAIN
Changes since 1.105: +3 -3 lines
Diff to previous 1.105 (colored)

pass the flag to fdclone.

Revision 1.82.2.7 / (download) - annotate - [select for diffs], Sat Dec 18 09:32:50 2004 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.6: +66 -78 lines
Diff to previous 1.82.2.6 (colored)

Sync with HEAD.

Revision 1.105 / (download) - annotate - [select for diffs], Tue Nov 30 04:28:43 2004 UTC (19 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.104: +66 -78 lines
Diff to previous 1.104 (colored)

Clonify bpf. I am not changing /dev/bpfX -> /dev/bpf until all userland
programs have been fixed.

Revision 1.82.2.6 / (download) - annotate - [select for diffs], Tue Sep 21 13:36:35 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.5: +11 -11 lines
Diff to previous 1.82.2.5 (colored)

Fix the sync with head I botched.

Revision 1.82.2.5 / (download) - annotate - [select for diffs], Sat Sep 18 14:54:15 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.4: +11 -11 lines
Diff to previous 1.82.2.4 (colored)

Sync with HEAD.

Revision 1.82.2.4 / (download) - annotate - [select for diffs], Wed Aug 25 06:58:58 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.3: +168 -115 lines
Diff to previous 1.82.2.3 (colored)

Sync with HEAD.

Revision 1.104 / (download) - annotate - [select for diffs], Thu Aug 19 20:58:23 2004 UTC (19 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.103: +100 -2 lines
Diff to previous 1.103 (colored)

Factor out the hand-crafting of mbufs from the interface files. Reviewed by
gimpy. XXX: I could have used bpf_mtap2 on some of the new functions, but I
chose not to, because I just wanted to do what amounts to a code move.

Revision 1.103 / (download) - annotate - [select for diffs], Thu Aug 19 18:33:24 2004 UTC (19 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.102: +70 -115 lines
Diff to previous 1.102 (colored)

- ansify
- remove unnecessary casts
- change caddr_t to void *
- no functional change.

Revision 1.82.2.3 / (download) - annotate - [select for diffs], Thu Aug 12 11:42:20 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.2: +2 -6 lines
Diff to previous 1.82.2.2 (colored)

Sync with HEAD.

Revision 1.102 / (download) - annotate - [select for diffs], Thu Aug 5 03:58:58 2004 UTC (19 years, 6 months ago) by enami
Branch: MAIN
Changes since 1.101: +2 -6 lines
Diff to previous 1.101 (colored)

Don't refuse to attach an interface even if it is down so that one can
capture the very first packet when an interface is up.

Revision 1.82.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:54:11 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.82.2.1: +240 -68 lines
Diff to previous 1.82.2.1 (colored)

Sync with HEAD

Revision 1.101 / (download) - annotate - [select for diffs], Sun Jun 6 04:35:53 2004 UTC (19 years, 8 months ago) by dyoung
Branch: MAIN
Changes since 1.100: +8 -16 lines
Diff to previous 1.100 (colored)

Per Matt Thomas' and Darren Reed's suggestions:

Add bpf_deliver prototype.

Rename bpf_measure to m_length and move it to sys/sys/mbuf.h.  I
make m_length an inline function in the header file to preserve
its performance characteristics, for better or for worse.

Optimize m_length: use the length in m_pkthdr.len, if M_PKTHDR.

In bpf_deliver, zero the on-stack mbuf before we do anything else
with it.

Revision 1.100 / (download) - annotate - [select for diffs], Sat May 29 14:18:33 2004 UTC (19 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.99: +44 -167 lines
Diff to previous 1.99 (colored)

back out previous change - these diffs aren't what I'd tested.

Revision 1.99 / (download) - annotate - [select for diffs], Sat May 29 08:56:19 2004 UTC (19 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.98: +169 -46 lines
Diff to previous 1.98 (colored)

add mmap(2) interface to bpf(4) devices, along with BIOCMMAPINFO ioctl call
for applications to interact with the bpf device for the purpose of using
mmap to examinen captured data.

Revision 1.90.2.2 / (download) - annotate - [select for diffs], Fri May 28 07:24:55 2004 UTC (19 years, 9 months ago) by tron
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Changes since 1.90.2.1: +6 -4 lines
Diff to previous 1.90.2.1 (colored) to branchpoint 1.90 (colored) next main 1.91 (colored)

Pull up revision 1.98 (requested by atatat in ticket #391):
Sysctl descriptions under net subtree (net.key not done)

Revision 1.98 / (download) - annotate - [select for diffs], Tue May 25 04:33:59 2004 UTC (19 years, 9 months ago) by atatat
Branch: MAIN
Changes since 1.97: +6 -4 lines
Diff to previous 1.97 (colored)

Sysctl descriptions under net subtree (net.key not done)

Revision 1.97 / (download) - annotate - [select for diffs], Wed May 19 13:09:11 2004 UTC (19 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.96: +15 -9 lines
Diff to previous 1.96 (colored)

reapply a change that got undone with more recent changes to bpf to wakeup
any sleepers _after_ the device info has been updated, not before.

Revision 1.96 / (download) - annotate - [select for diffs], Fri Apr 30 22:07:21 2004 UTC (19 years, 10 months ago) by dyoung
Branch: MAIN
Changes since 1.95: +72 -16 lines
Diff to previous 1.95 (colored)

Add bpf_mtap2, which taps a packet whose head is in a void *buffer
and whose tail is in an mbuf chain.

Revision 1.90.2.1 / (download) - annotate - [select for diffs], Wed Apr 21 03:56:14 2004 UTC (19 years, 10 months ago) by jmc
Branch: netbsd-2-0
Changes since 1.90: +116 -31 lines
Diff to previous 1.90 (colored)

Pullup rev 1.91-1.95 (requested by darrenr in ticket #167)

Reduce bpf buffer to 32k from 1M to reduce kernel memory usage from userland
binaries.
Fix bpf so that select will return for a timeout.
Fix the behaviour of BIOCIMMEDIATE.
In bpf_mtap(), optimise the calling of bpf_filter() and catchpacket()
based on whether or not the entire packet is in one mbuf.
Various other bpf fixes, including PR#8674, PR#12170

Revision 1.95 / (download) - annotate - [select for diffs], Tue Apr 20 10:51:09 2004 UTC (19 years, 10 months ago) by darrenr
Branch: MAIN
Changes since 1.94: +6 -3 lines
Diff to previous 1.94 (colored)

If we timeout waiting for data on the bpf device, allow data in the current
storage buffer (bd_sbuf) to indicate that there is data present.

Revision 1.94 / (download) - annotate - [select for diffs], Thu Apr 15 14:56:57 2004 UTC (19 years, 10 months ago) by darrenr
Branch: MAIN
Changes since 1.93: +15 -2 lines
Diff to previous 1.93 (colored)

Add a count of the number of packets that match the bpf filter applied to a
particule device.  In doing this, make a new the bpf_stat structure with
members that are u_long rather than u_int, matching the counters in the bpf_d.
the original bpf_stat is now bpf_stat_old and so to the original ioctl
is preserved as BIOCGSTATSOLD.

Revision 1.93 / (download) - annotate - [select for diffs], Wed Apr 14 21:34:26 2004 UTC (19 years, 10 months ago) by darrenr
Branch: MAIN
Changes since 1.92: +22 -16 lines
Diff to previous 1.92 (colored)

* from bpf 1.2a1, use the IO_NDELAY flag in bpfread() to indicate whether or
  not a read operation should be allowed to sleep.  This allows the use of
  bd_rtout with a value of "-1" to be eliminated (signed comparison and
  assignment to an unsigned long.)
* in 1.91, a change was introduced that had bpfpoll() returning POLLRDNORM
  set when the timeout expired.  This impacted poorly on performance as well
  as causing select to return an fd available for reading when it wasn't.
  Change the behaviour here to only allow the possibility of POLLIN being
  returned as active in the event of a timeout.

Revision 1.92 / (download) - annotate - [select for diffs], Sun Apr 11 01:41:01 2004 UTC (19 years, 10 months ago) by darrenr
Branch: MAIN
Changes since 1.91: +5 -5 lines
Diff to previous 1.91 (colored)

from freebsd's kern/36219, the if expression in deciding whether or not
to return something check the value of bd_state in the wrong place.

Revision 1.91 / (download) - annotate - [select for diffs], Sat Apr 10 23:31:51 2004 UTC (19 years, 10 months ago) by darrenr
Branch: MAIN
Changes since 1.90: +89 -26 lines
Diff to previous 1.90 (colored)

Fix bpf so that select will return for a timeout (from FreeBSD.)

Fix the behaviour of BIOCIMMEDIATE (fix from LBL BPF code via FreeBSD.)

In bpf_mtap(), optimise the calling of bpf_filter() and catchpacket()
based on whether or not the entire packet is in one mbuf (based on
similar change FreeBSD but fixes BIOC*SEESENT issue with that.)

Copy the implementation of BIOCSSEESENT, BIOCGSEESENT by FreeBSD.

Review Assistance: Guy Harris

PRs: kern/8674, kern/12170

Revision 1.90 / (download) - annotate - [select for diffs], Wed Mar 24 15:34:54 2004 UTC (19 years, 11 months ago) by atatat
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.89: +9 -6 lines
Diff to previous 1.89 (colored)

Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.89 / (download) - annotate - [select for diffs], Thu Jan 22 00:32:41 2004 UTC (20 years, 1 month ago) by jonathan
Branch: MAIN
Changes since 1.88: +49 -6 lines
Diff to previous 1.88 (colored)

Make bpf_maxbufsize writable via sysctl, as written by Andrew Brown.

Revision 1.88 / (download) - annotate - [select for diffs], Wed Jan 21 23:59:12 2004 UTC (20 years, 1 month ago) by jonathan
Branch: MAIN
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (colored)

Fix an Emacs finger-glitch (missing semicolon#).

Revision 1.87 / (download) - annotate - [select for diffs], Wed Jan 21 22:15:16 2004 UTC (20 years, 1 month ago) by jonathan
Branch: MAIN
Changes since 1.86: +13 -6 lines
Diff to previous 1.86 (colored)

Update bpf buffer parameters, as per recent discussion on tech-net.

Increase the default bpf buffer size used by naive apps that don't do
BIOCSBLEN, from 8k to 32k.  The former value of 8192 is too small to
hold a normal jumbo Ethernet frame (circa 9k), 16k is a little small
for Large-jumbo (~16k) frames supported by newer gigabit
Ethernet/10Gbe, so (somewhat arbitrarily) increase the default to 32k.

Increase the upper limit to which BIOSBLEN can raise bpf buffer-size
drastically, to 1 Mbyte.  State-of-the-art for packet capture circa
1999 was around 256k; savvy NetBSD developers now use 1 Mbyte.
Note that libpcap has been updated to do binary-search on BIOCSBLEN
values up to 1 Mbyte.

Work is in progress to make both values sysctl'able. Source comments
note that consensus on tech-net is that we should find some heuristic
to set the boot-time default values dynamically, based on system memory.

Revision 1.86 / (download) - annotate - [select for diffs], Mon Sep 22 13:00:01 2003 UTC (20 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.85: +3 -3 lines
Diff to previous 1.85 (colored)

- pass signo to fownsignal [ok by jd]
- make urg signal handling use fownsignal
- remove out of band detection in sowakeup

Revision 1.85 / (download) - annotate - [select for diffs], Sun Sep 21 19:17:13 2003 UTC (20 years, 5 months ago) by jdolecek
Branch: MAIN
Changes since 1.84: +8 -26 lines
Diff to previous 1.84 (colored)

cleanup & uniform descriptor owner handling:
* introduce fsetown(), fgetown(), fownsignal() - this sets/retrieves/signals
  the owner of descriptor, according to appropriate sematics
  of TIOCSPGRP/FIOSETOWN/SIOCSPGRP/TIOCGPGRP/FIOGETOWN/SIOCGPGRP ioctl; use
  these routines instead of custom code where appropriate
* make every place handling TIOCSPGRP/TIOCGPGRP handle also FIOSETOWN/FIOGETOWN
  properly, and remove the translation of FIO[SG]OWN to TIOC[SG]PGRP
  in sys_ioctl() & sys_fcntl()
* also remove the socket-specific hack in sys_ioctl()/sys_fcntl() and
  pass the ioctls down to soo_ioctl() as any other ioctl

change discussed on tech-kern@

Revision 1.84 / (download) - annotate - [select for diffs], Wed Aug 13 19:44:12 2003 UTC (20 years, 6 months ago) by wrstuden
Branch: MAIN
Changes since 1.83: +3 -3 lines
Diff to previous 1.83 (colored)

Include correct file for defopt.

Revision 1.83 / (download) - annotate - [select for diffs], Thu Aug 7 16:32:47 2003 UTC (20 years, 6 months ago) by agc
Branch: MAIN
Changes since 1.82: +3 -7 lines
Diff to previous 1.82 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.82.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:26:55 2003 UTC (20 years, 8 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.82: +12 -12 lines
Diff to previous 1.82 (colored)

Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.82 / (download) - annotate - [select for diffs], Sun Jun 29 22:31:49 2003 UTC (20 years, 8 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.81: +12 -12 lines
Diff to previous 1.81 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.81 / (download) - annotate - [select for diffs], Sat Jun 28 17:33:02 2003 UTC (20 years, 8 months ago) by darrenr
Branch: MAIN
Changes since 1.80: +10 -8 lines
Diff to previous 1.80 (colored)

From OpenBSD 1.33-1.34:
When using bpf(4) in immediate mode, and using kevent(2) to receive
notification of packet arrival, the usermode application isn't notified
until a second packet arrives.

This is because KNOTE() calls filt_bpfread() before bd_slen has been
updated with the newly arrived packet length, so it looks like there
is no data there.

Moving the bpf_wakeup() call for immediate mode to after bd_slen is set
fixes it.

From: wayne@epipe.com.au in pr 3175

Revision 1.80 / (download) - annotate - [select for diffs], Sat Jun 28 14:22:06 2003 UTC (20 years, 8 months ago) by darrenr
Branch: MAIN
Changes since 1.79: +12 -12 lines
Diff to previous 1.79 (colored)

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.79 / (download) - annotate - [select for diffs], Thu Jun 19 06:25:41 2003 UTC (20 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.78: +10 -4 lines
Diff to previous 1.78 (colored)

avoid panic in malloc() under extremely low memory situation.
OpenBSD problem report 2235, 2236, 2640.  fix by Otto Moerbeek.

Revision 1.78 / (download) - annotate - [select for diffs], Thu Mar 13 10:18:35 2003 UTC (20 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.77: +11 -5 lines
Diff to previous 1.77 (colored)

Check that the process/process group id passed to TIOCSPRP is in the session
of the current process.

Revision 1.77 / (download) - annotate - [select for diffs], Wed Feb 26 06:31:12 2003 UTC (21 years ago) by matt
Branch: MAIN
Changes since 1.76: +4 -6 lines
Diff to previous 1.76 (colored)

Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.

Revision 1.60.2.9 / (download) - annotate - [select for diffs], Wed Dec 11 06:46:31 2002 UTC (21 years, 2 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.60.2.8: +3 -3 lines
Diff to previous 1.60.2.8 (colored) next main 1.61 (colored)

Sync with HEAD.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Nov 26 18:51:18 2002 UTC (21 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.75: +5 -5 lines
Diff to previous 1.75 (colored)

si_ -> sel_

Revision 1.60.2.8 / (download) - annotate - [select for diffs], Mon Nov 11 22:14:54 2002 UTC (21 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.7: +56 -2 lines
Diff to previous 1.60.2.7 (colored)

Catch up to -current

Revision 1.75 / (download) - annotate - [select for diffs], Wed Oct 23 09:14:41 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.74: +58 -4 lines
Diff to previous 1.74 (colored)

merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe

Revision 1.60.2.7 / (download) - annotate - [select for diffs], Fri Oct 18 02:45:09 2002 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.6: +0 -1 lines
Diff to previous 1.60.2.6 (colored)

Catch up to -current.

Revision 1.61.2.7 / (download) - annotate - [select for diffs], Thu Oct 10 18:43:38 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.61.2.6: +27 -9 lines
Diff to previous 1.61.2.6 (colored) to branchpoint 1.61 (colored) next main 1.62 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.61.2.6 / (download) - annotate - [select for diffs], Wed Oct 2 22:02:30 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: kqueue
Changes since 1.61.2.5: +5 -5 lines
Diff to previous 1.61.2.5 (colored) to branchpoint 1.61 (colored)

do not need the (void *) cast for kn_hook anymore

Revision 1.74 / (download) - annotate - [select for diffs], Wed Sep 25 22:21:46 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base
Changes since 1.73: +2 -3 lines
Diff to previous 1.73 (colored)

Don't include <sys/map.h>.

Revision 1.73 / (download) - annotate - [select for diffs], Tue Sep 24 03:14:43 2002 UTC (21 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.72: +5 -14 lines
Diff to previous 1.72 (colored)

backout recent changes, for PR 18392.
bpf_mtap() gets called with not-well-initialized mbuf, so we need to go through
it without touching m->m_pkthdr.len and such.  it's part of our bpf_mtap() API
(at least today).

Revision 1.72 / (download) - annotate - [select for diffs], Thu Sep 19 03:04:32 2002 UTC (21 years, 5 months ago) by atatat
Branch: MAIN
Changes since 1.71: +3 -3 lines
Diff to previous 1.71 (colored)

Add a missing semi-colon.

Revision 1.71 / (download) - annotate - [select for diffs], Thu Sep 19 01:16:58 2002 UTC (21 years, 5 months ago) by darrenr
Branch: MAIN
Changes since 1.70: +7 -2 lines
Diff to previous 1.70 (colored)

For the trivial case where the packet is only in one mbuf, call bpf_tap()
(idea from FreeBSD) - alternative to changing bpf_filter() to be aware of
kernel calling convetion where 0 is passed as the length for mbufs.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Sep 19 00:34:00 2002 UTC (21 years, 5 months ago) by darrenr
Branch: MAIN
Changes since 1.69: +9 -5 lines
Diff to previous 1.69 (colored)

If M_PKTHDR is set we can use m_pkthdr.len instead of the for loop.

Revision 1.60.2.6 / (download) - annotate - [select for diffs], Tue Sep 17 21:22:44 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.5: +128 -10 lines
Diff to previous 1.60.2.5 (colored)

Catch up to -current.

Revision 1.69 / (download) - annotate - [select for diffs], Sun Sep 15 23:44:12 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.68: +12 -3 lines
Diff to previous 1.68 (colored)

In bpf_setdlt(), preserve the promiscuous mode setting of the
descriptor.

From David Young <dyoung@ojctech.com>, slight change by me.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Sep 11 05:36:26 2002 UTC (21 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored)

KNF - return is not a function.

Revision 1.67 / (download) - annotate - [select for diffs], Fri Sep 6 13:18:43 2002 UTC (21 years, 5 months ago) by gehenna
Branch: MAIN
Changes since 1.66: +15 -6 lines
Diff to previous 1.66 (colored)

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.

Revision 1.61.2.5 / (download) - annotate - [select for diffs], Fri Sep 6 08:48:46 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: kqueue
Changes since 1.61.2.4: +105 -5 lines
Diff to previous 1.61.2.4 (colored) to branchpoint 1.61 (colored)

sync kqueue branch with HEAD

Revision 1.64.2.3 / (download) - annotate - [select for diffs], Thu Aug 29 00:56:40 2002 UTC (21 years, 6 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.64.2.2: +105 -5 lines
Diff to previous 1.64.2.2 (colored) to branchpoint 1.64 (colored) next main 1.65 (colored)

catch up with -current.

Revision 1.66 / (download) - annotate - [select for diffs], Wed Aug 28 09:34:57 2002 UTC (21 years, 6 months ago) by onoe
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.65: +105 -5 lines
Diff to previous 1.65 (colored)

Define new kernel interface bpfattach2() to register another data link
type for the driver, which will be used for 802.11 drivers.
Also add 2 APIs to get a list of available DLTs and use one for them.
	BIOCGDLTLIST (struct bpf_dltlist)
	BIOCSDLT (u_int)

Revision 1.61.2.4 / (download) - annotate - [select for diffs], Sun Jun 23 17:50:20 2002 UTC (21 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.61.2.3: +15 -8 lines
Diff to previous 1.61.2.3 (colored) to branchpoint 1.61 (colored)

catch up with -current on kqueue branch

Revision 1.64.2.2 / (download) - annotate - [select for diffs], Thu Jun 20 15:52:04 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.64.2.1: +6 -2 lines
Diff to previous 1.64.2.1 (colored) to branchpoint 1.64 (colored)

catch up with -current.

Revision 1.60.2.5 / (download) - annotate - [select for diffs], Thu Jun 20 03:48:07 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.4: +6 -2 lines
Diff to previous 1.60.2.4 (colored)

Catch up to -current.

Revision 1.65 / (download) - annotate - [select for diffs], Thu Jun 6 23:54:47 2002 UTC (21 years, 8 months ago) by wrstuden
Branch: MAIN
Changes since 1.64: +6 -2 lines
Diff to previous 1.64 (colored)

defparam BPF_BUFSIZE

Revision 1.64.2.1 / (download) - annotate - [select for diffs], Thu May 16 03:58:47 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.64: +15 -6 lines
Diff to previous 1.64 (colored)

Add the character device switch.
Replace the direct-access to devsw table with calling devsw APIs.

Revision 1.60.2.4 / (download) - annotate - [select for diffs], Mon Apr 1 07:48:18 2002 UTC (21 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.3: +9 -6 lines
Diff to previous 1.60.2.3 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.64 / (download) - annotate - [select for diffs], Sat Mar 23 15:55:21 2002 UTC (21 years, 11 months ago) by darrenr
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Branch point for: gehenna-devsw
Changes since 1.63: +10 -7 lines
Diff to previous 1.63 (colored)

If someone is poll'ing to write to bpf, assume that it can always be done
and include POLLOUT and POLLWRNORM in the returned events flag set.
Derived from FreeBSD.

Revision 1.61.2.3 / (download) - annotate - [select for diffs], Thu Jan 10 20:01:56 2002 UTC (22 years, 1 month ago) by thorpej
Branch: kqueue
Changes since 1.61.2.2: +4 -1 lines
Diff to previous 1.61.2.2 (colored) to branchpoint 1.61 (colored)

Sync kqueue branch with -current.

Revision 1.60.2.3 / (download) - annotate - [select for diffs], Wed Nov 14 19:17:18 2001 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.2: +4 -1 lines
Diff to previous 1.60.2.2 (colored)

Catch up to -current.

Revision 1.63 / (download) - annotate - [select for diffs], Mon Nov 12 23:49:33 2001 UTC (22 years, 3 months ago) by lukem
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base, eeh-devprop-base, eeh-devprop
Changes since 1.62: +4 -1 lines
Diff to previous 1.62 (colored)

add RCSIDs

Revision 1.61.4.3 / (download) - annotate - [select for diffs], Mon Oct 1 12:47:31 2001 UTC (22 years, 5 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.61.4.2: +7 -1 lines
Diff to previous 1.61.4.2 (colored) to branchpoint 1.61 (colored) next main 1.62 (colored)

Catch up with -current.

Revision 1.61.4.2 / (download) - annotate - [select for diffs], Wed Sep 26 15:28:25 2001 UTC (22 years, 5 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.61.4.1: +26 -11 lines
Diff to previous 1.61.4.1 (colored) to branchpoint 1.61 (colored)

* add a VCLONED vnode flag that indicates a vnode representing a cloned
  device.
* rename REVOKEALL to REVOKEALIAS, and add a REVOKECLONE flag, to pass
  to VOP_REVOKE
* the revoke system call will revoke all aliases, as before, but not the
  clones
* vdevgone is called when detaching a device, so make it use REVOKECLONE
  to get rid of all clones as well
* clean up all uses of VOP_OPEN wrt. locking.
* add a few VOPS to spec_vnops that need to do something when it's a
  clone vnode (access and getattr)
* add a copy of the vnode vattr structure of the original 'master' vnode
  to the specinfo of a cloned vnode. could possibly redirect getattr to
  the 'master' vnode, but this has issues with revoke
* add a vdev_reassignvp function that disassociates a vnode from its
  original device, and reassociates it with the specified dev_t. to be
  used by cloning devices only, in case a new minor is allocated.
* change all direct references in drivers to v_devcookie and v_rdev
  to vdev_privdata(vp) and vdev_rdev(vp). for diagnostic purposes
  when debugging race conditions that still exist wrt. locking and
  revoking vnodes.
* make the locking state of a vnode consistent when passed to
  d_open and d_close (unlocked). locked would be better, but has
  some deadlock issues

Revision 1.60.2.2 / (download) - annotate - [select for diffs], Fri Sep 21 22:36:43 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60.2.1: +7 -1 lines
Diff to previous 1.60.2.1 (colored)

Catch up to -current.

Revision 1.61.2.2 / (download) - annotate - [select for diffs], Thu Sep 13 01:16:21 2001 UTC (22 years, 5 months ago) by thorpej
Branch: kqueue
Changes since 1.61.2.1: +7 -1 lines
Diff to previous 1.61.2.1 (colored) to branchpoint 1.61 (colored)

Update the kqueue branch to HEAD.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Sep 10 23:11:06 2001 UTC (22 years, 5 months ago) by bjh21
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2, pre-chs-ubcperf, post-chs-ubcperf
Changes since 1.61: +7 -1 lines
Diff to previous 1.61 (colored)

Add MI Econet support.  This is lacking any interfaces to higher-layer
protocols, and lacking any timeouts, but it basically works, doing four-way
handshakes in both directions and incoming Machine Peek operations.

Oh, and Econet is Acorn's ancient, proprietary 500kbit/s networking
technology.

Revision 1.61.2.1 / (download) - annotate - [select for diffs], Sat Sep 8 03:15:37 2001 UTC (22 years, 5 months ago) by thorpej
Branch: kqueue
Changes since 1.61: +56 -5 lines
Diff to previous 1.61 (colored)

Add kqueue support.

Revision 1.61.4.1 / (download) - annotate - [select for diffs], Fri Sep 7 04:45:41 2001 UTC (22 years, 5 months ago) by thorpej
Branch: thorpej-devvp
Changes since 1.61: +24 -21 lines
Diff to previous 1.61 (colored)

Commit my "devvp" changes to the thorpej-devvp branch.  This
replaces the use of dev_t in most places with a struct vnode *.

This will form the basic infrastructure for real cloning device
support (besides being architecurally cleaner -- it'll be good
to get away from using numbers to represent objects).

Revision 1.60.2.1 / (download) - annotate - [select for diffs], Thu Jun 21 20:07:53 2001 UTC (22 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.60: +15 -15 lines
Diff to previous 1.60 (colored)

Catch up to -current.

Revision 1.47.2.4 / (download) - annotate - [select for diffs], Sat Apr 21 17:46:36 2001 UTC (22 years, 10 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.47.2.3: +15 -15 lines
Diff to previous 1.47.2.3 (colored) to branchpoint 1.47 (colored) next main 1.48 (colored)

Sync with HEAD

Revision 1.61 / (download) - annotate - [select for diffs], Fri Apr 13 23:30:11 2001 UTC (22 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base, thorpej-devvp-base
Branch point for: thorpej-devvp, kqueue
Changes since 1.60: +15 -15 lines
Diff to previous 1.60 (colored)

Remove the use of splimp() from the NetBSD kernel.  splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.

Revision 1.57.2.1 / (download) - annotate - [select for diffs], Thu Jan 25 16:29:56 2001 UTC (23 years, 1 month ago) by jhawk
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.57: +10 -6 lines
Diff to previous 1.57 (colored) next main 1.58 (colored)

Pull up revision 1.60 (requested by thorpej):
  Fix non-blocking BPF reads. Fixes PR kern/11836.

Revision 1.47.2.3 / (download) - annotate - [select for diffs], Fri Jan 5 17:36:48 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.47.2.2: +9 -5 lines
Diff to previous 1.47.2.2 (colored) to branchpoint 1.47 (colored)

Sync with HEAD

Revision 1.60 / (download) - annotate - [select for diffs], Fri Dec 29 01:55:49 2000 UTC (23 years, 2 months ago) by thorpej
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.59: +10 -6 lines
Diff to previous 1.59 (colored)

Fix non-blocking BPF reads, from Guy Harris, kern/11836.

Revision 1.47.2.2 / (download) - annotate - [select for diffs], Wed Dec 13 15:50:27 2000 UTC (23 years, 2 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.47.2.1: +6 -7 lines
Diff to previous 1.47.2.1 (colored) to branchpoint 1.47 (colored)

Sync with HEAD (for UBC fixes).

Revision 1.59 / (download) - annotate - [select for diffs], Tue Dec 12 17:55:21 2000 UTC (23 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.58: +6 -7 lines
Diff to previous 1.58 (colored)

Use <net/dlt.h> to get the DLT_* constants.  Also change bpfattach()
and bpf_change_type() to take just a pointer to the ifnet, rather than
a pointer to the ifnet and a pointer to a member of the ifnet (the bpf
pointer).

We'll let this ride on the Dec 12 1.5N version bump.

Revision 1.47.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:09:55 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.47: +93 -238 lines
Diff to previous 1.47 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.58 / (download) - annotate - [select for diffs], Tue Jul 4 18:46:49 2000 UTC (23 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.57: +1 -53 lines
Diff to previous 1.57 (colored)

Move ifpromimsc() to if.c

Revision 1.55.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:09:40 2000 UTC (23 years, 8 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.55: +10 -9 lines
Diff to previous 1.55 (colored) next main 1.56 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.57 / (download) - annotate - [select for diffs], Sun May 28 18:17:09 2000 UTC (23 years, 9 months ago) by jhawk
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

Ensure that all callers of pfind() can deal with pfind(0) returning
a real procp* rather than NULL.

Revision 1.56 / (download) - annotate - [select for diffs], Sun May 28 02:49:35 2000 UTC (23 years, 9 months ago) by matt
Branch: MAIN
Changes since 1.55: +9 -8 lines
Diff to previous 1.55 (colored)

Fix bpf output on fddi to actually work.  Make it compatible with ULTRIX
and Tru64.

Revision 1.55 / (download) - annotate - [select for diffs], Fri May 12 05:58:01 2000 UTC (23 years, 9 months ago) by jonathan
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.54: +4 -2 lines
Diff to previous 1.54 (colored)

Make BPF_BUFSIZE overridable: 8192 is  smaller than MTU of some devices.
TODO: defopt, or make sysctl'able (c.f. FreeBSD).

Revision 1.54 / (download) - annotate - [select for diffs], Wed Apr 12 04:20:47 2000 UTC (23 years, 10 months ago) by chs
Branch: MAIN
Changes since 1.53: +5 -134 lines
Diff to previous 1.53 (colored)

remove support for sunos and ancient BSDs.

Revision 1.53 / (download) - annotate - [select for diffs], Thu Mar 30 09:45:33 2000 UTC (23 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.52: +44 -44 lines
Diff to previous 1.52 (colored)

Kill some more register declarations.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Mar 13 23:52:39 2000 UTC (23 years, 11 months ago) by soren
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

Fix doubled 'the's in comments.

Revision 1.51 / (download) - annotate - [select for diffs], Wed Feb 2 09:03:41 2000 UTC (24 years, 1 month ago) by enami
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.50: +26 -1 lines
Diff to previous 1.50 (colored)

Revoke bpf device on detach.

Revision 1.50 / (download) - annotate - [select for diffs], Wed Feb 2 08:36:02 2000 UTC (24 years, 1 month ago) by enami
Branch: MAIN
Changes since 1.49: +2 -10 lines
Diff to previous 1.49 (colored)

Since we are allowed to wait, no need to check the return value.

Revision 1.49 / (download) - annotate - [select for diffs], Wed Feb 2 07:45:13 2000 UTC (24 years, 1 month ago) by enami
Branch: MAIN
Changes since 1.48: +1 -4 lines
Diff to previous 1.48 (colored)

Remove duplicated forward declarations.

Revision 1.48 / (download) - annotate - [select for diffs], Mon Jan 31 23:06:12 2000 UTC (24 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.47: +20 -1 lines
Diff to previous 1.47 (colored)

Implement bpfdetach().

Revision 1.46.6.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:27:31 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.46: +29 -1 lines
Diff to previous 1.46 (colored) next main 1.47 (colored)

Sync w/ -current.

Revision 1.47 / (download) - annotate - [select for diffs], Tue May 11 02:11:08 1999 UTC (24 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-base
Branch point for: thorpej_scsipi
Changes since 1.46: +29 -1 lines
Diff to previous 1.46 (colored)

* Add the ability to change the data link type on the fly.
* Define two more data link types: NetBSD PPP-over-serial and NetBSD
PPP-over-Ethernet.  (Different PPP encaps have different header formats!)

Revision 1.46.2.1 / (download) - annotate - [select for diffs], Fri Dec 11 04:53:04 1998 UTC (25 years, 2 months ago) by kenh
Branch: kenh-if-detach
Changes since 1.46: +2 -1 lines
Diff to previous 1.46 (colored) next main 1.47 (colored)

The beginnings of interface detach support.  Still some bugs, but mostly
works for me.

This work was originally by Bill Studenmund, and cleaned up by me.

Revision 1.46 / (download) - annotate - [select for diffs], Fri Dec 4 11:04:37 1998 UTC (25 years, 2 months ago) by bouyer
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kenh-if-detach-base, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: kenh-if-detach, chs-ubc2
Changes since 1.45: +18 -22 lines
Diff to previous 1.45 (colored)

Init the decriptors at boot time rather than at interface attach time.
Now that we have pcmcia hot-plug, it's not the same. Fixes kern/3189.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Nov 5 22:50:15 1998 UTC (25 years, 3 months ago) by jonathan
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Increase compiled-in default bpf buffer size from 4096 to 8192.
(the libpcap API provides no way to resize the inkernel buffe,r and
4096 is too small to capture maximum-sized FDDI frames.)

Revision 1.44 / (download) - annotate - [select for diffs], Tue Aug 18 06:32:13 1998 UTC (25 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.43: +5 -3 lines
Diff to previous 1.43 (colored)

Add some braces to make egcs happy (ambiguous else warning).

Revision 1.43 / (download) - annotate - [select for diffs], Thu Aug 6 04:37:57 1998 UTC (25 years, 6 months ago) by perry
Branch: MAIN
Changes since 1.42: +6 -5 lines
Diff to previous 1.42 (colored)

Sigh. "consts in prototypes can be quite a drag..."
fix last two fixes one more time, this time dealing with ugly
prototype issues, including the fact that the bcopy returns nothing,
but memcpy returns a void *. Never mind that we don't use it...

Revision 1.42 / (download) - annotate - [select for diffs], Thu Aug 6 04:25:55 1998 UTC (25 years, 6 months ago) by perry
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

Fix botched prototype decl in last fix.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Aug 6 04:24:25 1998 UTC (25 years, 6 months ago) by perry
Branch: MAIN
Changes since 1.40: +15 -15 lines
Diff to previous 1.40 (colored)

Convert bcopy,bzero to memcpy,memset
This was semi-nontrivial, since a function pointer to bcopy gets used
in this file.
Note #1: The catchpacket routine, which takes a function pointer to
         bpf_mcpy or memcpy, should probably be converted to take a
         flag that just says which is used, so memcpy can be inlined.
Note #2: The code is heavily #ifdef'ed to run on older operating
         systems. We probably want to clean that cruft out, unless
         someone is planning a new release of the code at LBL (doubtful.)

Revision 1.40 / (download) - annotate - [select for diffs], Thu Apr 30 00:08:19 1998 UTC (25 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.39: +13 -1 lines
Diff to previous 1.39 (colored)

Implement two new BPF ioctls: BPFGHDRCMPLT and BPFSHDRCMPLT, to get/set
the "header already complete" flag.  This allows BPF writers to spoof
layer 2 source addresses (providing the layer 2 in use supports it) in
applications where this is necessary.  From Greg Smith <greg@nas.nasa.gov>.

Revision 1.39 / (download) - annotate - [select for diffs], Sun Mar 1 02:25:04 1998 UTC (26 years ago) by fvdl
Branch: MAIN
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

Merge with Lite2 + local changes

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:13:22 1998 UTC (26 years ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +4 -10 lines
Diff to previous 1.1.1.2 (colored)

Import 4.4BSD-Lite2

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:10:05 1998 UTC (26 years ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1.1.1: +380 -168 lines
Diff to previous 1.1.1.1 (colored)

Import 4.4BSD-Lite for reference

Revision 1.35.4.1 / (download) - annotate - [select for diffs], Tue Oct 14 10:28:53 1997 UTC (26 years, 4 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.35: +132 -58 lines
Diff to previous 1.35 (colored) next main 1.36 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.38 / (download) - annotate - [select for diffs], Sun Oct 12 16:35:10 1997 UTC (26 years, 4 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-base
Changes since 1.37: +4 -2 lines
Diff to previous 1.37 (colored)

Do *not* free the mbuf chain we just created.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Oct 9 18:58:08 1997 UTC (26 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.36: +4 -5 lines
Diff to previous 1.36 (colored)

GC bd_sig

Revision 1.36 / (download) - annotate - [select for diffs], Thu Oct 9 18:17:19 1997 UTC (26 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.35: +126 -53 lines
Diff to previous 1.35 (colored)

Sync with bpf-1.2a1
	- whitespace
	- add rcsid; our sccsid is newer than the one on 1.2a1.
	- change prototype to add mtu
	- change size_t to u_int for consistency.
	- add alignment stuff in bpf_movein
	- add more consistency checks bpf_movein
	- use one uiomove and then bcopy the data in bpf_movein
	- update the comment for the panic when ifpromisc fails.
	- separate the case when we have non blocking I/O and
	  no data and return EWOULDBLOCK
	- check for other errors and return them
	- pass the mtu to bpf_movein
	- Add the BPF_KERN_FILTER junk, just so that we keep up with the code
	- remove BIOCSRSIG, BIOCGRSIG; SIGIO does this well.
	- don't add the SIOCGIFADDR stuff (it is bogus)
	- Check for malloc return for consistency.
	- comment should say poll
	- change formatting to match the current code.
	- save and restore the pcount and flags in case we fail to set the
	  interface into promiscuous mode.
	- fix spelling typo.

Revision 1.35 / (download) - annotate - [select for diffs], Mon Mar 17 06:45:20 1997 UTC (26 years, 11 months ago) by scottr
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp, bouyer-scsipi
Branch point for: marc-pcmcia
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

if_arc.h is in net, not netinet.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Mar 15 18:12:18 1997 UTC (26 years, 11 months ago) by is
Branch: MAIN
Changes since 1.33: +4 -2 lines
Diff to previous 1.33 (colored)

New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.

Revision 1.32.4.3 / (download) - annotate - [select for diffs], Wed Mar 12 15:56:55 1997 UTC (26 years, 11 months ago) by is
Branch: is-newarp
Changes since 1.32.4.2: +3 -1 lines
Diff to previous 1.32.4.2 (colored) to branchpoint 1.32 (colored) next main 1.33 (colored)

Merge in changes from The Trunk

Revision 1.32.4.2 / (download) - annotate - [select for diffs], Sun Mar 9 20:58:59 1997 UTC (26 years, 11 months ago) by is
Branch: is-newarp
Changes since 1.32.4.1: +2 -2 lines
Diff to previous 1.32.4.1 (colored) to branchpoint 1.32 (colored)

netinet/if_ether.h -> netinet/if_inarp.h

Revision 1.33 / (download) - annotate - [select for diffs], Fri Feb 21 23:59:35 1997 UTC (27 years ago) by thorpej
Branch: MAIN
CVS Tags: is-newarp-before-merge
Changes since 1.32: +3 -1 lines
Diff to previous 1.32 (colored)

Don't let the read timeout get inadvertently rounded down to 0.
From John Hawkinson <jhawk@mit.edu>, PR #2531.

Revision 1.32.4.1 / (download) - annotate - [select for diffs], Fri Feb 7 18:06:53 1997 UTC (27 years ago) by is
Branch: is-newarp
Changes since 1.32: +3 -1 lines
Diff to previous 1.32 (colored)

Snapshot of new ARP code.

Our old ARP code was hardwired for 6-byte length medium
addresses, while the protocol is designed for any size.

This snapshot contains a first hack at getting rid of
Ethernet specific data structures. The ep driver is updated
(and tested on the PCI bus), the iy and fpa drivers have been
updated, but not real life tested yet.

If you want to test this with other drivers, you have to update
them first yourself, and probably tag the relevant directories.
Better contact me if you want to do this.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Oct 13 02:10:56 1996 UTC (27 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-base
Branch point for: is-newarp
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

backout previous kprintf change

Revision 1.31 / (download) - annotate - [select for diffs], Thu Oct 10 22:59:41 1996 UTC (27 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

- printf -> kprintf, sprintf -> ksprintf

Revision 1.30 / (download) - annotate - [select for diffs], Sat Sep 7 12:41:25 1996 UTC (27 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.29: +17 -54 lines
Diff to previous 1.29 (colored)

Implement poll(2).

Revision 1.29 / (download) - annotate - [select for diffs], Fri Jun 14 22:21:54 1996 UTC (27 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.28: +1 -3 lines
Diff to previous 1.28 (colored)

avoid unnecessary checks of m_get/MGET/etc.'s return values.  When
they're called with M_WAIT, they are defined to never return NULL.

Revision 1.28 / (download) - annotate - [select for diffs], Wed May 22 13:41:54 1996 UTC (27 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.27: +1 -2 lines
Diff to previous 1.27 (colored)

Remove duplicate definition of bpf_setif().

Revision 1.27 / (download) - annotate - [select for diffs], Tue May 7 05:26:02 1996 UTC (27 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Changes since 1.26: +1 -2 lines
Diff to previous 1.26 (colored)

Kill a couple of unnecessary calls to strlen().

Revision 1.26 / (download) - annotate - [select for diffs], Tue May 7 02:40:22 1996 UTC (27 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.25: +26 -25 lines
Diff to previous 1.25 (colored)

Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit.  Updated interface to (*if_watchdog)() and (*if_reset)()
to take a struct ifnet *, rather than a unit number.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Mar 30 21:57:30 1996 UTC (27 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Eliminate need for and remove net_conf.h

Revision 1.24 / (download) - annotate - [select for diffs], Tue Feb 13 21:59:53 1996 UTC (28 years ago) by christos
Branch: MAIN
Changes since 1.23: +25 -14 lines
Diff to previous 1.23 (colored)

Net prototypes

Revision 1.23 / (download) - annotate - [select for diffs], Wed Sep 27 18:30:37 1995 UTC (28 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.22: +59 -3 lines
Diff to previous 1.22 (colored)

Enhancements to the bpf from Stu Grossman <grossman@cygnus.com>:
	* grok FIONBIO, FIOASYNC, and TIOC{G,S}PGRP
	* add BIOC{G,S}RSIG; get/set the signal to be delivered
	  to the process or process group upon packet reception.
	  Defaults to SIGIO.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Aug 13 04:15:38 1995 UTC (28 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.21: +1 -15 lines
Diff to previous 1.21 (colored)

Don't pass through SIOCGIFADDR, per Steve McCanne.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Aug 12 23:59:17 1995 UTC (28 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

splnet --> splsoftnet

Revision 1.20 / (download) - annotate - [select for diffs], Sun Jul 23 16:29:47 1995 UTC (28 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +11 -10 lines
Diff to previous 1.19 (colored)

For outgoing packets, always allocate a header mbuf and fill it in.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Apr 22 13:26:20 1995 UTC (28 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.18: +13 -21 lines
Diff to previous 1.18 (colored)

copy routines should take size_t lengths for prototype consistency.
don't assume that tick is >= 1000; loses badly on alpha (div. by zero)
only try unaligned copies if NetBSD's UNALIGNED_ACCESS symbol is defined.
various misc type size cleanups, mostly short -> int16_t.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Mar 22 16:08:32 1995 UTC (28 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.17: +19 -8 lines
Diff to previous 1.17 (colored)

Fix panic when an interface in promiscuous mode goes down and the BPF user
tries to turn off promiscuous mode.  From Lon Willett.

Revision 1.17 / (download) - annotate - [select for diffs], Thu Feb 23 07:19:49 1995 UTC (29 years ago) by glass
Branch: MAIN
Changes since 1.16: +7 -1 lines
Diff to previous 1.16 (colored)

preliminary arcnet support.  uses lame but RFC address resolution

Revision 1.16 / (download) - annotate - [select for diffs], Sun Oct 30 21:48:43 1994 UTC (29 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

be more careful with types, also pull in headers where necessary.

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Fri Jul 15 22:32:27 1994 UTC (29 years, 7 months ago) by cgd
Branch: netbsd-1-0
CVS Tags: netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored) next main 1.15 (colored)

updates from trunk.  basically, C language errors.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jul 15 22:29:32 1994 UTC (29 years, 7 months ago) by cgd
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

don't use inline, use __inline, like cdefs intends (so it can kill it if nongcc

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jun 29 21:23:15 1994 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base
Branch point for: netbsd-1-0
Changes since 1.13: +1 -7 lines
Diff to previous 1.13 (colored)

this is what cdefs.h is for

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jun 29 06:35:52 1994 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.12: +3 -2 lines
Diff to previous 1.12 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.12 / (download) - annotate - [select for diffs], Fri May 13 06:02:14 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.11: +351 -208 lines
Diff to previous 1.11 (colored)

Update to 4.4-Lite networking code, with a few local changes.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Jan 25 06:10:08 1994 UTC (30 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.10: +197 -305 lines
Diff to previous 1.10 (colored)

new from mccanne. be afraid.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jan 12 02:45:11 1994 UTC (30 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.9: +2 -4 lines
Diff to previous 1.9 (colored)

Get the pkthdr.len calculation right.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Jan 12 00:38:50 1994 UTC (30 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)

writing out of bpf; use a hdr mbuf and set the pkthdr.len as well.
(rarpd now works with if_ep.c!)

Revision 1.8 / (download) - annotate - [select for diffs], Sat Dec 18 00:40:49 1993 UTC (30 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.7: +4 -7 lines
Diff to previous 1.7 (colored)

Canonicalize all #includes.

Revision 1.5.4.5 / (download) - annotate - [select for diffs], Fri Dec 3 03:35:05 1993 UTC (30 years, 3 months ago) by mycroft
Branch: magnum
Changes since 1.5.4.4: +11 -1 lines
Diff to previous 1.5.4.4 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)

Path from Andrew Moore <alm@netcom.com> to make sure the ether type field is
correct when sending raw packets.

Revision 1.5.4.4 / (download) - annotate - [select for diffs], Sat Nov 27 19:43:01 1993 UTC (30 years, 3 months ago) by mycroft
Branch: magnum
Changes since 1.5.4.3: +2 -2 lines
Diff to previous 1.5.4.3 (colored) to branchpoint 1.5 (colored)

Remove remaining sleep()s.

Revision 1.5.4.3 / (download) - annotate - [select for diffs], Tue Nov 23 04:52:03 1993 UTC (30 years, 3 months ago) by cgd
Branch: magnum
Changes since 1.5.4.2: +3 -7 lines
Diff to previous 1.5.4.2 (colored) to branchpoint 1.5 (colored)

defines change

Revision 1.7 / (download) - annotate - [select for diffs], Tue Nov 23 04:51:25 1993 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.6: +3 -7 lines
Diff to previous 1.6 (colored)

defines change

Revision 1.6 / (download) - annotate - [select for diffs], Mon Nov 15 09:56:46 1993 UTC (30 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +7 -1 lines
Diff to previous 1.5 (colored)

add bpfilterattach(), as in magnum

Revision 1.5.4.2 / (download) - annotate - [select for diffs], Sat Oct 9 09:53:23 1993 UTC (30 years, 4 months ago) by mycroft
Branch: magnum
Changes since 1.5.4.1: +7 -1 lines
Diff to previous 1.5.4.1 (colored) to branchpoint 1.5 (colored)

Add dummy bpfilterattach() to make autoconfig happy.

Revision 1.5.4.1 / (download) - annotate - [select for diffs], Fri Sep 24 08:53:51 1993 UTC (30 years, 5 months ago) by mycroft
Branch: magnum
Changes since 1.5: +3 -1 lines
Diff to previous 1.5 (colored)

Make all files using spl*() #include cpu.h.  Changes from trunk.

Revision 1.5 / (download) - annotate - [select for diffs], Tue May 18 18:19:50 1993 UTC (30 years, 9 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, magnum-base
Branch point for: magnum
Changes since 1.4: +5 -24 lines
Diff to previous 1.4 (colored)

make kernel select interface be one-stop shopping & clean it all up.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Apr 9 11:02:51 1993 UTC (30 years, 10 months ago) by glass
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-8
Changes since 1.3: +1 -7 lines
Diff to previous 1.3 (colored)

fixes stupid piece of bpf code that duplicates cdefs.h's handling of
'inline' in such a way as to cause stupid warnings.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Apr 5 22:04:09 1993 UTC (30 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +24 -2 lines
Diff to previous 1.2 (colored)

selwakeup() takes a "pid_t" rather than "struct proc *" now.

Revision 1.2 / (download) - annotate - [select for diffs], Thu Mar 25 00:27:49 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.1: +328 -144 lines
Diff to previous 1.1 (colored)

added BPF support, as provided by David Greenman (davidg@implode.rain.com)

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (30 years, 11 months ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: patchkit-0-2-2, WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>