The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.189.6.1.2.2 / (download) - annotate - [select for diffs], Thu Nov 16 05:13:13 2023 UTC (3 months, 2 weeks ago) by thorpej
Branch: thorpej-ifq
Changes since 1.189.6.1.2.1: +3 -3 lines
Diff to previous 1.189.6.1.2.1 (colored) to branchpoint 1.189.6.1 (colored)

if_transmit_lock() and if_enqueue() are equivalent.  if_enqueue() is
a better name, so collapse everything down to that and garbage-collect
if_transmit_lock().

Revision 1.189.6.1.2.1 / (download) - annotate - [select for diffs], Thu Nov 16 05:02:23 2023 UTC (3 months, 2 weeks ago) by thorpej
Branch: thorpej-ifq
Changes since 1.189.6.1: +5 -5 lines
Diff to previous 1.189.6.1 (colored)

Clean up the locking protocol around altq_etherclassify().  It's no longer
required to acquire KERNEL_LOCK *just* because ALTQ is compiled into the
kernel; you only have to acquire it if ALTQ is enabled on the interface
in question.

Revision 1.189.6.1 / (download) - annotate - [select for diffs], Sat Nov 11 13:16:30 2023 UTC (3 months, 2 weeks ago) by thorpej
Branch: thorpej-altq-separation
CVS Tags: thorpej-ifq-base
Branch point for: thorpej-ifq
Changes since 1.189: +3 -3 lines
Diff to previous 1.189 (colored)

Mostly de-tangle ifnet::if_snd from ifaltq, in a way that's minimally-
invasive to the ALTQ code itself.

The point of this is to lay the groundwork for future changes to ifqueue,
which among other benefits, will also hide the ALTQ ABI from drivers.

Revision 1.189 / (download) - annotate - [select for diffs], Fri Jul 29 07:58:18 2022 UTC (19 months ago) by skrll
Branch: MAIN
CVS Tags: thorpej-altq-separation-base, netbsd-10-base, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Branch point for: thorpej-altq-separation
Changes since 1.188: +6 -6 lines
Diff to previous 1.188 (colored)

Sprinkle const

Revision 1.188 / (download) - annotate - [select for diffs], Fri Jul 29 07:46:19 2022 UTC (19 months ago) by skrll
Branch: MAIN
Changes since 1.187: +24 -24 lines
Diff to previous 1.187 (colored)

Trailing whitespace

Revision 1.187 / (download) - annotate - [select for diffs], Mon Jun 20 08:14:48 2022 UTC (20 months, 1 week ago) by yamaguchi
Branch: MAIN
Changes since 1.186: +16 -2 lines
Diff to previous 1.186 (colored)

bridge(4): support VLAN frames stripped by hardware tagging

Revision 1.186 / (download) - annotate - [select for diffs], Fri Dec 31 14:25:24 2021 UTC (2 years, 2 months ago) by riastradh
Branch: MAIN
Changes since 1.185: +3 -3 lines
Diff to previous 1.185 (colored)

sys: Use if_init wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.

Revision 1.185 / (download) - annotate - [select for diffs], Fri Dec 31 14:24:50 2021 UTC (2 years, 2 months ago) by riastradh
Branch: MAIN
Changes since 1.184: +3 -3 lines
Diff to previous 1.184 (colored)

sys: Use if_ioctl wrapper function.

Revision 1.184 / (download) - annotate - [select for diffs], Fri Dec 31 14:24:38 2021 UTC (2 years, 2 months ago) by riastradh
Branch: MAIN
Changes since 1.183: +3 -3 lines
Diff to previous 1.183 (colored)

sys: Use if_stop wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.

Revision 1.183 / (download) - annotate - [select for diffs], Thu Sep 30 03:57:48 2021 UTC (2 years, 5 months ago) by yamaguchi
Branch: MAIN
Changes since 1.182: +16 -6 lines
Diff to previous 1.182 (colored)

bridge: Register bridge_ifdetach to ether_ifdetach hook

Revision 1.182 / (download) - annotate - [select for diffs], Thu Sep 30 03:35:55 2021 UTC (2 years, 5 months ago) by yamaguchi
Branch: MAIN
Changes since 1.181: +11 -4 lines
Diff to previous 1.181 (colored)

bridge: Register bridge_calc_link_state to link-state change hook

Revision 1.179.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.179.4.1: +3 -3 lines
Diff to previous 1.179.4.1 (colored) to branchpoint 1.179 (colored) next main 1.180 (colored)

Sync with HEAD.

Revision 1.181 / (download) - annotate - [select for diffs], Fri Jul 2 03:30:46 2021 UTC (2 years, 8 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.180: +3 -3 lines
Diff to previous 1.180 (colored)

Use if_ioctl() for changing MTU, not ether_ioctl to prevent panic

Fix PR kern/56292

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

Sync w/ HEAD.

Revision 1.180 / (download) - annotate - [select for diffs], Wed Jun 16 00:21:19 2021 UTC (2 years, 8 months ago) by riastradh
Branch: MAIN
Changes since 1.179: +3 -15 lines
Diff to previous 1.179 (colored)

if_attach and if_initialize cannot fail, don't test return value

These were originally made failable back in 2017 when if_initialize
allocated a softint in every interface for link state changes, so
that it could fail gracefully instead of panicking:

https://mail-index.NetBSD.org/source-changes/2017/10/23/msg089053.html

However, this spawned many seldom- or never-tested error branches,
which are risky to have around.  And that softint in every interface
has since been replaced by a single global workqueue, because link
state changes require thread context but not low latency or high
throughput:

https://mail-index.NetBSD.org/source-changes/2020/02/06/msg113759.html

So there is no longer any reason for if_initialize to fail.  (The
subroutine if_stats_init can't fail because percpu_alloc can't fail
either.)

There is a snag: the softint_establish in if_percpuq_create could
fail, potentially leading to bad consequences later on trying to use
the softint.  This change doesn't introduce any new bugs because of
the snag -- if_percpuq_attach was already broken.  However, the snag
can be better addressed without spawning error branches, either by
using a single softint or making softints less scarce.

(Separate commit will change the signatures of if_attach and
if_initialize to return void, scheduled to ride whatever is the next
convenient kernel bump.)

Patch and testing on amd64 and evbmips64-eb by maya@; commit message
soliloquy, and compile-testing on evbppc/i386/earmv7hf, by me.

Revision 1.176.2.2 / (download) - annotate - [select for diffs], Sat Apr 3 22:29:01 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.176.2.1: +11 -29 lines
Diff to previous 1.176.2.1 (colored) next main 1.177 (colored)

Sync with HEAD.

Revision 1.179 / (download) - annotate - [select for diffs], Fri Feb 19 14:51:59 2021 UTC (3 years ago) by christos
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.178: +4 -4 lines
Diff to previous 1.178 (colored)

- Make ALIGNED_POINTER use __alignof(t) instead of sizeof(t). This is more
  correct because it works with non-primitive types and provides the ABI
  alignment for the type the compiler will use.
- Remove all the *_HDR_ALIGNMENT macros and asserts
- Replace POINTER_ALIGNED_P with ACCESSIBLE_POINTER which is identical to
  ALIGNED_POINTER, but returns that the pointer is always aligned if the
  CPU supports unaligned accesses.
[ as proposed in tech-kern ]

Revision 1.178 / (download) - annotate - [select for diffs], Sun Feb 14 20:58:34 2021 UTC (3 years ago) by christos
Branch: MAIN
Changes since 1.177: +11 -29 lines
Diff to previous 1.177 (colored)

- centralize header align and pullup into a single inline function
- use a single macro to align pointers and expose the alignment, instead
  of hard-coding 3 in 1/2 the macros.
- fix an issue in the ipv6 lt2p where it was aligning for ipv4 and pulling
  for ipv6.

Revision 1.176.2.1 / (download) - annotate - [select for diffs], Mon Dec 14 14:38:14 2020 UTC (3 years, 2 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.176: +2 -16 lines
Diff to previous 1.176 (colored)

Sync w/ HEAD.

Revision 1.177 / (download) - annotate - [select for diffs], Mon Nov 2 12:14:59 2020 UTC (3 years, 3 months ago) by roy
Branch: MAIN
Changes since 1.176: +2 -16 lines
Diff to previous 1.176 (colored)

bridge: revert prior

It's of little use.
If we need to do this in the future, consider a sysctl to do it for all
interfaces in the bridge and not just the one being added.

Revision 1.176 / (download) - annotate - [select for diffs], Sun Sep 27 19:16:28 2020 UTC (3 years, 5 months ago) by roy
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.175: +16 -2 lines
Diff to previous 1.175 (colored)

bridge: When an interface joins then mark addresses on it as tentative

The exact flow is detatch addresses, join bridge and then mark detached
addresses as tentative.
This ensures that Duplicate Address Detection for the joining interface
are performed across all members of the bridge.

Revision 1.175 / (download) - annotate - [select for diffs], Sun Sep 27 00:32:17 2020 UTC (3 years, 5 months ago) by roy
Branch: MAIN
Changes since 1.174: +39 -4 lines
Diff to previous 1.174 (colored)

bridge: Calculate link state as the best link state of any member

If any member is LINK_STATE_UP then it's LINK_STATE_UP.
Otherwise if any member is LINK_STATE_UNKNOWN then it's LINK_STATE_UNKNOWN.
Otherwise it's LINK_STATE_DOWN.

Revision 1.174 / (download) - annotate - [select for diffs], Sat Aug 1 06:50:43 2020 UTC (3 years, 7 months ago) by maxv
Branch: MAIN
Changes since 1.173: +4 -14 lines
Diff to previous 1.173 (colored)

Remove #ifdef BRIDGE_IPF, compile in the code by default. Sent to
tech-net@.

Revision 1.173 / (download) - annotate - [select for diffs], Fri May 1 22:27:42 2020 UTC (3 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.172: +4 -4 lines
Diff to previous 1.172 (colored)

report no enabled capabilities when no interface is part of bridge

Revision 1.172 / (download) - annotate - [select for diffs], Thu Apr 30 10:04:54 2020 UTC (3 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.171: +13 -2 lines
Diff to previous 1.171 (colored)

for bridge(4), report the common enabled capabilities of the members
via SIOCGIFCAP for visibility

Revision 1.171 / (download) - annotate - [select for diffs], Mon Apr 27 20:46:01 2020 UTC (3 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.170: +11 -4 lines
Diff to previous 1.170 (colored)

if MTU of the added interface doesn't match the bridge, modify the MTU
of the interface to that of the bridge instead of just refusing the
addition with EINVAL

this is a convenience feature to simplify bridge setup with non-standard
MTU, the useful behaviour observed with Linux xenbr

Revision 1.156.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.156.2.2: +1 -1 lines
Diff to previous 1.156.2.2 (colored) to branchpoint 1.156 (colored) next main 1.157 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.156.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.156.2.1: +22 -21 lines
Diff to previous 1.156.2.1 (colored) to branchpoint 1.156 (colored)

Merge changes from current as of 20200406

Revision 1.170 / (download) - annotate - [select for diffs], Fri Mar 27 16:47:00 2020 UTC (3 years, 11 months ago) by jdolecek
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.169: +3 -7 lines
Diff to previous 1.169 (colored)

replace the conditional m_pullup() on start of bridge_output() with
a KASSERT(), to make it clear no mbuf manipulation is ever done here

the condition should never trigger, this always runs after ether_output()
M_PREPEND()s ether_header

Revision 1.169 / (download) - annotate - [select for diffs], Tue Mar 24 13:30:54 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.168: +8 -2 lines
Diff to previous 1.168 (colored)

reset the csum_flags in bridge_brodcast() also for bmcast path

for destination interfaces with real hardware offloading this fixes
multicast packet corruption; for xvif(4) this fix stops treating them
as having no csum

may fix PR kern/42386

Revision 1.165.2.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:21:06 2020 UTC (4 years ago) by ad
Branch: ad-namecache
Changes since 1.165: +15 -16 lines
Diff to previous 1.165 (colored) next main 1.166 (colored)

Sync with head.

Revision 1.164.4.1 / (download) - annotate - [select for diffs], Thu Feb 27 18:34:12 2020 UTC (4 years ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.164: +2 -5 lines
Diff to previous 1.164 (colored) next main 1.165 (colored)

Pull up following revision(s) (requested by rin in ticket #734):

	sys/net/if_bridge.c: revision 1.167
	sys/net/if_bridge.c: revision 1.168

disable the DEBUG bridge_calc_csum_flags() printf
 -
Remove debug printf I put into bridge_calc_csum_flags().

Sorry for noise.

Revision 1.168 / (download) - annotate - [select for diffs], Mon Feb 24 00:47:38 2020 UTC (4 years ago) by rin
Branch: MAIN
CVS Tags: ad-namecache-base3
Changes since 1.167: +2 -5 lines
Diff to previous 1.167 (colored)

Remove debug printf I put into bridge_calc_csum_flags().
Sorry for noise.

Revision 1.167 / (download) - annotate - [select for diffs], Sun Feb 23 21:50:21 2020 UTC (4 years ago) by jdolecek
Branch: MAIN
Changes since 1.166: +3 -3 lines
Diff to previous 1.166 (colored)

disable the DEBUG bridge_calc_csum_flags() printf

Revision 1.166 / (download) - annotate - [select for diffs], Wed Jan 29 04:18:34 2020 UTC (4 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.165: +15 -13 lines
Diff to previous 1.165 (colored)

Adopt <net/if_stats.h>.

Revision 1.165 / (download) - annotate - [select for diffs], Mon Aug 5 13:30:21 2019 UTC (4 years, 6 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Changes since 1.164: +3 -3 lines
Diff to previous 1.164 (colored)

 Cast uint32_t to avoid undefined behavior in bridge_rthash(). Found by kUBSan.

Revision 1.156.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.156: +158 -45 lines
Diff to previous 1.156 (colored)

Sync with HEAD

Revision 1.148.2.7 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:04 2018 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.148.2.6: +134 -35 lines
Diff to previous 1.148.2.6 (colored) to branchpoint 1.148 (colored) next main 1.149 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.164 / (download) - annotate - [select for diffs], Sat Dec 22 04:28:30 2018 UTC (5 years, 2 months ago) by rin
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.163: +21 -21 lines
Diff to previous 1.163 (colored)

Take the interface out of promiscuous mode in bridge_delete_member()
instead of bridge_ioctl_del(). Otherwise, the member interfaces are
left in promiscuous mode when the bridge is destroyed.

Revision 1.163 / (download) - annotate - [select for diffs], Sat Dec 15 07:38:58 2018 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.162: +3 -3 lines
Diff to previous 1.162 (colored)

Improve wording in comments: replace "chain" with "queue" for
sequence of mbuf's connected by m_nextpkt, in order to avoid
confusion with those connected by m_next.

No binary changes.

Revision 1.162 / (download) - annotate - [select for diffs], Fri Dec 14 12:27:22 2018 UTC (5 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.161: +3 -2 lines
Diff to previous 1.161 (colored)

Need <netinet6/ip6_var.h> for ip6_statinc() prototype.

Revision 1.161 / (download) - annotate - [select for diffs], Wed Dec 12 01:46:47 2018 UTC (5 years, 2 months ago) by rin
Branch: MAIN
Changes since 1.160: +115 -17 lines
Diff to previous 1.160 (colored)

PR kern/53562

Handle TX offload in software when a packet is sent via
bridge_output(). We can send it as is in the following
exceptional cases:

For unicast:

(1) When the destination interface is the same as source.

(2) When the destination supports all TX offload options
    specified in a packet.

For multicast/broadcast:

(3) When all the members of the bridge support the specified
    TX offload options.

For (3), add sc_csum_flags_tx flag to bridge softc, which is
logical AND b/w capabilities of TX offload options in member
interface (ifp->if_csum_flags_tx). The flag is updated when a
member is (i) added to or (ii) removed from a bridge, or (iii)
if_csum_flags_tx flag of a member interface is manipulated via
ifconfig(8).

Turn on M_CSUM_TSOv[46] bit in ifp->if_csum_flags_tx flag when
TSO[46] is enabled for that interface.

OK msaitoh thorpej

Revision 1.148.2.6 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:50 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.148.2.5: +8 -2 lines
Diff to previous 1.148.2.5 (colored) to branchpoint 1.148 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.160 / (download) - annotate - [select for diffs], Fri Nov 9 06:44:31 2018 UTC (5 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.159: +8 -2 lines
Diff to previous 1.159 (colored)

Fix that brconfig <bridge> (addr) can't show a large number of MAC addresses

The command shows only 256 addresses at maximum even if a bridge caches more
addresses.  It occurs because the kernel doesn't return an error if the command
passes a short buffer that can't store all cached addresses; the kernel fills
cached addresses as much as possible and returns it without telling that the
result is truncated.

Fix the issue by telling a required size of a buffer if a buffer passed from the
command is not enough, which lets the command retry with an enough buffer.

Reported by k-goda@IIJ

Revision 1.134.6.12 / (download) - annotate - [select for diffs], Wed Oct 3 17:57:39 2018 UTC (5 years, 4 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.134.6.11: +20 -12 lines
Diff to previous 1.134.6.11 (colored) to branchpoint 1.134 (colored) next main 1.135 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1046):

	sys/net/if_bridge.c: revision 1.157
	sys/net/if_bridge.c: revision 1.158
	sys/net/if_bridge.c: revision 1.159

  Fix a bug that bridge_enqueue() incorrectly cleared outgoing packet's offload
flags. bridge_enqueue() is called from bridge_output() when a packet is
spontaneous. Clear csum_flags before calling brige_enqueue() in
bridge_forward() or bridge_broadcast() instead of in the beginning of
bridge_enqueue().

Note that this change doesn't fix a problem on the following configuration:

	A bridge has two or more interfaces.
	An address is assigned to an bridge member interface and
	some offload flags are set.
	Another interface has no address and has no any offload flag.

XXX pullup-[78]

- Fix bridge_enqueue() which was broken by last commit. Use correct mbuf
   pointer.
- Modify comment.

Micro optimization. m_copym(M_COPYALL) -> m_copypacket().

Revision 1.148.2.5 / (download) - annotate - [select for diffs], Sun Sep 30 01:45:56 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.148.2.4: +20 -12 lines
Diff to previous 1.148.2.4 (colored) to branchpoint 1.148 (colored)

Ssync with HEAD

Revision 1.159 / (download) - annotate - [select for diffs], Wed Sep 19 07:51:23 2018 UTC (5 years, 5 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930
Changes since 1.158: +6 -7 lines
Diff to previous 1.158 (colored)

Micro optimization. m_copym(M_COPYALL) -> m_copypacket().

Revision 1.158 / (download) - annotate - [select for diffs], Tue Sep 18 09:27:35 2018 UTC (5 years, 5 months ago) by msaitoh
Branch: MAIN
Changes since 1.157: +9 -6 lines
Diff to previous 1.157 (colored)

- Fix bridge_enqueue() which was broken by last commit. Use correct mbuf
  pointer.
- Modify comment.

Revision 1.157 / (download) - annotate - [select for diffs], Fri Sep 14 11:05:09 2018 UTC (5 years, 5 months ago) by msaitoh
Branch: MAIN
Changes since 1.156: +13 -7 lines
Diff to previous 1.156 (colored)

 Fix a bug that bridge_enqueue() incorrectly cleared outgoing packet's offload
flags. bridge_enqueue() is called from bridge_output() when a packet is
spontaneous. Clear csum_flags before calling brige_enqueue() in
bridge_forward() or bridge_broadcast() instead of in the beginning of
bridge_enqueue().

Note that this change doesn't fix a problem on the following configuration:

	A bridge has two or more interfaces.

	An address is assigned to an bridge member interface and
	some offload flags are set.

	Another interface has no address and has no any offload flag.

XXX pullup-[78]

Revision 1.148.2.4 / (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.148.2.3: +3 -4 lines
Diff to previous 1.148.2.3 (colored) to branchpoint 1.148 (colored)

Sync with HEAD

Revision 1.134.6.11 / (download) - annotate - [select for diffs], Thu Jun 7 17:42:25 2018 UTC (5 years, 8 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.134.6.10: +3 -4 lines
Diff to previous 1.134.6.10 (colored) to branchpoint 1.134 (colored)

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

	sys/dev/pci/ixgbe/ixv.c: revision 1.101
	sys/net/if_bridge.c: revision 1.156
	sys/net/if_pppoe.c: revision 1.138
	sys/dev/pci/if_wm.c: revision 1.580
	sys/dev/pci/ixgbe/ixgbe.c: revision 1.156
	sys/net/if_gif.c: revision 1.142

Ensure to call if_register after interface initializations finish

Revision 1.156 / (download) - annotate - [select for diffs], Fri May 25 04:40:27 2018 UTC (5 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.155: +3 -4 lines
Diff to previous 1.155 (colored)

Ensure to call if_register after interface initializations finish

Revision 1.148.2.3 / (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.148.2.2: +4 -6 lines
Diff to previous 1.148.2.2 (colored) to branchpoint 1.148 (colored)

Sync with HEAD

Revision 1.134.6.10 / (download) - annotate - [select for diffs], Tue May 15 13:48:37 2018 UTC (5 years, 9 months ago) by martin
Branch: netbsd-8
Changes since 1.134.6.9: +4 -6 lines
Diff to previous 1.134.6.9 (colored) to branchpoint 1.134 (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.155 / (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.154: +4 -6 lines
Diff to previous 1.154 (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.148.2.2 / (download) - annotate - [select for diffs], Sun Apr 22 07:20:27 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.148.2.1: +61 -50 lines
Diff to previous 1.148.2.1 (colored) to branchpoint 1.148 (colored)

Sync with HEAD

Revision 1.134.6.9 / (download) - annotate - [select for diffs], Wed Apr 18 14:11:42 2018 UTC (5 years, 10 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.134.6.8: +61 -50 lines
Diff to previous 1.134.6.8 (colored) to branchpoint 1.134 (colored)

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

	tests/net/if_bridge/t_rtable.sh: revision 1.3
	sys/net/if_bridge.c: revision 1.150-1.154
	sys/net/if_bridgevar.h: revision 1.32

Remove obsolete NULL checks

Simplify bridge_rtnode_insert (NFC)

bridge: use pslist(9) for rtlist and rthash

The change fixes race conditions on list operations.  One example is that a
reader may see invalid pointers on a looking item in a list due to lack of
membar_producer.

Add a test that checks if brconfig flush surely removes all entries

Get rid of a unnecessary semicolon
Pointed out by kamil@

Add missing PSLIST_ENTRY_INIT and PSLIST_ENTRY_DESTROY

Revision 1.154 / (download) - annotate - [select for diffs], Wed Apr 18 06:37:17 2018 UTC (5 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-0502, pgoyette-compat-0422
Changes since 1.153: +6 -2 lines
Diff to previous 1.153 (colored)

Add missing PSLIST_ENTRY_INIT and PSLIST_ENTRY_DESTROY

Revision 1.153 / (download) - annotate - [select for diffs], Wed Apr 18 06:04:03 2018 UTC (5 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.152: +3 -3 lines
Diff to previous 1.152 (colored)

Get rid of a unnecessary semicolon

Pointed out by kamil@

Revision 1.152 / (download) - annotate - [select for diffs], Wed Apr 18 04:01:58 2018 UTC (5 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.151: +43 -15 lines
Diff to previous 1.151 (colored)

bridge: use pslist(9) for rtlist and rthash

The change fixes race conditions on list operations.  One example is that a
reader may see invalid pointers on a looking item in a list due to lack of
membar_producer.

Revision 1.151 / (download) - annotate - [select for diffs], Wed Apr 18 03:49:44 2018 UTC (5 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.150: +13 -28 lines
Diff to previous 1.150 (colored)

Simplify bridge_rtnode_insert (NFC)

Revision 1.150 / (download) - annotate - [select for diffs], Wed Apr 18 03:47:28 2018 UTC (5 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.149: +8 -14 lines
Diff to previous 1.149 (colored)

Remove obsolete NULL checks

Revision 1.148.2.1 / (download) - annotate - [select for diffs], Mon Apr 16 02:00:08 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.148: +6 -2 lines
Diff to previous 1.148 (colored)

Sync with HEAD, resolve some conflicts

Revision 1.134.6.8 / (download) - annotate - [select for diffs], Tue Apr 10 11:48:29 2018 UTC (5 years, 10 months ago) by martin
Branch: netbsd-8
Changes since 1.134.6.7: +6 -2 lines
Diff to previous 1.134.6.7 (colored) to branchpoint 1.134 (colored)

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

	tests/net/if_bridge/t_rtable.sh: revision 1.2
	sys/net/if_bridge.c: revision 1.149

Fix bridge_rtdelete

It removes a rtable entry that belongs to a specified interface, however,
its original behavior was to delete all belonging entries.
Restore the original behavior.

Add a test case for bridge_rtdelete

Revision 1.149 / (download) - annotate - [select for diffs], Tue Apr 10 07:05:39 2018 UTC (5 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-0415
Changes since 1.148: +6 -2 lines
Diff to previous 1.148 (colored)

Fix bridge_rtdelete

It removes a rtable entry that belongs to a specified interface, however, its
original behavior was to delete all belonging entries.  Restore the original
behavior.

Revision 1.134.6.7 / (download) - annotate - [select for diffs], Mon Feb 26 00:41:13 2018 UTC (6 years ago) by snj
Branch: netbsd-8
Changes since 1.134.6.6: +4 -8 lines
Diff to previous 1.134.6.6 (colored) to branchpoint 1.134 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #572):
	sys/net/if_bridge.c: 1.138, 1.148
	tests/net/if_bridge/t_bridge.sh: 1.18
	tests/net/if_gif/t_gif.sh: 1.12
	tests/net/if_ipsec/t_ipsec.sh: 1.3
	tests/net/if_l2tp/t_l2tp.sh: 1.4
	tests/net/if_loop/t_basic.sh: 1.2
	tests/net/if_pppoe/t_pppoe.sh: 1.18
	tests/net/if_tap/t_tap.sh: 1.7
	tests/net/if_tun/Makefile: 1.2
	tests/net/if_tun/t_tun.sh: 1.5
	tests/net/if_vlan/t_vlan.sh: 1.8
	tests/net/net_common.sh: 1.26
Remove unnecessary splsoftnet
--
If the bridge is not running, don't call bridge_stop. Otherwise the
following commands will crash the kernel:
        ifconfig bridge0 create
        ifconfig bridge0 destroy
--
Commonalize and add tests of creating/destroying interfaces

Revision 1.134.6.6 / (download) - annotate - [select for diffs], Tue Jan 16 13:01:10 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-8
Changes since 1.134.6.5: +4 -3 lines
Diff to previous 1.134.6.5 (colored) to branchpoint 1.134 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #497):
	tests/rump/rumpkern/Makefile: revision 1.16
	tests/rump/kernspace/Makefile: revision 1.6
	tests/rump/kernspace/workqueue.c: revision 1.1
	tests/rump/kernspace/workqueue.c: revision 1.2
	tests/rump/kernspace/workqueue.c: revision 1.3
	tests/rump/kernspace/workqueue.c: revision 1.4
	tests/rump/kernspace/workqueue.c: revision 1.5
	tests/rump/kernspace/workqueue.c: revision 1.6
	tests/rump/rumpkern/t_workqueue.c: revision 1.1
	sys/sys/workqueue.h: revision 1.10
	tests/rump/rumpkern/t_workqueue.c: revision 1.2
	tests/rump/kernspace/kernspace.h: revision 1.5
	tests/rump/kernspace/kernspace.h: revision 1.6
	sys/net/if_bridge.c: revision 1.147
	distrib/sets/lists/debug/mi: revision 1.225
	sys/kern/subr_workqueue.c: revision 1.34
	share/man/man9/workqueue.9: revision 1.12
	sys/net/if_spppsubr.c: revision 1.178
	distrib/sets/lists/tests/mi: revision 1.763
Add simple test for workqueue(9)
Add declaration. build fix
sorry, I forgot to commit this file.
Tweak use of cv_timedwait
- Handle its return value
- Specify more appropriate time-out periods (2 ticks is too short)
Fix a race condition on taking the mutex
The workqueue worker can take the mutex before the tester tries to take it after
calling workqueue_enqueue. If it happens, the worker calls cv_broadcast before
the tester calls cv_timedwait and the tester will wait until the cv timed out
Take the mutex before calling workqueue_enqueue so that the tester surely calls
cv_timedwait before the worker calls cv_broadcast.
The fix stabilizes the test, t_workqueue/workqueue1.
Add workqueue_wait that waits for a specific work to finish
The caller must ensure that no new work is enqueued before calling
workqueue_wait. Note that Note that if the workqueue is WQ_PERCPU, the caller
can enqueue a new work to another queue other than the waiting queue.
Discussed on tech-kern@
Ensure the timer isn't running by using workqueue_wait
Functionalize some routines to add new tests easily (NFC)
Add a test case for workqueue_wait
Fix build

Revision 1.148 / (download) - annotate - [select for diffs], Mon Jan 15 09:49:16 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.147: +4 -3 lines
Diff to previous 1.147 (colored)

If the bridge is not running, don't call bridge_stop. Otherwise the
following commands will crash the kernel:

	ifconfig bridge0 create
	ifconfig bridge0 destroy

Revision 1.134.6.5 / (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.134.6.4: +17 -13 lines
Diff to previous 1.134.6.4 (colored) to branchpoint 1.134 (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.147 / (download) - annotate - [select for diffs], Thu Dec 28 07:06:36 2017 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.146: +4 -3 lines
Diff to previous 1.146 (colored)

Ensure the timer isn't running by using workqueue_wait

Revision 1.146 / (download) - annotate - [select for diffs], Tue Dec 19 03:32:35 2017 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.145: +6 -3 lines
Diff to previous 1.145 (colored)

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.145 / (download) - annotate - [select for diffs], Mon Dec 11 03:29:20 2017 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.144: +6 -6 lines
Diff to previous 1.144 (colored)

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...

Revision 1.134.6.4 / (download) - annotate - [select for diffs], Sun Dec 10 10:10:24 2017 UTC (6 years, 2 months ago) by snj
Branch: netbsd-8
Changes since 1.134.6.3: +65 -54 lines
Diff to previous 1.134.6.3 (colored) to branchpoint 1.134 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #427):
	sys/arch/amiga/dev/if_bah_zbus.c: 1.17
	sys/arch/arm/broadcom/bcm53xx_eth.c: 1.30
	sys/arch/powerpc/booke/dev/pq3etsec.c: 1.32
	sys/arch/usermode/dev/if_veth.c: 1.9
	sys/dev/ic/an.c: 1.66
	sys/dev/ic/athn.c: 1.17
	sys/dev/ic/atw.c: 1.162
	sys/dev/ic/bwi.c: 1.33
	sys/dev/ic/dwc_gmac.c: 1.41-1.42
	sys/dev/ic/malo.c: 1.10
	sys/dev/ic/rt2560.c: 1.31
	sys/dev/ic/rt2661.c: 1.36
	sys/dev/ic/rt2860.c: 1.29
	sys/dev/ic/rtw.c: 1.127
	sys/dev/ic/rtwvar.h: 1.46
	sys/dev/ic/smc90cx6.c: 1.71
	sys/dev/ic/smc90cx6var.h: 1.12
	sys/dev/ic/wi.c: 1.244
	sys/dev/pci/if_ipw.c: 1.66
	sys/dev/pci/if_iwi.c: 1.104
	sys/dev/pci/if_iwm.c: 1.76
	sys/dev/pci/if_iwn.c: 1.86
	sys/dev/pci/if_rtwn.c: 1.13
	sys/dev/pci/if_wm.c: 1.541
	sys/dev/pci/if_wpi.c: 1.79
	sys/dev/pci/ixgbe/ixgbe.c: 1.106
	sys/dev/pci/ixgbe/ixv.c: 1.73 via patch
	sys/dev/pcmcia/if_malo_pcmcia.c: 1.15
	sys/dev/scsipi/if_se.c: 1.95
	sys/dev/usb/if_upl.c: 1.60
	sys/net/if.c: 1.396
	sys/net/if.h: 1.241
	sys/net/if_arc.h: 1.23
	sys/net/if_arcsubr.c: 1.78
	sys/net/if_bridge.c: 1.136-1.137
	sys/net/if_etherip.c: 1.39
	sys/net/if_faith.c: 1.56
	sys/net/if_gif.c: 1.131
	sys/net/if_loop.c: 1.96
	sys/net/if_mpls.c: 1.30
	sys/net/if_pppoe.c: 1.129
	sys/net/if_srt.c: 1.27
	sys/net/if_stf.c: 1.102
	sys/net/if_tap.c: 1.100
	sys/net/if_vlan.c: 1.105
	sys/netinet/ip_carp.c: 1.91
	sys/rump/net/lib/libshmif/if_shmem.c: 1.73-1.74
	sys/rump/net/lib/libvirtif/if_virt.c: 1.55-1.56
 if_initalize() and if_attach() failed when resource allocation failed
(e.g. allocating softint). Without this change, it panics. It's bad because
resource shortage really occured when a lot of pseudo interface is created.
To avoid this problem, don't panic and change return value of if_initialize()
and if_attach() to int. Caller fanction will be recover from error cleanly by
checking the return value.
 Return if bah_attach_subr() failed.
 If if_attach() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add some missing frees in bridge_clone_destroy().
- KNF
 If error occured in bcmeth_ccb_attach(), free resources and return.
 If error occured in pq3etsec_attach(), free resources and return.
 If error occured in the attach function, free resources and return.
- If if_initialize() failed in athn_attach(), free resources and return.
- Add missing pmf_event_deregister() in athn_detach().
- Free resources correctly on some errors in atw_attach().
- Use apint*() insread of printf() in the attach function.
 If if_initialize() failed in the attach function, return.
- If if_initialize() failed in the attach function, free resources and return.
- Add missing dwc_gmac_free_dma_rings() and mutex_destroy() when attach
   failed.
- If if_initialize() failed in the attach function, free resources and return.
- ifp is always not NULL in iwi_detach(). Check correctly with ifp->if_softc.
- If if_initialize() failed in the attach function, free resources and return.
- Fix error path in the attach function correctly.
 If if_initialize() failed in the attach function, free resources and return.
 If if_attach() failed in the attach function, free resources and return.
 - If if_initialize() failed in the attach function, free resources and return.
 - KNF
 - If if_attach() failed in the attach function, free resources and return.
 - KNF
 Fix compile error.
 Fix compile error.
We don't need '&mii', but just 'mii' for mii_detach().
Don't free sc_rthash twice

Revision 1.144 / (download) - annotate - [select for diffs], Fri Dec 8 04:03:51 2017 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.143: +8 -4 lines
Diff to previous 1.143 (colored)

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

Revision 1.143 / (download) - annotate - [select for diffs], Wed Dec 6 07:40:16 2017 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.142: +6 -10 lines
Diff to previous 1.142 (colored)

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

Revision 1.142 / (download) - annotate - [select for diffs], Wed Dec 6 05:11:10 2017 UTC (6 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.141: +5 -4 lines
Diff to previous 1.141 (colored)

Ensure to hold if_ioctl_lock when calling if_flags_set

Revision 1.76.2.2 / (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.76.2.1: +854 -682 lines
Diff to previous 1.76.2.1 (colored) to branchpoint 1.76 (colored) next main 1.77 (colored)

update from HEAD

Revision 1.134.6.3 / (download) - annotate - [select for diffs], Thu Nov 23 13:34:24 2017 UTC (6 years, 3 months ago) by martin
Branch: netbsd-8
Changes since 1.134.6.2: +3 -3 lines
Diff to previous 1.134.6.2 (colored) to branchpoint 1.134 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #386):
	sys/net/if_bridge.c: revision 1.141
Add missing IFEF_NO_LINK_STATE_CHANGE to bridge

Revision 1.134.6.2 / (download) - annotate - [select for diffs], Thu Nov 23 02:13:31 2017 UTC (6 years, 3 months ago) by snj
Branch: netbsd-8
Changes since 1.134.6.1: +4 -4 lines
Diff to previous 1.134.6.1 (colored) to branchpoint 1.134 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #382):
	sys/net/if_bridge.c: revision 1.139
	sys/net/if_loop.c: revision 1.97
Don't take KERNEL_LOCK in looutput if NET_MPSAFE
We can perhaps get rid of KERNEL_LOCK from looutput, but for now
keep it for safe.
--
Mark callouts of bridge CALLOUT_MPSAFE

Revision 1.141 / (download) - annotate - [select for diffs], Fri Nov 17 07:52:07 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.140: +3 -3 lines
Diff to previous 1.140 (colored)

Add missing IFEF_NO_LINK_STATE_CHANGE to bridge

Revision 1.140 / (download) - annotate - [select for diffs], Thu Nov 16 03:07:18 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.139: +4 -4 lines
Diff to previous 1.139 (colored)

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@

Revision 1.139 / (download) - annotate - [select for diffs], Wed Nov 15 06:17:40 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.138: +4 -4 lines
Diff to previous 1.138 (colored)

Mark callouts of bridge CALLOUT_MPSAFE

Revision 1.138 / (download) - annotate - [select for diffs], Wed Oct 25 04:33:15 2017 UTC (6 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.137: +2 -7 lines
Diff to previous 1.137 (colored)

Remove unnecessary splsoftnet

Revision 1.137 / (download) - annotate - [select for diffs], Wed Oct 25 04:17:34 2017 UTC (6 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.136: +2 -3 lines
Diff to previous 1.136 (colored)

Don't free sc_rthash twice

Revision 1.136 / (download) - annotate - [select for diffs], Mon Oct 23 09:22:51 2017 UTC (6 years, 4 months ago) by msaitoh
Branch: MAIN
Changes since 1.135: +66 -54 lines
Diff to previous 1.135 (colored)

- If if_initialize() failed in the attach function, free resources and return.
- Add some missing frees in bridge_clone_destroy().
- KNF

Revision 1.134.6.1 / (download) - annotate - [select for diffs], Mon Oct 2 13:33:41 2017 UTC (6 years, 4 months ago) by martin
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.134: +10 -2 lines
Diff to previous 1.134 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #297):
	sys/net/if_bridge.c: revision 1.135
Add curlwp_bind to bridge_input for psref
It can be called in a thread context via tap (tap_dev_write).
Fix PR kern/52587

Revision 1.135 / (download) - annotate - [select for diffs], Mon Oct 2 07:40:24 2017 UTC (6 years, 5 months ago) by ozaki-r
Branch: MAIN
Changes since 1.134: +10 -2 lines
Diff to previous 1.134 (colored)

Add curlwp_bind to bridge_input for psref

It can be called in a thread context via tap (tap_dev_write).

Fix PR kern/52587

Revision 1.90.2.1 / (download) - annotate - [select for diffs], Sun Sep 24 20:05:03 2017 UTC (6 years, 5 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.90: +5 -2 lines
Diff to previous 1.90 (colored) next main 1.91 (colored)

Pull up following revision(s) (requested by manu in ticket #1409):
	sys/arch/xen/xen/if_xennet_xenbus.c: 1.65
	sys/arch/xen/xen/xennetback_xenbus.c: 1.53, 1.56 via patch
	sys/net/if_bridge.c: 1.105
	sys/net/if_ether.h: 1.65
	sys/net/if_ethersubr.c: 1.215, 1.235
	sys/net/if_vlan.c: 1.76, 1.77, 1.83, 1.88, 1.94
Protect vlan_unconfig with a mutex
It is not thread-safe but is likely to be executed in concurrent.
See PR 49264 for more detail.
--
Tweak vlan_unconfig
No functional change.
--
Add handling of VLAN packets in if_bridge where the parent interface supports
them (Jean-Jacques.Puig%espci.fr@localhost). Factor out the vlan_mtu enabling and
disabling code.
--
Enable the VLAN mtu capability and check for the adjusted packet size
(Jean-Jacques.Puig at espci.fr).
Factor out the packet-size checking function for clarity.
--
Don't increment the reference count only when it was 0...
From Jean-Jacques.Puig
--
Account for the CRC len (Jean-Jacques.Puig)
--
Fix a bug that the parent interface's callback wasn't called when the vlan
interface is configured. A callback function uses VLAN_ATTACHED() function
which check ec->ec_nvlans, the value should be incremented before calling the
callback. This bug was added in if_vlan.c rev. 1.83 (2015/11/19).

Revision 1.91.2.11 / (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.91.2.10: +10 -19 lines
Diff to previous 1.91.2.10 (colored) to branchpoint 1.91 (colored) next main 1.92 (colored)

Sync with HEAD

Revision 1.131.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:05 2017 UTC (6 years, 10 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.131: +16 -25 lines
Diff to previous 1.131 (colored) next main 1.132 (colored)

Sync with HEAD

Revision 1.129.2.2 / (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.129.2.1: +16 -25 lines
Diff to previous 1.129.2.1 (colored) to branchpoint 1.129 (colored) next main 1.130 (colored)

Sync with HEAD

Revision 1.134 / (download) - annotate - [select for diffs], Tue Mar 7 01:53:53 2017 UTC (6 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, 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: netbsd-8
Changes since 1.133: +2 -14 lines
Diff to previous 1.133 (colored)

Remove unnecessary splnet for bridge_enqueue

bridge_enqueue now uses if_transmit_lock that does splnet for device
drivers, so splnet for bridge_enqueue isn't needed anymore.

Revision 1.133 / (download) - annotate - [select for diffs], Thu Feb 16 08:12:44 2017 UTC (7 years ago) by knakahara
Branch: MAIN
Changes since 1.132: +10 -7 lines
Diff to previous 1.132 (colored)

add l2tp(4) L2TPv3 interface.

originally implemented by IIJ SEIL team.

Revision 1.91.2.10 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:58 2017 UTC (7 years ago) by skrll
Branch: nick-nhusb
Changes since 1.91.2.9: +8 -8 lines
Diff to previous 1.91.2.9 (colored) to branchpoint 1.91 (colored)

Sync with HEAD

Revision 1.132 / (download) - annotate - [select for diffs], Mon Jan 23 10:19:03 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204
Changes since 1.131: +8 -8 lines
Diff to previous 1.131 (colored)

Replace some splnet with splsoftnet

Revision 1.129.2.1 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:20 2016 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.129: +4 -4 lines
Diff to previous 1.129 (colored)

Sync with HEAD

Revision 1.91.2.9 / (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.91.2.8: +76 -76 lines
Diff to previous 1.91.2.8 (colored) to branchpoint 1.91 (colored)

Sync with HEAD

Revision 1.131 / (download) - annotate - [select for diffs], Thu Sep 15 14:40:43 2016 UTC (7 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, pgoyette-localcount-20161104, nick-nhusb-base-20161204, nick-nhusb-base-20161004, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.130: +4 -4 lines
Diff to previous 1.130 (colored)

Always do the mbuf checks. The packet filters (npf) expect the mbuf to be
pulled-up. (Krists Krilovs)

Revision 1.130 / (download) - annotate - [select for diffs], Mon Aug 29 03:31:59 2016 UTC (7 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: localcount-20160914
Changes since 1.129: +74 -74 lines
Diff to previous 1.129 (colored)

KNF; replace white spaces with hard tabs

No functional change.

Revision 1.91.2.8 / (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.91.2.7: +33 -14 lines
Diff to previous 1.91.2.7 (colored) to branchpoint 1.91 (colored)

Sync with HEAD

Revision 1.129 / (download) - annotate - [select for diffs], Wed Jun 22 10:44:32 2016 UTC (7 years, 8 months ago) by knakahara
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Changes since 1.128: +3 -3 lines
Diff to previous 1.128 (colored)

fix: locking about IFQ_ENQUEUE and ALTQ

- If NET_MPSAFE is not defined, IFQ_LOCK is nop. Currently, that means
  IFQ_ENQUEUE() of some paths such as bridge_enqueue() is called parallel
  wrongly.
- If ALTQ is enabled, Tx processing should call if_transmit() (= IFQ_ENQUEUE
  + ifp->if_start()) instead of ifp->if_transmit() to call ALTQ_ENQUEUE()
  and ALTQ_DEQUEUE().
  Furthermore, ALTQ processing is always required KERNEL_LOCK currently.

Revision 1.128 / (download) - annotate - [select for diffs], Mon Jun 20 08:14:41 2016 UTC (7 years, 8 months ago) by knakahara
Branch: MAIN
Changes since 1.127: +8 -2 lines
Diff to previous 1.127 (colored)

fix: should not assert IFEF_OUTPUT_MPSAFE in bridge_output()

Revision 1.127 / (download) - annotate - [select for diffs], Mon Jun 20 07:23:56 2016 UTC (7 years, 8 months ago) by knakahara
Branch: MAIN
Changes since 1.126: +2 -4 lines
Diff to previous 1.126 (colored)

tentative fix for ATF(net/if_bridge/t_bridge)

Revision 1.126 / (download) - annotate - [select for diffs], Mon Jun 20 07:06:06 2016 UTC (7 years, 8 months ago) by knakahara
Branch: MAIN
Changes since 1.125: +7 -2 lines
Diff to previous 1.125 (colored)

make bridge_output MP-safe, so that bridge(4) can enable IFEF_OUTPUT_MPSAFE.

making MP-scalable is future work.

Revision 1.125 / (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.124: +19 -10 lines
Diff to previous 1.124 (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.124 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:16 2016 UTC (7 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.123: +6 -5 lines
Diff to previous 1.123 (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.91.2.7 / (download) - annotate - [select for diffs], Sun May 29 08:44:38 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.91.2.6: +73 -29 lines
Diff to previous 1.91.2.6 (colored) to branchpoint 1.91 (colored)

Sync with HEAD

Revision 1.123 / (download) - annotate - [select for diffs], Mon May 16 01:23:51 2016 UTC (7 years, 9 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.122: +25 -13 lines
Diff to previous 1.122 (colored)

Apply if_get and if_put to bridge(4)

Revision 1.122 / (download) - annotate - [select for diffs], Wed May 4 18:59:55 2016 UTC (7 years, 9 months ago) by roy
Branch: MAIN
Changes since 1.121: +47 -4 lines
Diff to previous 1.121 (colored)

Allow multicast/broadcast packets from a bridge member to other members.
Note this should just call bridge_broadcast when more locking issues are
resolved.

Revision 1.121 / (download) - annotate - [select for diffs], Thu Apr 28 01:37:17 2016 UTC (7 years, 10 months ago) by knakahara
Branch: MAIN
Changes since 1.120: +4 -13 lines
Diff to previous 1.120 (colored)

introduce new ifnet MP-scalable sending interface "if_transmit".

Revision 1.120 / (download) - annotate - [select for diffs], Thu Apr 28 00:16:56 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored)

Constify rtentry of if_output

We no longer need to change rtentry below if_output.

The change makes it clear where rtentries are changed (or not)
and helps forthcoming locking (os psrefing) rtentries.

Revision 1.119 / (download) - annotate - [select for diffs], Sun Apr 24 18:08:40 2016 UTC (7 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.118: +2 -4 lines
Diff to previous 1.118 (colored)

CID 1358673: dead code

Revision 1.91.2.6 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:17 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.91.2.5: +170 -186 lines
Diff to previous 1.91.2.5 (colored) to branchpoint 1.91 (colored)

Sync with HEAD

Revision 1.118 / (download) - annotate - [select for diffs], Fri Apr 22 00:25:42 2016 UTC (7 years, 10 months ago) by roy
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422
Changes since 1.117: +10 -5 lines
Diff to previous 1.117 (colored)

Change used from int to bool.
If used, abort the loop because we think we're already at the end.

Revision 1.117 / (download) - annotate - [select for diffs], Wed Apr 20 09:01:04 2016 UTC (7 years, 10 months ago) by knakahara
Branch: MAIN
Changes since 1.116: +3 -4 lines
Diff to previous 1.116 (colored)

IFQ_ENQUEUE refactor (3/3) : eliminate pktattr argument from IFQ_ENQUEUE caller

Revision 1.116 / (download) - annotate - [select for diffs], Wed Apr 20 08:58:48 2016 UTC (7 years, 10 months ago) by knakahara
Branch: MAIN
Changes since 1.115: +3 -3 lines
Diff to previous 1.115 (colored)

IFQ_ENQUEUE refactor (2/3) : eliminate pktattr argument from altq implemantation

Revision 1.115 / (download) - annotate - [select for diffs], Tue Apr 19 07:10:22 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.114: +91 -99 lines
Diff to previous 1.114 (colored)

Apply psref(9) to bridge(4)

Note that there is an issue that ioctls for an interface and a destruction
of the interface can run in parallel and it causes race conditions on
bridge as well (it rarely happens). The issue will be addressed in the
interface common code (if.c).

Revision 1.114 / (download) - annotate - [select for diffs], Tue Apr 19 07:03:12 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.113: +59 -74 lines
Diff to previous 1.113 (colored)

Remove BRIDGE_MPSAFE switch and enable MP-safe code by default

We need to enable it by default because bridge_input now runs
in softint, but bridge_input w/o BRIDGE_MPSAFE was designed as
it runs in hardware interrupt.

Note that there remains a racy code in bridge_output; it will be
solved in the upcoming change (applying psref(9)).

Revision 1.113 / (download) - annotate - [select for diffs], Mon Apr 11 05:40:47 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.112: +6 -7 lines
Diff to previous 1.112 (colored)

Fix usage of pslist(9)

Pointed out by riastradh@.

Revision 1.112 / (download) - annotate - [select for diffs], Mon Apr 11 02:04:14 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.111: +32 -15 lines
Diff to previous 1.111 (colored)

Use pslist(9) in bridge(4)

This adds missing memory barriers to list operations for pserialize.

Revision 1.111 / (download) - annotate - [select for diffs], Mon Mar 28 04:38:04 2016 UTC (7 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.110: +2 -15 lines
Diff to previous 1.110 (colored)

Remove unused global bridge list

Pointed out by riastradh@

Revision 1.110 / (download) - annotate - [select for diffs], Wed Mar 23 05:44:01 2016 UTC (7 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.109: +4 -4 lines
Diff to previous 1.109 (colored)

Fix LIST_FOREACH argument

Revision 1.109 / (download) - annotate - [select for diffs], Wed Mar 23 04:56:21 2016 UTC (7 years, 11 months ago) by ozaki-r
Branch: MAIN
Changes since 1.108: +3 -3 lines
Diff to previous 1.108 (colored)

Use LIST_FOREACH instead of LIST_FOREACH_SAFE

No need to use *_SAFE because we don't remove any items in the loop.

Revision 1.91.2.5 / (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.91.2.4: +128 -270 lines
Diff to previous 1.91.2.4 (colored) to branchpoint 1.91 (colored)

Sync with HEAD

Revision 1.108 / (download) - annotate - [select for diffs], Mon Feb 15 01:11:41 2016 UTC (8 years ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319
Changes since 1.107: +119 -263 lines
Diff to previous 1.107 (colored)

Simplify bridge(4)

Thanks to introducing softint-based if_input, the entire bridge code now
never run in hardware interrupt context. So we can simplify the code.

- Remove spin mutexes
  - They were needed because some code of bridge could run in
    hardware interrupt context
  - We now need only an adaptive mutex for each shared object
    (a member list and a forwarding table)
- Remove pktqueue
  - bridge_input is already in softint, using another softint
    (for bridge_forward) is useless
  - Packet distribution should be down at device drivers

Revision 1.107 / (download) - annotate - [select for diffs], Wed Feb 10 06:30:23 2016 UTC (8 years ago) by ozaki-r
Branch: MAIN
Changes since 1.106: +4 -5 lines
Diff to previous 1.106 (colored)

Don't share struct work, instead have one per softc

Pointed out by riastradh@

Revision 1.106 / (download) - annotate - [select for diffs], Tue Feb 9 08:32:12 2016 UTC (8 years ago) by ozaki-r
Branch: MAIN
Changes since 1.105: +9 -6 lines
Diff to previous 1.105 (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.91.2.4 / (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.91.2.3: +16 -5 lines
Diff to previous 1.91.2.3 (colored) to branchpoint 1.91 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.105 / (download) - annotate - [select for diffs], Thu Nov 19 16:23:54 2015 UTC (8 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.104: +5 -2 lines
Diff to previous 1.104 (colored)


Add handling of VLAN packets in if_bridge where the parent interface supports
them (Jean-Jacques.Puig@espci.fr). Factor out the vlan_mtu enabling and
disabling code.

Revision 1.104 / (download) - annotate - [select for diffs], Tue Oct 20 14:46:45 2015 UTC (8 years, 4 months ago) by maxv
Branch: MAIN
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored)

Harmless alloc inconsistency; make sure the exact same argument is given to
kmem_alloc/kmem_free. Found by Brainy.

Revision 1.103 / (download) - annotate - [select for diffs], Wed Oct 7 08:48:04 2015 UTC (8 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.102: +12 -4 lines
Diff to previous 1.102 (colored)

Enqueue frames to a curcpu's pktqueue

Currently RX can run on a CPU other than CPU#0, so always enqueuing
to a pktqueue of CPU#0 makes no sense. Let's use a curcpu's pktqueue,
although bridge_foward softint doesn't run in parallel without
NET_MPSAFE.

This is a temporal solution. We need a fundamental solution.

Revision 1.91.2.3 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:10 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.91.2.2: +23 -20 lines
Diff to previous 1.91.2.2 (colored) to branchpoint 1.91 (colored)

Sync with HEAD

Revision 1.102 / (download) - annotate - [select for diffs], Fri Aug 28 14:23:18 2015 UTC (8 years, 6 months ago) by rjs
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.101: +2 -3 lines
Diff to previous 1.101 (colored)

Don't set M_PROTO1 in mbuf flags.

This was left over from the old usage of gif(4) with bridges.

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

include "ioconf.h" to get the 'void <driver>attach(int count);' prototype.

Revision 1.100 / (download) - annotate - [select for diffs], Thu Jul 23 10:52:34 2015 UTC (8 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.99: +21 -17 lines
Diff to previous 1.99 (colored)

Fix PR 48104

So far bridge cannot receive frames via a member interface when the frames
come from another member interface. So when we assign an IP address to
a member interface, hosts connected to another member interface cannot
ping to the IP address. That behavior isn't expected. See PR 48104 for
more realistic examples of this issue.

The change does:
- drop M_PROMISC before ether_input, which allows a bridge member interface
  to receive a frame coming from another bridge member interface
- receive broadcast/multicast frames via all bridge member interfaces,
  which is required to receive IPv6 multicast packets destined to a
  multicast group belonging to a bridge member interface that is different
  from a packet arrival interface

roy@ helped testing of the fix, thanks!

Revision 1.91.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.91.2.1: +54 -36 lines
Diff to previous 1.91.2.1 (colored) to branchpoint 1.91 (colored)

Sync with HEAD

Revision 1.99 / (download) - annotate - [select for diffs], Mon Jun 1 06:14:43 2015 UTC (8 years, 9 months ago) by matt
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.98: +28 -13 lines
Diff to previous 1.98 (colored)

Modify the BRDGGIFS and BRDGRTS cmds to be more COMPAT_NETBSD32 friendly.
(XXX whitespace)

Revision 1.98 / (download) - annotate - [select for diffs], Thu Apr 16 08:54:15 2015 UTC (8 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.97: +8 -5 lines
Diff to previous 1.97 (colored)

Fix racy bridge_delete_member

It can be called from bridge_ioctl_del and bridge_clone_destroy with
a same bridge member (bif) at the same time. We have to prevent
that happens.

Pointed out by riastradh@

Revision 1.91.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.91: +408 -182 lines
Diff to previous 1.91 (colored)

Sync with HEAD

Revision 1.97 / (download) - annotate - [select for diffs], Thu Jan 8 10:47:44 2015 UTC (9 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.96: +281 -109 lines
Diff to previous 1.96 (colored)

Use pserialize for rtlist in bridge

This change enables lockless accesses to bridge rtable lists.
See locking notes in a comment to know how pserialize and
mutexes are used. Some functions are rearranged to use
pserialize. A workqueue is introduced to use pserialize in
bridge_rtage via bridge_timer callout.

As usual, pserialize and mutexes are used only when NET_MPSAFE
on. On the other hand, the newly added workqueue is used
regardless of NET_MPSAFE on or off.

Revision 1.96 / (download) - annotate - [select for diffs], Thu Jan 1 08:43:26 2015 UTC (9 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.95: +5 -2 lines
Diff to previous 1.95 (colored)

Reset the expire time of a cache on receiving a frame for the cache

The expire time of a cache in a bridge MAC address table was never reset
once it is initialized regardless of traffic for the cache. The behavior
isn't supposed and active caches are unnecessarily expired and removed.

PR kern/49507

Revision 1.95 / (download) - annotate - [select for diffs], Wed Dec 31 17:36:24 2014 UTC (9 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.94: +86 -47 lines
Diff to previous 1.94 (colored)

Use pserialize in bridge

This change enables lockless accesses to bridge member lists.
See locking notes in a comment to know how pserialize and
mutexes are used.

This change also provides support for softint-based interrupt
handling; pserialize readers can run in both HW interrupt and
softint contexts.

As usual, pserialize is used only when NET_MPSAFE on.

Revision 1.94 / (download) - annotate - [select for diffs], Thu Dec 25 09:10:01 2014 UTC (9 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.93: +6 -10 lines
Diff to previous 1.93 (colored)

Use LIST_FOREACH_SAFE in bridge_rt* functions

Revision 1.93 / (download) - annotate - [select for diffs], Wed Dec 24 08:55:09 2014 UTC (9 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.92: +37 -22 lines
Diff to previous 1.92 (colored)

Replace malloc/free with kmem_* in if_bridge

Additionally M_NOWAIT is replaced with KM_SLEEP.

Revision 1.92 / (download) - annotate - [select for diffs], Mon Dec 22 09:42:45 2014 UTC (9 years, 2 months ago) by ozaki-r
Branch: MAIN
Changes since 1.91: +11 -10 lines
Diff to previous 1.91 (colored)

Call ether_input/m_freem without holding a lock or referencing unnecessary objects

When NET_MPSAFE on, a bridge tries to pass up a packet to Layer 3
(or call m_freem) with holding a lock or referencing unnecessary
objects. That causes random lock ups. The change fixes the issue.

Revision 1.76.2.1 / (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.76: +530 -214 lines
Diff to previous 1.76 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.91 / (download) - annotate - [select for diffs], Fri Aug 15 15:32:24 2014 UTC (9 years, 6 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.90: +6 -2 lines
Diff to previous 1.90 (colored)

bridge: reject non-IFF_SIMPLEX interfaces

bridge does not work with !IFF_SIMPLEX interfaces (PR/18035);
the bug is not yet fixed. Until it gets fixed, we should
reject non-IFF_SIMPLEX interfaces.

Discussed with pooka@

Revision 1.77.4.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.77: +512 -191 lines
Diff to previous 1.77 (colored) next main 1.78 (colored)

Rebase.

Revision 1.90 / (download) - annotate - [select for diffs], Wed Jul 23 05:32:23 2014 UTC (9 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, 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
Branch point for: netbsd-7
Changes since 1.89: +30 -25 lines
Diff to previous 1.89 (colored)

Avoid calling copyout with holding mutex(IPL_NET)

Because copyout may lead a page fault that may sleep, we have to pull it
out from the critical section of mutex(IPL_NET) in bridge_ioctl_gifs.

Revision 1.89 / (download) - annotate - [select for diffs], Wed Jul 23 04:09:48 2014 UTC (9 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.88: +3 -2 lines
Diff to previous 1.88 (colored)

Add missing unlock

Revision 1.88 / (download) - annotate - [select for diffs], Sun Jul 20 16:40:34 2014 UTC (9 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.87: +7 -2 lines
Diff to previous 1.87 (colored)

Don't return ENETRESET when ioctl SIOCSIFMTU

Otherwise, just changing MTU with ifconfig shows
a confusable error message.

RP kern/48996

Revision 1.87 / (download) - annotate - [select for diffs], Mon Jul 14 02:34:36 2014 UTC (9 years, 7 months ago) by ozaki-r
Branch: MAIN
Changes since 1.86: +275 -60 lines
Diff to previous 1.86 (colored)

Make bridge MPSAFE

- Introduce BRIDGE_MPSAFE
  - It's enabled only when NET_MPSAFE is defined
    in if.h or the kernel config
- Add iflist and rtlist mutex locks
  - Locking iflist is performance sensitive,
    so it's not used when !BRIDGE_MPSAFE
- Add bif object reference counting
  - It enables fine-grain locking for bridge member lists
    by allowing to not hold a lock during touching a bif
  - bridge_release_member is added to decrement the
    reference count
  - A condition variable is added to do bridge_delete_member
    gracefully
- Add if_bridgeif to ifnet
  - It's a shortcut to a bif object of a bridge member
  - It reduces a bif lookup cost and so lock contention on iflist
- Make bridgestp MPSAFE too

Revision 1.86 / (download) - annotate - [select for diffs], Wed Jul 2 09:51:08 2014 UTC (9 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.85: +9 -5 lines
Diff to previous 1.85 (colored)

Protect bridge_list with a mutex

Revision 1.85 / (download) - annotate - [select for diffs], Wed Jul 2 09:43:16 2014 UTC (9 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.84: +2 -5 lines
Diff to previous 1.84 (colored)

Remove obsolete codes for if_snd

Revision 1.84 / (download) - annotate - [select for diffs], Mon Jun 23 06:27:58 2014 UTC (9 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.83: +2 -6 lines
Diff to previous 1.83 (colored)

Get rid of unnecessary xc_broadcast after pktq_barrier

Pointed out by rmind@

Revision 1.83 / (download) - annotate - [select for diffs], Wed Jun 18 10:51:03 2014 UTC (9 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.82: +41 -56 lines
Diff to previous 1.82 (colored)

Restructure bridge_input and bridge_broadcast

There are two changes:
- Assemble the places calling pktq_enqueue (bridge_forward)
  for unicast and {b,m}cast frames into one
- Receive {b,m}cast frames in bridge_broadcast, not in
  bridge_input

The changes make the code clear and readable. bridge_input
now doesn't need to take care of {b,m}cast frames;
bridge_forward and bridge_broadcast have the responsibility.

The changes are based on a patch of Lloyd Parkes submitted
in PR 48104, but don't fix its issue yet.

Revision 1.82 / (download) - annotate - [select for diffs], Wed Jun 18 09:20:46 2014 UTC (9 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.81: +38 -28 lines
Diff to previous 1.81 (colored)

Tidy up bridge_input

No functional change.

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jun 17 10:39:46 2014 UTC (9 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.80: +42 -23 lines
Diff to previous 1.80 (colored)

Restructure ether_input and bridge_input

The network stack of NetBSD is well organized and
layered. A packet reception is processed from a
lower layer to an upper layer one by one. However,
ether_input and bridge_input are not structured so.
bridge_input is called inside ether_input.

The new structure replaces ifnet#if_input of a bridge
member with bridge_input when the member is attached.
So a packet goes straight on a packet reception via
a bridge, bridge_input => ether_input => ip_input.

The change is part of a patch of Lloyd Parkes submitted
in PR 48104. Unlike the patch, the change doesn't
intend to change the behavior of the packet processing.
Another patch will fix PR 48104.

Revision 1.80 / (download) - annotate - [select for diffs], Mon Jun 16 01:05:25 2014 UTC (9 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.79: +93 -2 lines
Diff to previous 1.79 (colored)

Add net.interfaces.bridgeN.fwdq.{maxlen,len,drops} sysctl

Revision 1.79 / (download) - annotate - [select for diffs], Mon Jun 16 01:03:57 2014 UTC (9 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.78: +27 -30 lines
Diff to previous 1.78 (colored)

Use pktqueue for bridge forwarding queue and softint

Revision 1.78 / (download) - annotate - [select for diffs], Sun Jun 15 16:10:46 2014 UTC (9 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.77: +3 -7 lines
Diff to previous 1.77 (colored)

Get rid of unnecessary splnet for pool_{get,put}

A mutex prevents interrupts in the functions now.

Revision 1.73.4.2 / (download) - annotate - [select for diffs], Thu May 22 11:41:09 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.73.4.1: +20 -25 lines
Diff to previous 1.73.4.1 (colored) to branchpoint 1.73 (colored) next main 1.74 (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.76.4.1 / (download) - annotate - [select for diffs], Wed Aug 28 23:59:36 2013 UTC (10 years, 6 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.76: +20 -25 lines
Diff to previous 1.76 (colored) next main 1.77 (colored)

sync with head

Revision 1.77 / (download) - annotate - [select for diffs], Sat Jun 29 21:06:58 2013 UTC (10 years, 8 months ago) by rmind
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, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: tls-earlyentropy
Changes since 1.76: +20 -25 lines
Diff to previous 1.76 (colored)

- Rewrite parts of pfil(9): use array to store hooks and thus be more cache
  friendly (there are only few hooks in the system).  Make the structures
  opaque and the interface more strict.
- Remove PFIL_HOOKS option by making pfil(9) mandatory.

Revision 1.73.4.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:38 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.73: +10 -5 lines
Diff to previous 1.73 (colored)

sync with head

Revision 1.74.2.1 / (download) - annotate - [select for diffs], Thu Apr 5 21:33:43 2012 UTC (11 years, 10 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.74: +8 -4 lines
Diff to previous 1.74 (colored) next main 1.75 (colored)

sync to latest -current.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Mar 22 12:59:33 2012 UTC (11 years, 11 months ago) by wiz
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, khorben-n900, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet
Changes since 1.75: +3 -3 lines
Diff to previous 1.75 (colored)

Fix typo in kauth name. From PR 46234 by Matthew Mondor.
Tested by Geoff Adams and Ryo ONODERA.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Mar 13 18:40:58 2012 UTC (11 years, 11 months ago) by elad
Branch: MAIN
Changes since 1.74: +8 -4 lines
Diff to previous 1.74 (colored)

Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

    http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
    http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
    http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.

Revision 1.74 / (download) - annotate - [select for diffs], Sat Nov 19 22:51:25 2011 UTC (12 years, 3 months ago) by tls
Branch: MAIN
CVS Tags: 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-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.73: +4 -3 lines
Diff to previous 1.73 (colored)

First step of random number subsystem rework described in
<20111022023242.BA26F14A158@mail.netbsd.org>.  This change includes
the following:

	An initial cleanup and minor reorganization of the entropy pool
	code in sys/dev/rnd.c and sys/dev/rndpool.c.  Several bugs are
	fixed.  Some effort is made to accumulate entropy more quickly at
	boot time.

	A generic interface, "rndsink", is added, for stream generators to
	request that they be re-keyed with good quality entropy from the pool
	as soon as it is available.

	The arc4random()/arc4randbytes() implementation in libkern is
	adjusted to use the rndsink interface for rekeying, which helps
	address the problem of low-quality keys at boot time.

	An implementation of the FIPS 140-2 statistical tests for random
	number generator quality is provided (libkern/rngtest.c).  This
	is based on Greg Rose's implementation from Qualcomm.

	A new random stream generator, nist_ctr_drbg, is provided.  It is
	based on an implementation of the NIST SP800-90 CTR_DRBG by
	Henric Jungheim.  This generator users AES in a modified counter
	mode to generate a backtracking-resistant random stream.

	An abstraction layer, "cprng", is provided for in-kernel consumers
	of randomness.  The arc4random/arc4randbytes API is deprecated for
	in-kernel use.  It is replaced by "cprng_strong".  The current
	cprng_fast implementation wraps the existing arc4random
	implementation.  The current cprng_strong implementation wraps the
	new CTR_DRBG implementation.  Both interfaces are rekeyed from
	the entropy pool automatically at intervals justifiable from best
	current cryptographic practice.

	In some quick tests, cprng_fast() is about the same speed as
	the old arc4randbytes(), and cprng_strong() is about 20% faster
	than rnd_extract_data().  Performance is expected to improve.

	The AES code in src/crypto/rijndael is no longer an optional
	kernel component, as it is required by cprng_strong, which is
	not an optional kernel component.

	The entropy pool output is subjected to the rngtest tests at
	startup time; if it fails, the system will reboot.  There is
	approximately a 3/10000 chance of a false positive from these
	tests.  Entropy pool _input_ from hardware random numbers is
	subjected to the rngtest tests at attach time, as well as the
	FIPS continuous-output test, to detect bad or stuck hardware
	RNGs; if any are detected, they are detached, but the system
	continues to run.

	A problem with rndctl(8) is fixed -- datastructures with
	pointers in arrays are no longer passed to userspace (this
	was not a security problem, but rather a major issue for
	compat32).  A new kernel will require a new rndctl.

	The sysctl kern.arandom() and kern.urandom() nodes are hooked
	up to the new generators, but the /dev/*random pseudodevices
	are not, yet.

	Manual pages for the new kernel interfaces are forthcoming.

Revision 1.72.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.72: +3 -3 lines
Diff to previous 1.72 (colored) next main 1.73 (colored)

Sync with HEAD.

Revision 1.71.4.2 / (download) - annotate - [select for diffs], Tue May 31 03:05:06 2011 UTC (12 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.71.4.1: +1 -1 lines
Diff to previous 1.71.4.1 (colored) to branchpoint 1.71 (colored) next main 1.72 (colored)

sync with head

Revision 1.73 / (download) - annotate - [select for diffs], Mon May 23 21:52:54 2011 UTC (12 years, 9 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored)

simplify

Revision 1.71.4.1 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:51 2011 UTC (12 years, 11 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.71: +4 -2 lines
Diff to previous 1.71 (colored)

sync with head

Revision 1.72 / (download) - annotate - [select for diffs], Tue Dec 7 20:38:26 2010 UTC (13 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.71: +4 -2 lines
Diff to previous 1.71 (colored)

_KERNEL_TOP

Revision 1.61.4.4 / (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.61.4.3: +2 -5 lines
Diff to previous 1.61.4.3 (colored) to branchpoint 1.61 (colored) next main 1.62 (colored)

sync with head

Revision 1.71 / (download) - annotate - [select for diffs], Tue Jan 19 22:08:00 2010 UTC (14 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip
Branch point for: rmind-uvmplock
Changes since 1.70: +2 -5 lines
Diff to previous 1.70 (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.64.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:47 2009 UTC (14 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.64.2.1: +4 -3 lines
Diff to previous 1.64.2.1 (colored) to branchpoint 1.64 (colored) next main 1.65 (colored)

Sync with HEAD.

Revision 1.61.4.3 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:33 2009 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.61.4.2: +4 -3 lines
Diff to previous 1.61.4.2 (colored) to branchpoint 1.61 (colored)

sync with head

Revision 1.70 / (download) - annotate - [select for diffs], Sun May 17 11:34:21 2009 UTC (14 years, 9 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase
Changes since 1.69: +4 -3 lines
Diff to previous 1.69 (colored)

fix crash in bridge_ioctl():


BRDGGFLT and BRDGSFILT bridge controls are only available with BRIDGE_IPF and PFIL_HOOKS defined.
In amd64 GENERIC and XEN kernel configs PFIL_HOOKS is defined but BRIDGE_IPF is not.

When a BRDGGFLT or BRDGSFILT command comes in, then ifd->ifd_cmd is not in range
of bridge_control_table_size. Then bc is not set and is dereferenced
later => BOOM.

Revision 1.61.4.2 / (download) - annotate - [select for diffs], Sat May 16 10:41:49 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.61.4.1: +23 -11 lines
Diff to previous 1.61.4.1 (colored) to branchpoint 1.61 (colored)

sync with head

Revision 1.64.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.64: +164 -108 lines
Diff to previous 1.64 (colored)

Sync with HEAD.

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

Revision 1.69 / (download) - annotate - [select for diffs], Tue May 12 23:03:24 2009 UTC (14 years, 9 months ago) by elad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, jym-xensuspend-base
Changes since 1.68: +23 -11 lines
Diff to previous 1.68 (colored)

Move kauth(9) call before going into splnet().

Mailing list reference:

	http://mail-index.netbsd.org/tech-net/2009/05/08/msg001286.html

Revision 1.61.4.1 / (download) - annotate - [select for diffs], Mon May 4 08:14:14 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.61: +163 -114 lines
Diff to previous 1.61 (colored)

sync with head.

Revision 1.62.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.62.4.1: +143 -99 lines
Diff to previous 1.62.4.1 (colored) to branchpoint 1.62 (colored) next main 1.63 (colored)

Sync with HEAD.

Revision 1.62.6.4 / (download) - annotate - [select for diffs], Sat Apr 4 18:03:06 2009 UTC (14 years, 11 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, 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
Changes since 1.62.6.3: +3 -3 lines
Diff to previous 1.62.6.3 (colored) to branchpoint 1.62 (colored) next main 1.63 (colored)

Pull up following revision(s) (requested by bouyer in ticket #660):
	sys/net/if_bridge.c: revision 1.68
Fix another typo

Revision 1.62.6.3 / (download) - annotate - [select for diffs], Sat Apr 4 18:02:21 2009 UTC (14 years, 11 months ago) by snj
Branch: netbsd-5
Changes since 1.62.6.2: +4 -3 lines
Diff to previous 1.62.6.2 (colored) to branchpoint 1.62 (colored)

Pull up following revision(s) (requested by bouyer in ticket #660):
	sys/net/if_bridge.c: revision 1.67
Fix a comment, and make it build.

Revision 1.62.6.2 / (download) - annotate - [select for diffs], Sat Apr 4 18:01:25 2009 UTC (14 years, 11 months ago) by snj
Branch: netbsd-5
Changes since 1.62.6.1: +8 -6 lines
Diff to previous 1.62.6.1 (colored) to branchpoint 1.62 (colored)

Pull up following revision(s) (requested by bouyer in ticket #660):
	sys/net/if_bridge.c: revision 1.66
Fixes from Masao Uebayashi

Revision 1.62.6.1 / (download) - annotate - [select for diffs], Sat Apr 4 18:00:03 2009 UTC (14 years, 11 months ago) by snj
Branch: netbsd-5
Changes since 1.62: +140 -99 lines
Diff to previous 1.62 (colored)

Pull up following revision(s) (requested by bouyer in ticket #660):
	sys/net/if_bridge.c: revision 1.65
	sys/net/if_bridgevar.h: revision 1.14
Fix for if_start() and pfil_hook() being called from hardware interrupt
context (reported on various mailing-lists, and part of PR kern/41114,
causing panic in pf(4) and possibly ipf(4) when BRIDGE_IPF is used).
Defer bridge_forward() to a software interrupt; bridge_input() enqueues
mbufs to ifp->if_snd which is handled in bridge_forward().

Revision 1.68 / (download) - annotate - [select for diffs], Sat Apr 4 15:53:49 2009 UTC (14 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored)

Fix another typo

Revision 1.67 / (download) - annotate - [select for diffs], Sat Apr 4 15:47:28 2009 UTC (14 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.66: +4 -3 lines
Diff to previous 1.66 (colored)

Fix a comment, and make it build.

Revision 1.66 / (download) - annotate - [select for diffs], Sat Apr 4 15:31:47 2009 UTC (14 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.65: +8 -6 lines
Diff to previous 1.65 (colored)

Fixes from Masao Uebayashi

Revision 1.65 / (download) - annotate - [select for diffs], Sat Apr 4 10:00:23 2009 UTC (14 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.64: +140 -99 lines
Diff to previous 1.64 (colored)

Fix for if_start() and pfil_hook() being called from hardware interrupt
context (reported on various mailing-lists, and part of PR kern/41114,
causing panic in pf(4) and possibly ipf(4) when BRIDGE_IPF is used).
Defer bridge_forward() to a software interrupt; bridge_input() enqueues
mbufs to ifp->if_snd which is handled in bridge_forward().

Revision 1.62.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.62: +20 -13 lines
Diff to previous 1.62 (colored)

Sync with HEAD.

Revision 1.64 / (download) - annotate - [select for diffs], Sun Jan 18 10:28:55 2009 UTC (15 years, 1 month ago) by mrg
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.63: +10 -10 lines
Diff to previous 1.63 (colored)

Fix multiple problems:

    * A sign extension error creating the bridge ID corrupted the
    priority (always making it the maximum).
    * Do not catch STP packets on an interface for which STP is not
    enabled -- it's a violation of the spec, and causes STP to fail on
    neighboring bridges.
    * An optimization to bstp_input() -- some information is already
    known when we call it.

contributed anonymously.

Revision 1.56.6.3 / (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.56.6.2: +10 -3 lines
Diff to previous 1.56.6.2 (colored) to branchpoint 1.56 (colored) next main 1.57 (colored)

Sync with HEAD.

Revision 1.62.2.1 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:25 2008 UTC (15 years, 2 months ago) by haad
Branch: haad-dm
Changes since 1.62: +12 -5 lines
Diff to previous 1.62 (colored) next main 1.63 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.63 / (download) - annotate - [select for diffs], Fri Nov 7 00:20:13 2008 UTC (15 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Changes since 1.62: +12 -5 lines
Diff to previous 1.62 (colored)

*** Summary ***

When a link-layer address changes (e.g., ifconfig ex0 link
02:de:ad:be:ef:02 active), send a gratuitous ARP and/or a Neighbor
Advertisement to update the network-/link-layer address bindings
on our LAN peers.

Refuse a change of ethernet address to the address 00:00:00:00:00:00
or to any multicast/broadcast address.  (Thanks matt@.)

Reorder ifnet ioctl operations so that driver ioctls may inherit
the functions of their "class"---ether_ioctl(), fddi_ioctl(), et
cetera---and the class ioctls may inherit from the generic ioctl,
ifioctl_common(), but both driver- and class-ioctls may override
the generic behavior.  Make network drivers share more code.

Distinguish a "factory" link-layer address from others for the
purposes of both protecting that address from deletion and computing
EUI64.

Return consistent, appropriate error codes from network drivers.

Improve readability.  KNF.

*** Details ***

In if_attach(), always initialize the interface ioctl routine,
ifnet->if_ioctl, if the driver has not already initialized it.
Delete if_ioctl == NULL tests everywhere else, because it cannot
happen.

In the ioctl routines of network interfaces, inherit common ioctl
behaviors by calling either ifioctl_common() or whichever ioctl
routine is appropriate for the class of interface---e.g., ether_ioctl()
for ethernets.

Stop (ab)using SIOCSIFADDR and start to use SIOCINITIFADDR.  In
the user->kernel interface, SIOCSIFADDR's argument was an ifreq,
but on the protocol->ifnet interface, SIOCSIFADDR's argument was
an ifaddr.  That was confusing, and it would work against me as I
make it possible for a network interface to overload most ioctls.
On the protocol->ifnet interface, replace SIOCSIFADDR with
SIOCINITIFADDR.  In ifioctl(), return EPERM if userland tries to
invoke SIOCINITIFADDR.

In ifioctl(), give the interface the first shot at handling most
interface ioctls, and give the protocol the second shot, instead
of the other way around. Finally, let compatibility code (COMPAT_OSOCK)
take a shot.

Pull device initialization out of switch statements under
SIOCINITIFADDR.  For example, pull ..._init() out of any switch
statement that looks like this:

        switch (...->sa_family) {
        case ...:
                ..._init();
                ...
                break;
        ...
        default:
                ..._init();
                ...
                break;
        }

Rewrite many if-else clauses that handle all permutations of IFF_UP
and IFF_RUNNING to use a switch statement,

        switch (x & (IFF_UP|IFF_RUNNING)) {
        case 0:
                ...
                break;
        case IFF_RUNNING:
                ...
                break;
        case IFF_UP:
                ...
                break;
        case IFF_UP|IFF_RUNNING:
                ...
                break;
        }

unifdef lots of code containing #ifdef FreeBSD, #ifdef NetBSD, and
#ifdef SIOCSIFMTU, especially in fwip(4) and in ndis(4).

In ipw(4), remove an if_set_sadl() call that is out of place.

In nfe(4), reuse the jumbo MTU logic in ether_ioctl().

Let ethernets register a callback for setting h/w state such as
promiscuous mode and the multicast filter in accord with a change
in the if_flags: ether_set_ifflags_cb() registers a callback that
returns ENETRESET if the caller should reset the ethernet by calling
if_init(), 0 on success, != 0 on failure.  Pull common code from
ex(4), gem(4), nfe(4), sip(4), tlp(4), vge(4) into ether_ioctl(),
and register if_flags callbacks for those drivers.

Return ENOTTY instead of EINVAL for inappropriate ioctls.  In
zyd(4), use ENXIO instead of ENOTTY to indicate that the device is
not any longer attached.

Add to if_set_sadl() a boolean 'factory' argument that indicates
whether a link-layer address was assigned by the factory or some
other source.  In a comment, recommend using the factory address
for generating an EUI64, and update in6_get_hw_ifid() to prefer a
factory address to any other link-layer address.

Add a routing message, RTM_LLINFO_UPD, that tells protocols to
update the binding of network-layer addresses to link-layer addresses.
Implement this message in IPv4 and IPv6 by sending a gratuitous
ARP or a neighbor advertisement, respectively.  Generate RTM_LLINFO_UPD
messages on a change of an interface's link-layer address.

In ether_ioctl(), do not let SIOCALIFADDR set a link-layer address
that is broadcast/multicast or equal to 00:00:00:00:00:00.

Make ether_ioctl() call ifioctl_common() to handle ioctls that it
does not understand.

In gif(4), initialize if_softc and use it, instead of assuming that
the gif_softc and ifp overlap.

Let ifioctl_common() handle SIOCGIFADDR.

Sprinkle rtcache_invariants(), which checks on DIAGNOSTIC kernels
that certain invariants on a struct route are satisfied.

In agr(4), rewrite agr_ioctl_filter() to be a bit more explicit
about the ioctls that we do not allow on an agr(4) member interface.

bzero -> memset.  Delete unnecessary casts to void *.  Use
sockaddr_in_init() and sockaddr_in6_init().  Compare pointers with
NULL instead of "testing truth".  Replace some instances of (type
*)0 with NULL.  Change some K&R prototypes to ANSI C, and join
lines.

Revision 1.56.6.2 / (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.56.6.1: +2 -4 lines
Diff to previous 1.56.6.1 (colored) to branchpoint 1.56 (colored)

Sync with HEAD.

Revision 1.61.6.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.61: +4 -6 lines
Diff to previous 1.61 (colored) next main 1.62 (colored)

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

Revision 1.61.8.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.61: +4 -6 lines
Diff to previous 1.61 (colored) next main 1.62 (colored)

Sync with head.

Revision 1.61.2.1 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:13 2008 UTC (15 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.61: +4 -6 lines
Diff to previous 1.61 (colored) next main 1.62 (colored)

sync with head.

Revision 1.62 / (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-dm-base1
Branch point for: nick-hppapmap, netbsd-5, haad-dm
Changes since 1.61: +4 -6 lines
Diff to previous 1.61 (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.56.6.1 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:21 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.56: +14 -12 lines
Diff to previous 1.56 (colored)

Sync with HEAD.

Revision 1.61 / (download) - annotate - [select for diffs], Tue Apr 15 03:57:04 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-nfs-mp-base2, yamt-nfs-mp-base, hpcarm-cleanup-nbase
Branch point for: yamt-pf42, yamt-nfs-mp, wrstuden-revivesa, simonb-wapbl
Changes since 1.60: +7 -6 lines
Diff to previous 1.60 (colored)

Make ip6 and icmp6 stats per-cpu.

Revision 1.60 / (download) - annotate - [select for diffs], Sat Apr 12 09:26:45 2008 UTC (15 years, 10 months ago) by cegger
Branch: MAIN
Changes since 1.59: +3 -2 lines
Diff to previous 1.59 (colored)

make this build with BRIDGE_IPF and PFIL_HOOKS options

Revision 1.59 / (download) - annotate - [select for diffs], Sat Apr 12 05:58:22 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.58: +9 -9 lines
Diff to previous 1.58 (colored)

Make IP, TCP, UDP, and ICMP statistics per-CPU.  The stats are collated
when the user requests them via sysctl.

Revision 1.58 / (download) - annotate - [select for diffs], Tue Apr 8 23:37:43 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.57: +5 -5 lines
Diff to previous 1.57 (colored)

Change IPv6 stats from a structure to an array of uint64_t's.

Note: This is ABI-compatible with the old ip6stat structure; old netstat
binaries will continue to work properly.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Apr 7 06:31:27 2008 UTC (15 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.56: +9 -9 lines
Diff to previous 1.56 (colored)

Change IP stats from a structure to an array of uint64_t's.

Note: This is ABI-compatible with the old ipstat structure; old netstat
binaries will continue to work properly.

Revision 1.54.2.1 / (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.54: +39 -64 lines
Diff to previous 1.54 (colored) next main 1.55 (colored)

sync with HEAD

Revision 1.31.2.6 / (download) - annotate - [select for diffs], Wed Feb 27 08:37:00 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.31.2.5: +3 -3 lines
Diff to previous 1.31.2.5 (colored) to branchpoint 1.31 (colored) next main 1.32 (colored)

sync with head.

Revision 1.56 / (download) - annotate - [select for diffs], Wed Feb 20 17:05:52 2008 UTC (16 years ago) by matt
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, ad-socklock-base1
Branch point for: mjf-devfs2
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored)

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

Revision 1.54.8.1 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:01 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs
Changes since 1.54: +38 -63 lines
Diff to previous 1.54 (colored) next main 1.55 (colored)

Sync with HEAD.

Revision 1.31.2.5 / (download) - annotate - [select for diffs], Mon Jan 21 09:47:01 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.31.2.4: +38 -63 lines
Diff to previous 1.31.2.4 (colored) to branchpoint 1.31 (colored)

sync with head

Revision 1.54.14.1 / (download) - annotate - [select for diffs], Sun Jan 20 17:51:43 2008 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.54: +38 -63 lines
Diff to previous 1.54 (colored) next main 1.55 (colored)

Sync with HEAD

Revision 1.55 / (download) - annotate - [select for diffs], Sat Jan 19 23:17:47 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: mjf-devfs-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.54: +38 -63 lines
Diff to previous 1.54 (colored)

Use C99 array initializers for bridge_control_table[].

Revision 1.50.2.3 / (download) - annotate - [select for diffs], Tue Oct 9 13:44:39 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.50.2.2: +4 -4 lines
Diff to previous 1.50.2.2 (colored) next main 1.51 (colored)

Sync with head.

Revision 1.52.6.1 / (download) - annotate - [select for diffs], Mon Sep 3 16:48:53 2007 UTC (16 years, 6 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored) next main 1.53 (colored)

Sync with HEAD.

Revision 1.31.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:42:03 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.31.2.3: +15 -15 lines
Diff to previous 1.31.2.3 (colored) to branchpoint 1.31 (colored)

sync with head.

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 10:23:08 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored) next main 1.53 (colored)

Sync with HEAD.

Revision 1.54 / (download) - annotate - [select for diffs], Mon Aug 27 14:59:11 2007 UTC (16 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, vmlocking-base, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, nick-csl-alignment-base5, matt-armv6-prevmlocking, matt-armv6-base, jmcneill-pm-base, jmcneill-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-merge1, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs, matt-armv6, bouyer-xeni386
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

LLADDR -> CLLADDR.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Aug 26 22:59:08 2007 UTC (16 years, 6 months ago) by dyoung
Branch: MAIN
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

Constify: LLADDR -> CLLADDR.  I'm aiming here to make it easier to
identify sockaddr_dl abuse that remains in the kernel, especially
the potential for overwriting memory past the end of a sockaddr_dl
with, e.g., memcpy(LLADDR(), ...).

Use sockaddr_dl_setaddr() in a few places.

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

Sync with head.

Revision 1.52 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:59 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.51: +4 -4 lines
Diff to previous 1.51 (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.50.2.2 / (download) - annotate - [select for diffs], Sun Jul 1 21:50:43 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.50.2.1: +4 -4 lines
Diff to previous 1.50.2.1 (colored)

Adapt to callout API change.

Revision 1.47.2.3 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:08 2007 UTC (16 years, 11 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.47.2.2: +3 -3 lines
Diff to previous 1.47.2.2 (colored) to branchpoint 1.47 (colored) next main 1.48 (colored)

sync with head.

Revision 1.50.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:52:00 2007 UTC (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored)

Sync with head.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:35 2007 UTC (16 years, 11 months ago) by ad
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.47.2.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:59:10 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.47.2.1: +10 -10 lines
Diff to previous 1.47.2.1 (colored) to branchpoint 1.47 (colored)

Sync with HEAD.

Revision 1.50 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:15 2007 UTC (17 years ago) by christos
Branch: MAIN
Branch point for: vmlocking
Changes since 1.49: +10 -10 lines
Diff to previous 1.49 (colored)

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

Revision 1.47.2.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:40 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.47: +4 -5 lines
Diff to previous 1.47 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.31.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:33 2007 UTC (17 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.31.2.2: +5 -6 lines
Diff to previous 1.31.2.2 (colored) to branchpoint 1.31 (colored)

sync with head.

Revision 1.49 / (download) - annotate - [select for diffs], Wed Feb 21 02:24:14 2007 UTC (17 years ago) by dyoung
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.48: +3 -4 lines
Diff to previous 1.48 (colored)

Use __arraycount().

Revision 1.48 / (download) - annotate - [select for diffs], Sat Feb 17 22:34:08 2007 UTC (17 years ago) by dyoung
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

KNF: de-__P, bzero -> memset, bcmp -> memcmp.  Remove extraneous
   parentheses in return statements.

Cosmetic: don't open-code TAILQ_FOREACH().

Cosmetic: change types of variables to avoid oodles of casts: in
   in6_src.c, avoid casts by changing several route_in6 pointers
   to struct route pointers.  Remove unnecessary casts to caddr_t
   elsewhere.

Pave the way for eliminating address family-specific route caches:
   soon, struct route will not embed a sockaddr, but it will hold
   a reference to an external sockaddr, instead.  We will set the
   destination sockaddr using rtcache_setdst().  (I created a stub
   for it, but it isn't used anywhere, yet.)  rtcache_free() will
   free the sockaddr.  I have extracted from rtcache_free() a helper
   subroutine, rtcache_clear().  rtcache_clear() will "forget" a
   cached route, but it will not forget the destination by releasing
   the sockaddr.  I use rtcache_clear() instead of rtcache_free()
   in rtcache_update(), because rtcache_update() is not supposed
   to forget the destination.

Constify:

   1 Introduce const accessor for route->ro_dst, rtcache_getdst().

   2 Constify the 'dst' argument to ifnet->if_output().  This
     led me to constify a lot of code called by output routines.

   3 Constify the sockaddr argument to protosw->pr_ctlinput.  This
     led me to constify a lot of code called by ctlinput routines.

   4 Introduce const macros for converting from a generic sockaddr
     to family-specific sockaddrs, e.g., sockaddr_in: satocsin6,
     satocsin, et cetera.

Revision 1.40.4.2 / (download) - annotate - [select for diffs], Fri Jan 12 01:04:11 2007 UTC (17 years, 1 month ago) by ad
Branch: newlock2
Changes since 1.40.4.1: +3 -36 lines
Diff to previous 1.40.4.1 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored)

Sync with head.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Jan 4 19:07:03 2007 UTC (17 years, 1 month ago) by elad
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.31.2.2 / (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.31.2.1: +13 -40 lines
Diff to previous 1.31.2.1 (colored) to branchpoint 1.31 (colored)

sync with head.

Revision 1.40.6.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.40.6.1: +7 -40 lines
Diff to previous 1.40.6.1 (colored) to branchpoint 1.40 (colored) next main 1.41 (colored)

sync with head.

Revision 1.46 / (download) - annotate - [select for diffs], Thu Nov 23 04:07:07 2006 UTC (17 years, 3 months ago) by rpaulo
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, 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
Changes since 1.45: +2 -35 lines
Diff to previous 1.45 (colored)

New EtherIP driver based on tap(4) and gif(4) by Hans Rosenfeld.
Notable changes:
	* Fixes PR 34268.
	* Separates the code from gif(4) (which is more cleaner).
	* Allows the usage of STP (Spanning Tree Protocol).
	* Removed EtherIP implementation from gif(4)/tap(4).

Some input from Christos.

Revision 1.40.4.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.40: +10 -3 lines
Diff to previous 1.40 (colored)

Sync with head.

Revision 1.45 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:40 2006 UTC (17 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.44: +7 -7 lines
Diff to previous 1.44 (colored)

__unused removal on arguments; approved by core.

Revision 1.40.6.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.40: +15 -8 lines
Diff to previous 1.40 (colored)

sync with head

Revision 1.44 / (download) - annotate - [select for diffs], Tue Oct 17 18:21:29 2006 UTC (17 years, 4 months ago) by dogcow
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.43: +2 -4 lines
Diff to previous 1.43 (colored)

now that we have -Wno-unused-parameter, back out all the tremendously ugly
code to gratuitously access said parameters.

Revision 1.43 / (download) - annotate - [select for diffs], Fri Oct 13 16:53:36 2006 UTC (17 years, 4 months ago) by dogcow
Branch: MAIN
Changes since 1.42: +4 -2 lines
Diff to previous 1.42 (colored)

More -Wunused fallout. sprinkle __unused when possible; otherwise, use the
	do { if (&x) {} } while (/* CONSTCOND */ 0);
construct as suggested by uwe in <20061012224845.GA9449@snark.ptc.spbu.ru>.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:27 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.41: +7 -7 lines
Diff to previous 1.41 (colored)

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

Revision 1.41 / (download) - annotate - [select for diffs], Thu Oct 5 17:35:19 2006 UTC (17 years, 4 months ago) by tls
Branch: MAIN
Changes since 1.40: +10 -3 lines
Diff to previous 1.40 (colored)

Protect calls to pool_put/pool_get that may occur in interrupt context
with spl used to protect other allocations and frees, or datastructure
element insertion and removal, in adjacent code.

It is almost unquestionably the case that some of the spl()/splx() calls
added here are superfluous, but it really seems wrong to see:

	s=splfoo();
	/* frob data structure */
	splx(s);
	pool_put(x);

and if we think we need to protect the first operation, then it is hard
to see why we should not think we need to protect the next.  "Better
safe than sorry".

It is also almost unquestionably the case that I missed some pool
gets/puts from interrupt context with my strategy for finding these
calls; use of PR_NOWAIT is a strong hint that a pool may be used from
interrupt context but many callers in the kernel pass a "can wait/can't
wait" flag down such that my searches might not have found them.  One
notable area that needs to be looked at is pf.

See also:

http://mail-index.netbsd.org/tech-kern/2006/07/19/0003.html
http://mail-index.netbsd.org/tech-kern/2006/07/19/0009.html

Revision 1.36.2.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.36: +34 -13 lines
Diff to previous 1.36 (colored) next main 1.37 (colored)

sync with head

Revision 1.36.6.3 / (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.36.6.2: +5 -6 lines
Diff to previous 1.36.6.2 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored)

sync with head

Revision 1.40 / (download) - annotate - [select for diffs], Sun Jul 23 22:06:12 2006 UTC (17 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.39: +5 -6 lines
Diff to previous 1.39 (colored)

Use the LWP cached credentials where sane.

Revision 1.36.6.2 / (download) - annotate - [select for diffs], Mon Jun 26 12:53:38 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.36.6.1: +11 -9 lines
Diff to previous 1.36.6.1 (colored) to branchpoint 1.36 (colored)

sync with head.

Revision 1.31.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:10:27 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.31: +163 -133 lines
Diff to previous 1.31 (colored)

sync with head.

Revision 1.38.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:09:12 2006 UTC (17 years, 8 months ago) by chap
Branch: chap-midi
Changes since 1.38: +11 -9 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

Sync with head.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Jun 7 22:33:42 2006 UTC (17 years, 8 months ago) by kardel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Changes since 1.38: +11 -9 lines
Diff to previous 1.38 (colored)

merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html

Revision 1.36.4.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:37 2006 UTC (17 years, 9 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.36.4.1: +25 -5 lines
Diff to previous 1.36.4.1 (colored) to branchpoint 1.36 (colored) next main 1.37 (colored)

Sync with head.

Revision 1.36.10.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.36: +25 -5 lines
Diff to previous 1.36 (colored) next main 1.37 (colored)

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

Revision 1.36.6.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.36: +25 -5 lines
Diff to previous 1.36 (colored)

sync with head.

Revision 1.38 / (download) - annotate - [select for diffs], Thu May 18 09:05:51 2006 UTC (17 years, 9 months ago) by liamjfoy
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, simonb-timecounters-base
Branch point for: chap-midi
Changes since 1.37: +21 -4 lines
Diff to previous 1.37 (colored)

Integrate Common Address Redundancy Procotol (CARP) from OpenBSD

'pseudo-device	carp'

Thanks to: joerg@ christos@ riz@ and others who tested
Ok: core@

Revision 1.37 / (download) - annotate - [select for diffs], Sun May 14 21:19:33 2006 UTC (17 years, 9 months ago) by elad
Branch: MAIN
Changes since 1.36: +6 -3 lines
Diff to previous 1.36 (colored)

integrate kauth.

Revision 1.36.8.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.36.8.2: +3 -2 lines
Diff to previous 1.36.8.2 (colored) to branchpoint 1.36 (colored) next main 1.37 (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.36.8.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.36.8.1: +3 -3 lines
Diff to previous 1.36.8.1 (colored) to branchpoint 1.36 (colored)

generic_authorize() -> kauth_authorize_generic().

Revision 1.36.8.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.36: +5 -3 lines
Diff to previous 1.36 (colored)

Adapt to kernel authorization KPI.

Revision 1.29.4.2 / (download) - annotate - [select for diffs], Sun Feb 12 16:50:33 2006 UTC (18 years ago) by tron
Branch: netbsd-3-0
CVS Tags: netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE
Changes since 1.29.4.1: +1 -0 lines
Diff to previous 1.29.4.1 (colored) to branchpoint 1.29 (colored) next main 1.30 (colored)

Pull up following revision(s) (requested by adrianp in ticket #1163):
	sys/net/if_bridge.c: revision 1.36
Make sure that breq is also cleared (from Xin LI)

Revision 1.29.2.2 / (download) - annotate - [select for diffs], Sun Feb 12 16:49:50 2006 UTC (18 years ago) by tron
Branch: netbsd-3
CVS Tags: 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
Changes since 1.29.2.1: +1 -0 lines
Diff to previous 1.29.2.1 (colored) to branchpoint 1.29 (colored) next main 1.30 (colored)

Pull up following revision(s) (requested by adrianp in ticket #1163):
	sys/net/if_bridge.c: revision 1.36
Make sure that breq is also cleared (from Xin LI)

Revision 1.22.2.3 / (download) - annotate - [select for diffs], Sun Feb 12 16:30:24 2006 UTC (18 years ago) by tron
Branch: netbsd-2-0
Changes since 1.22.2.2: +1 -0 lines
Diff to previous 1.22.2.2 (colored) to branchpoint 1.22 (colored) next main 1.23 (colored)

Pull up following revision(s) (requested by adrianp in ticket #10306):
	sys/net/if_bridge.c: revision 1.36
Make sure that breq is also cleared (from Xin LI)

Revision 1.22.2.1.4.2 / (download) - annotate - [select for diffs], Sun Feb 12 16:29:54 2006 UTC (18 years ago) by tron
Branch: netbsd-2-1
Changes since 1.22.2.1.4.1: +1 -0 lines
Diff to previous 1.22.2.1.4.1 (colored) to branchpoint 1.22.2.1 (colored) next main 1.22.2.2 (colored)

Pull up following revision(s) (requested by adrianp in ticket #10306):
	sys/net/if_bridge.c: revision 1.36
Make sure that breq is also cleared (from Xin LI)

Revision 1.22.2.1.2.2 / (download) - annotate - [select for diffs], Sun Feb 12 16:28:30 2006 UTC (18 years ago) by tron
Branch: netbsd-2
Changes since 1.22.2.1.2.1: +1 -0 lines
Diff to previous 1.22.2.1.2.1 (colored) to branchpoint 1.22.2.1 (colored) next main 1.22.2.2 (colored)

Pull up following revision(s) (requested by adrianp in ticket #10306):
	sys/net/if_bridge.c: revision 1.36
Make sure that breq is also cleared (from Xin LI)

Revision 1.36.4.1 / (download) - annotate - [select for diffs], Sat Feb 4 14:18:52 2006 UTC (18 years ago) by simonb
Branch: simonb-timecounters
Changes since 1.36: +11 -9 lines
Diff to previous 1.36 (colored)

Adapt for timecounters: mostly use get*time(), use bintime's for timeout
calculations and use "time_second" instead of "time.tv_sec".

Revision 1.34.2.2 / (download) - annotate - [select for diffs], Wed Feb 1 14:52:37 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.34.2.1: +3 -2 lines
Diff to previous 1.34.2.1 (colored) next main 1.35 (colored)

sync with head.

Revision 1.36 / (download) - annotate - [select for diffs], Tue Jan 17 13:23:02 2006 UTC (18 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base, elad-kernelauth-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, peter-altq, elad-kernelauth
Changes since 1.35: +3 -2 lines
Diff to previous 1.35 (colored)

Make sure that breq is also cleared (from Xin LI)

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Sun Jan 15 10:02:57 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.34: +4 -2 lines
Diff to previous 1.34 (colored)

sync with head.

Revision 1.29.4.1 / (download) - annotate - [select for diffs], Mon Jan 9 13:35:35 2006 UTC (18 years, 1 month ago) by tron
Branch: netbsd-3-0
Changes since 1.29: +4 -2 lines
Diff to previous 1.29 (colored)

Pull up following revision(s) (requested by christos in ticket #1111):
	sys/net/if_bridge.c: revision 1.35
Make sure we initialize all structs to 0; from Xin LI

Revision 1.29.2.1 / (download) - annotate - [select for diffs], Mon Jan 9 13:33:41 2006 UTC (18 years, 1 month ago) by tron
Branch: netbsd-3
Changes since 1.29: +4 -2 lines
Diff to previous 1.29 (colored)

Pull up following revision(s) (requested by christos in ticket #1111):
	sys/net/if_bridge.c: revision 1.35
Make sure we initialize all structs to 0; from Xin LI

Revision 1.22.2.2 / (download) - annotate - [select for diffs], Mon Jan 9 13:31:22 2006 UTC (18 years, 1 month ago) by tron
Branch: netbsd-2-0
Changes since 1.22.2.1: +4 -2 lines
Diff to previous 1.22.2.1 (colored) to branchpoint 1.22 (colored)

Pull up following revision(s) (requested by christos in ticket #10219):
	sys/net/if_bridge.c: revision 1.35
Make sure we initialize all structs to 0; from Xin LI

Revision 1.22.2.1.4.1 / (download) - annotate - [select for diffs], Mon Jan 9 13:30:37 2006 UTC (18 years, 1 month ago) by tron
Branch: netbsd-2-1
Changes since 1.22.2.1: +4 -2 lines
Diff to previous 1.22.2.1 (colored)

Pull up following revision(s) (requested by christos in ticket #10219):
	sys/net/if_bridge.c: revision 1.35
Make sure we initialize all structs to 0; from Xin LI

Revision 1.22.2.1.2.1 / (download) - annotate - [select for diffs], Mon Jan 9 13:29:53 2006 UTC (18 years, 1 month ago) by tron
Branch: netbsd-2
Changes since 1.22.2.1: +4 -2 lines
Diff to previous 1.22.2.1 (colored)

Pull up following revision(s) (requested by christos in ticket #10219):
	sys/net/if_bridge.c: revision 1.35
Make sure we initialize all structs to 0; from Xin LI

Revision 1.35 / (download) - annotate - [select for diffs], Mon Jan 9 13:04:38 2006 UTC (18 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.34: +4 -2 lines
Diff to previous 1.34 (colored)

Make sure we initialize all structs to 0; from Xin LI

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

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

Revision 1.33 / (download) - annotate - [select for diffs], Sun Dec 11 23:05:24 2005 UTC (18 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.32: +127 -122 lines
Diff to previous 1.32 (colored)

ANSI function decls and application of static.

Revision 1.32 / (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.31: +2 -2 lines
Diff to previous 1.31 (colored)

merge ktrace-lwp.

Revision 1.15.2.8 / (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.15.2.7: +10 -10 lines
Diff to previous 1.15.2.7 (colored) next main 1.16 (colored)

Sync with HEAD. Here we go again...

Revision 1.31 / (download) - annotate - [select for diffs], Wed Jun 1 19:45:34 2005 UTC (18 years, 9 months ago) by jdc
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
Branch point for: yamt-lazymbuf
Changes since 1.30: +10 -9 lines
Diff to previous 1.30 (colored)

Fix this properly by renaming the conflicting variables.

Revision 1.30 / (download) - annotate - [select for diffs], Wed Jun 1 19:38:13 2005 UTC (18 years, 9 months ago) by jdc
Branch: MAIN
Changes since 1.29: +2 -3 lines
Diff to previous 1.29 (colored)

Remove extraneous definition of struct llc (found by shadow warning).

Revision 1.27.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.27: +50 -18 lines
Diff to previous 1.27 (colored) next main 1.28 (colored)

sync with -current

Revision 1.27.6.2 / (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.27.6.1: +16 -16 lines
Diff to previous 1.27.6.1 (colored) to branchpoint 1.27 (colored) next main 1.28 (colored)

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

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

Sync with HEAD.

Hi Perry!

Revision 1.29 / (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-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, kent-audio2-base
Branch point for: netbsd-3-0, netbsd-3
Changes since 1.28: +16 -16 lines
Diff to previous 1.28 (colored)

nuke trailing whitespace

Revision 1.27.6.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:53 2005 UTC (19 years ago) by yamt
Branch: yamt-km
Changes since 1.27: +36 -4 lines
Diff to previous 1.27 (colored)

sync with head.

Revision 1.15.2.6 / (download) - annotate - [select for diffs], Fri Feb 4 11:47:42 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.15.2.5: +36 -4 lines
Diff to previous 1.15.2.5 (colored)

Sync with HEAD.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Jan 31 23:49:36 2005 UTC (19 years, 1 month ago) by kim
Branch: MAIN
CVS Tags: yamt-km-base2
Changes since 1.27: +36 -4 lines
Diff to previous 1.27 (colored)

Add RFC 3378 EtherIP support, ported from OpenBSD to NetBSD by
Hans Rosenfeld (rosenfeld at grumpf.hope-2000.org)

This change makes it possible to add gif interfaces to bridges, which
will then send and receive IP protocol 97 packets. Packets are Ethernet
frames with an EtherIP header prepended.

Revision 1.15.2.5 / (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.15.2.4: +6 -4 lines
Diff to previous 1.15.2.4 (colored)

Sync with HEAD.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Dec 4 18:31:43 2004 UTC (19 years, 3 months ago) by peter
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.26: +6 -4 lines
Diff to previous 1.26 (colored)

Change ifc_destroy to return an int instead of void, so that it
can pass back errors to ifconfig.

Revision 1.15.2.4 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:10 2004 UTC (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.15.2.3: +18 -12 lines
Diff to previous 1.15.2.3 (colored)

Sync with HEAD

Revision 1.22.2.1 / (download) - annotate - [select for diffs], Fri Oct 8 03:11:13 2004 UTC (19 years, 4 months ago) by jmc
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-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2-1, netbsd-2
Changes since 1.22: +7 -2 lines
Diff to previous 1.22 (colored)

Pullup rev 1.26 (requested by bad in ticket #900)

Interfaces that do checksum offloading indicate the checksum status of
received packets in csum_flags in the packet header.  Packets that are
forwarded over the bridge need to have csum_flags cleared before being
put on the output queue.  Do so in bridge_enqueue(). PR#27007 PR#21831

Revision 1.26 / (download) - annotate - [select for diffs], Wed Oct 6 10:01:00 2004 UTC (19 years, 4 months ago) by bad
Branch: MAIN
Changes since 1.25: +7 -2 lines
Diff to previous 1.25 (colored)

Interfaces that do checksum offloading indicate the checksum status of
received packets in csum_flags in the packet header.  Packets that are
forwarded over the bridge need to have csum_flags cleared before being
put on the output queue.  Do so in bridge_enqueue().

Discussed with Jason Thorpe.

Fixes PR kern/27007 and the first part of PR kern/21831.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Oct 5 03:36:45 2004 UTC (19 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.24: +13 -12 lines
Diff to previous 1.24 (colored)

Only enable BRIDGE_IPF code if PFIL_HOOKS is enabled.

Revision 1.15.2.3 / (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.15.2.2: +2 -2 lines
Diff to previous 1.15.2.2 (colored)

Fix the sync with head I botched.

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

Sync with HEAD.

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:54:11 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.15: +76 -56 lines
Diff to previous 1.15 (colored)

Sync with HEAD

Revision 1.24 / (download) - annotate - [select for diffs], Wed Apr 21 19:10:31 2004 UTC (19 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

kill a sprintf

Revision 1.23 / (download) - annotate - [select for diffs], Wed Apr 21 18:40:38 2004 UTC (19 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.22: +4 -3 lines
Diff to previous 1.22 (colored)

kill sprintf, use snprintf

Revision 1.22 / (download) - annotate - [select for diffs], Sat Jan 31 20:11:13 2004 UTC (20 years, 1 month ago) by jdc
Branch: MAIN
CVS Tags: netbsd-2-0-base, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1
Branch point for: netbsd-2-0
Changes since 1.21: +58 -61 lines
Diff to previous 1.21 (colored)

Use m_copydata(), m_adj() and M_PREPEND() to manipulate mbuf's in
bridge_ipf().  Fixes kernel memory corruption that occured when using
m_split() and m_cat().
Idea from OpenBSD.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Dec 9 19:33:22 2003 UTC (20 years, 2 months ago) by augustss
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

Fix spelling mistake in a comment.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Oct 28 22:31:12 2003 UTC (20 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +3 -4 lines
Diff to previous 1.19 (colored)

Mark this initializer in the canonical way so it can be found later.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Oct 25 18:29:12 2003 UTC (20 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.18: +6 -3 lines
Diff to previous 1.18 (colored)

Fix uninitialized variable warnings

Revision 1.18 / (download) - annotate - [select for diffs], Tue Sep 16 17:37:27 2003 UTC (20 years, 5 months ago) by jdc
Branch: MAIN
Changes since 1.17: +43 -23 lines
Diff to previous 1.17 (colored)

Add a flag parameter to bridge_enqueue() to tell it whether to run the
filter or not.  We only need to run the filter for bridge_forward() and
bridge_broadcast().  If we also run it for bridge_output(), we will run
the filter twice outbound per packet, so don't.

In bridge_ipf(), make sure we don't run m_cat() on a single mbuf chain
by checking to see (and remembering) if we need to m_split() the mbuf.
This fixes bridge + ipfilter on sparc.

Fixes PR kern/22063.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Aug 11 15:14:16 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.16: +2 -3 lines
Diff to previous 1.16 (colored)

rm extra blank line

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jul 13 08:51:36 2003 UTC (20 years, 7 months ago) by jdc
Branch: MAIN
Changes since 1.15: +4 -3 lines
Diff to previous 1.15 (colored)

Include opt_inet.h to get INET6 definition.
Now, bridged ipv6 packets are passed through ipfilter.
However, some v6 packets still do not get transmitted when ipf is enabled.
Partial fix for PR kern/22063.

Revision 1.5.4.2 / (download) - annotate - [select for diffs], Mon Jun 30 03:13:39 2003 UTC (20 years, 8 months ago) by grant
Branch: netbsd-1-6
CVS Tags: 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
Changes since 1.5.4.1: +27 -2 lines
Diff to previous 1.5.4.1 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)

Apply patch (requested by bouyer in ticket #1355):

Fix 2 bugs:
- initialise stp when the bridge is turned up, without this stp will
  keep all interfaces disabled in a sequence like:
  brconfig bridge0 add if0 add if1 stp if0 stp if1 up
- s/BRDGSPRI/BRDGSIFPRIO in brconfig.c:cmd_ifpriority()

add a command (ifpathcost) to change the stp path cost of the STP path
cost of an interface. Display the interface path cost with the others
STP parameters.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jun 23 11:02:09 2003 UTC (20 years, 8 months ago) by martin
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored)

Make sure to include opt_foo.h if a defflag option FOO is used.

Revision 1.14 / (download) - annotate - [select for diffs], Sat May 24 14:22:14 2003 UTC (20 years, 9 months ago) by kristerw
Branch: MAIN
Changes since 1.13: +10 -6 lines
Diff to previous 1.13 (colored)

Make sure splx() is called for all bridge_ioctl() error cases.

Revision 1.13 / (download) - annotate - [select for diffs], Fri May 16 04:54:55 2003 UTC (20 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.12: +6 -4 lines
Diff to previous 1.12 (colored)

use strlcpy

Revision 1.12 / (download) - annotate - [select for diffs], Wed May 14 23:18:29 2003 UTC (20 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.11: +3 -13 lines
Diff to previous 1.11 (colored)

use arc4random

Revision 1.11 / (download) - annotate - [select for diffs], Wed Mar 19 10:34:34 2003 UTC (20 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.10: +27 -2 lines
Diff to previous 1.10 (colored)

Fix 2 bugs:
- initialise stp when the bridge is turned up, without this stp will keep
  all interfaces disabled in a sequence like:
  brconfig bridge0 add if0 add if1 stp if0 stp if1 up
- s/BRDGSPRI/BRDGSIFPRIO in brconfig.c:cmd_ifpriority()

add a command (ifpathcost) to change the stp path cost of the STP path cost of
an interface. Display the interface path cost with the others STP parameters.

Revision 1.10 / (download) - annotate - [select for diffs], Thu Feb 27 19:22:49 2003 UTC (21 years ago) by perseant
Branch: MAIN
Changes since 1.9: +3 -2 lines
Diff to previous 1.9 (colored)

Make BRIDGE_IPF an option, and document it.  Add it (commented) to GENERIC.
Let brconfig tell whether the bridge is using the ipfilter hook, or not.

Revision 1.9 / (download) - annotate - [select for diffs], Sat Feb 15 00:46:30 2003 UTC (21 years ago) by perseant
Branch: MAIN
Changes since 1.8: +353 -2 lines
Diff to previous 1.8 (colored)

Add ipf packet-filtering option to if_bridge.  The option is controlled at
compile-time by BRIDGE_IPF, and at runtime by brconfig with the {ipf,-ipf}
option on a per-bridge basis.

As a side-effect, add PFIL_HOOKS processing to if_bridge.

Revision 1.2.4.6 / (download) - annotate - [select for diffs], Fri Sep 6 08:48:51 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: kqueue
Changes since 1.2.4.5: +25 -8 lines
Diff to previous 1.2.4.5 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

sync kqueue branch with HEAD

Revision 1.5.2.3 / (download) - annotate - [select for diffs], Thu Aug 29 00:56:41 2002 UTC (21 years, 6 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.5.2.2: +25 -8 lines
Diff to previous 1.5.2.2 (colored) to branchpoint 1.5 (colored) next main 1.6 (colored)

catch up with -current.

Revision 1.2.2.9 / (download) - annotate - [select for diffs], Tue Aug 27 23:47:51 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.2.2.8: +25 -8 lines
Diff to previous 1.2.2.8 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Catch up to -current.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Aug 24 19:00:31 2002 UTC (21 years, 6 months ago) by martin
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, gehenna-devsw-base, fvdl_fs64_base
Changes since 1.7: +25 -8 lines
Diff to previous 1.7 (colored)

Add a function to lookup bridge members by struct ifnet * and use
it at all call sites that have such a pointer readily available.
This avoids unnecessary strcmp()s in critical paths, and removes
some XXX comments.

Revision 1.2.2.8 / (download) - annotate - [select for diffs], Fri Jul 12 01:40:28 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.2.2.7: +2 -3 lines
Diff to previous 1.2.2.7 (colored) to branchpoint 1.2 (colored)

No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.2.2.7 / (download) - annotate - [select for diffs], Mon Jun 24 22:11:28 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.2.2.6: +3 -3 lines
Diff to previous 1.2.2.6 (colored) to branchpoint 1.2 (colored)

Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).

Revision 1.2.4.5 / (download) - annotate - [select for diffs], Sun Jun 23 17:50:22 2002 UTC (21 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.2.4.4: +8 -4 lines
Diff to previous 1.2.4.4 (colored) to branchpoint 1.2 (colored)

catch up with -current on kqueue branch

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

catch up with -current.

Revision 1.2.2.6 / (download) - annotate - [select for diffs], Thu Jun 20 03:48:10 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.2.2.5: +6 -3 lines
Diff to previous 1.2.2.5 (colored) to branchpoint 1.2 (colored)

Catch up to -current.

Revision 1.5.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 16:28:33 2002 UTC (21 years, 8 months ago) by tv
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.5: +5 -2 lines
Diff to previous 1.5 (colored)

Pull up revision 1.7 (requested by itojun in ticket #217):
reject "add" request if if_mtu is different.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Jun 8 23:17:01 2002 UTC (21 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.6: +5 -2 lines
Diff to previous 1.6 (colored)

reject "add" request if if_mtu is different.

Revision 1.5.2.1 / (download) - annotate - [select for diffs], Thu May 30 13:52:24 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Catch up with -current.

Revision 1.6 / (download) - annotate - [select for diffs], Thu May 23 06:19:39 2002 UTC (21 years, 9 months ago) by itojun
Branch: MAIN
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

use IFT_BRIDGE

Revision 1.2.2.5 / (download) - annotate - [select for diffs], Mon Apr 1 07:48:19 2002 UTC (21 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.2.2.4: +5 -4 lines
Diff to previous 1.2.2.4 (colored) to branchpoint 1.2 (colored)

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

Revision 1.5 / (download) - annotate - [select for diffs], Sun Mar 24 16:11:23 2002 UTC (21 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: netbsd-1-6-base
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.4: +4 -3 lines
Diff to previous 1.4 (colored)

Fix a memory leak in bridge_ioctl_add() when the called for non-ethernet
interface.
Problem noted and fix provided by in kern/16019 by Love.

Revision 1.2.4.4 / (download) - annotate - [select for diffs], Sat Mar 16 16:02:04 2002 UTC (21 years, 11 months ago) by jdolecek
Branch: kqueue
Changes since 1.2.4.3: +3 -3 lines
Diff to previous 1.2.4.3 (colored) to branchpoint 1.2 (colored)

Catch up with -current.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:43 2002 UTC (21 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, newlock, eeh-devprop-base, eeh-devprop
Changes since 1.3: +3 -3 lines
Diff to previous 1.3 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

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

Sync kqueue branch with -current.

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

Catch up to -current.

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

add RCSIDs

Revision 1.2.2.3 / (download) - annotate - [select for diffs], Tue Sep 25 16:15:55 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.2.2.2: +3 -2 lines
Diff to previous 1.2.2.2 (colored) to branchpoint 1.2 (colored)

LWPify.

Revision 1.2.4.2 / (download) - annotate - [select for diffs], Sat Aug 25 06:16:56 2001 UTC (22 years, 6 months ago) by thorpej
Branch: kqueue
Changes since 1.2.4.1: +1779 -0 lines
Diff to previous 1.2.4.1 (colored) to branchpoint 1.2 (colored)

Merge Aug 24 -current into the kqueue branch.

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Fri Aug 24 00:12:08 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.2.2.1: +1779 -0 lines
Diff to previous 1.2.2.1 (colored) to branchpoint 1.2 (colored)

Catch up with -current.

Revision 1.2.4.1, Fri Aug 17 22:10:20 2001 UTC (22 years, 6 months ago) by thorpej
Branch: kqueue
Changes since 1.2: +0 -1779 lines
FILE REMOVED

file if_bridge.c was added on branch kqueue on 2001-08-25 06:16:56 +0000

Revision 1.2.2.1, Fri Aug 17 22:10:20 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.2: +0 -1779 lines
FILE REMOVED

file if_bridge.c was added on branch nathanw_sa on 2001-08-24 00:12:08 +0000

Revision 1.2 / (download) - annotate - [select for diffs], Fri Aug 17 22:10:20 2001 UTC (22 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: nathanw_sa, kqueue
Changes since 1.1: +5 -2 lines
Diff to previous 1.1 (colored)

Only report expire time for DYNAMIC forwarding table entries.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Aug 17 21:37:27 2001 UTC (22 years, 6 months ago) by thorpej
Branch: MAIN

Add support for building Ethernet bridges, based on Jason Wright's
bridge driver from OpenBSD, although the bridge code has been *heavily*
modified by me (the 802.1D code remains mostly unchanged from the
original).

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>