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


Keyword substitution: kv
Default branch: MAIN


Revision 1.189.4.2: download - view: text, markup, annotated - select for diffs
Thu Sep 5 09:27:12 2024 UTC (2 months, 4 weeks ago) by martin
Branches: netbsd-10
Diff to: previous 1.189.4.1: preferred, colored; branchpoint 1.189: preferred, colored; next MAIN 1.190: preferred, colored
Changes since revision 1.189.4.1: +32 -5 lines
Pull up following revision(s) (requested by ozaki-r in ticket #818):

	sys/net/if_bridgevar.h: revision 1.39
	sbin/brconfig/brconfig.c: revision 1.18
	tests/net/if_bridge/unicast.pcap.uue: revision 1.1
	tests/net/if_bridge/t_bridge.sh: revision 1.20
	sbin/brconfig/brconfig.8: revision 1.21
	tests/net/if_bridge/t_bridge.sh: revision 1.21
	sys/net/if_bridge.c: revision 1.194
	tests/net/if_bridge/Makefile: revision 1.4
	distrib/sets/lists/tests/mi: revision 1.1336
	tests/net/if_bridge/broadcast.pcap.uue: revision 1.1

bridge: implement interface protection

It enables a feature similar to "protected-port" or "isolation" in some
router products by marking member interfaces protected; when a frame
arrives on a protected interface and is being forwarded to another
protected interface, the frame will be discarded.

The code is developed by the SEIL team at IIJ.

tests: dedup test scripts like others

brconfig: add protect/-protect commands

It marks/clears a specified interface "protected".
tests, bridge: add tests for interface protection

The original author of the test is k-goda@IIJ.  ozaki-r improved
the test slightly.

distrib: install uuencoded pcap files for testing

Revision 1.194: download - view: text, markup, annotated - select for diffs
Tue Sep 3 07:59:48 2024 UTC (3 months ago) by ozaki-r
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +32 -5 lines
bridge: implement interface protection

It enables a feature similar to "protected-port" or "isolation" in some
router products by marking member interfaces protected; when a frame
arrives on a protected interface and is being forwarded to another
protected interface, the frame will be discarded.

The code is developed by the SEIL team at IIJ.

Revision 1.164.4.2: download - view: text, markup, annotated - select for diffs
Sat Jul 20 15:55:23 2024 UTC (4 months, 2 weeks ago) by martin
Branches: netbsd-9
Diff to: previous 1.164.4.1: preferred, colored; branchpoint 1.164: preferred, colored; next MAIN 1.165: preferred, colored
Changes since revision 1.164.4.1: +10 -3 lines
Pull up following revision(s) (requested by rin in ticket #1858):

	sys/net/if_bridge.c: revision 1.192

bridge: add missing curlwp_bind() for pppoe
From knakahara@

Revision 1.189.4.1: download - view: text, markup, annotated - select for diffs
Sat Jul 20 15:54:10 2024 UTC (4 months, 2 weeks ago) by martin
Branches: netbsd-10
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +10 -3 lines
Pull up following revision(s) (requested by rin in ticket #763):

	sys/net/if_bridge.c: revision 1.192

bridge: add missing curlwp_bind() for pppoe
From knakahara@

Revision 1.193: download - view: text, markup, annotated - select for diffs
Tue Jul 16 03:35:38 2024 UTC (4 months, 2 weeks ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +21 -24 lines
bridge: get rid of unnecessary macros for pserialize

Revision 1.192: download - view: text, markup, annotated - select for diffs
Tue Jul 16 03:32:43 2024 UTC (4 months, 2 weeks ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +10 -3 lines
bridge: add missing curlwp_bind() for pppoe

From knakahara@

Revision 1.191: download - view: text, markup, annotated - select for diffs
Fri Jul 5 04:31:53 2024 UTC (5 months ago) by rin
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +4 -6 lines
sys: Drop redundant NULL check before m_freem(9)

m_freem(9) safely has accepted NULL argument at least since 4.2BSD:
https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c

Compile-tested on amd64/ALL.

Suggested by knakahara@

Revision 1.190: download - view: text, markup, annotated - select for diffs
Sat Jun 29 12:11:12 2024 UTC (5 months ago) by riastradh
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +5 -5 lines
if_stats(9): Add ifp argument to if_stat..._ref.

This will enable us to pass the ifp through to a dtrace probe inside.

No functional change intended in this change, but this is an API
change visible to modules so it shouldn't be pulled up.

PR kern/58377

Revision 1.189.6.1.2.2: download - view: text, markup, annotated - select for diffs
Thu Nov 16 05:13:13 2023 UTC (12 months, 2 weeks ago) by thorpej
Branches: thorpej-ifq
Diff to: previous 1.189.6.1.2.1: preferred, colored; branchpoint 1.189.6.1: preferred, colored; next MAIN 1.190: preferred, colored
Changes since revision 1.189.6.1.2.1: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Thu Nov 16 05:02:23 2023 UTC (12 months, 2 weeks ago) by thorpej
Branches: thorpej-ifq
Diff to: previous 1.189.6.1: preferred, colored
Changes since revision 1.189.6.1: +5 -5 lines
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 - view: text, markup, annotated - select for diffs
Sat Nov 11 13:16:30 2023 UTC (12 months, 3 weeks ago) by thorpej
Branches: thorpej-altq-separation
CVS tags: thorpej-ifq-base
Branch point for: thorpej-ifq
Diff to: previous 1.189: preferred, colored; next MAIN 1.190: preferred, colored
Changes since revision 1.189: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Fri Jul 29 07:58:18 2022 UTC (2 years, 4 months ago) by skrll
Branches: MAIN
CVS tags: thorpej-altq-separation-base, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Branch point for: thorpej-altq-separation, netbsd-10
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +6 -6 lines
Sprinkle const

Revision 1.188: download - view: text, markup, annotated - select for diffs
Fri Jul 29 07:46:19 2022 UTC (2 years, 4 months ago) by skrll
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +24 -24 lines
Trailing whitespace

Revision 1.187: download - view: text, markup, annotated - select for diffs
Mon Jun 20 08:14:48 2022 UTC (2 years, 5 months ago) by yamaguchi
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +16 -2 lines
bridge(4): support VLAN frames stripped by hardware tagging

Revision 1.186: download - view: text, markup, annotated - select for diffs
Fri Dec 31 14:25:24 2021 UTC (2 years, 11 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Fri Dec 31 14:24:50 2021 UTC (2 years, 11 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +3 -3 lines
sys: Use if_ioctl wrapper function.

Revision 1.184: download - view: text, markup, annotated - select for diffs
Fri Dec 31 14:24:38 2021 UTC (2 years, 11 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Thu Sep 30 03:57:48 2021 UTC (3 years, 2 months ago) by yamaguchi
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +16 -6 lines
bridge: Register bridge_ifdetach to ether_ifdetach hook

Revision 1.182: download - view: text, markup, annotated - select for diffs
Thu Sep 30 03:35:55 2021 UTC (3 years, 2 months ago) by yamaguchi
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +11 -4 lines
bridge: Register bridge_calc_link_state to link-state change hook

Revision 1.179.4.2: download - view: text, markup, annotated - select for diffs
Sun Aug 1 22:42:41 2021 UTC (3 years, 4 months ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.179.4.1: preferred, colored; branchpoint 1.179: preferred, colored; next MAIN 1.180: preferred, colored
Changes since revision 1.179.4.1: +3 -3 lines
Sync with HEAD.

Revision 1.181: download - view: text, markup, annotated - select for diffs
Fri Jul 2 03:30:46 2021 UTC (3 years, 5 months ago) by yamaguchi
Branches: 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
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +3 -3 lines
Use if_ioctl() for changing MTU, not ether_ioctl to prevent panic

Fix PR kern/56292

Revision 1.179.4.1: download - view: text, markup, annotated - select for diffs
Thu Jun 17 04:46:35 2021 UTC (3 years, 5 months ago) by thorpej
Branches: thorpej-i2c-spi-conf
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +3 -15 lines
Sync w/ HEAD.

Revision 1.180: download - view: text, markup, annotated - select for diffs
Wed Jun 16 00:21:19 2021 UTC (3 years, 5 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +3 -15 lines
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 - view: text, markup, annotated - select for diffs
Sat Apr 3 22:29:01 2021 UTC (3 years, 8 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.176.2.1: preferred, colored; next MAIN 1.177: preferred, colored
Changes since revision 1.176.2.1: +11 -29 lines
Sync with HEAD.

Revision 1.179: download - view: text, markup, annotated - select for diffs
Fri Feb 19 14:51:59 2021 UTC (3 years, 9 months ago) by christos
Branches: 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
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +4 -4 lines
- 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 - view: text, markup, annotated - select for diffs
Sun Feb 14 20:58:34 2021 UTC (3 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +11 -29 lines
- 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 - view: text, markup, annotated - select for diffs
Mon Dec 14 14:38:14 2020 UTC (3 years, 11 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +2 -16 lines
Sync w/ HEAD.

Revision 1.177: download - view: text, markup, annotated - select for diffs
Mon Nov 2 12:14:59 2020 UTC (4 years, 1 month ago) by roy
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +2 -16 lines
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 - view: text, markup, annotated - select for diffs
Sun Sep 27 19:16:28 2020 UTC (4 years, 2 months ago) by roy
Branches: MAIN
Branch point for: thorpej-futex
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +16 -2 lines
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 - view: text, markup, annotated - select for diffs
Sun Sep 27 00:32:17 2020 UTC (4 years, 2 months ago) by roy
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +39 -4 lines
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 - view: text, markup, annotated - select for diffs
Sat Aug 1 06:50:43 2020 UTC (4 years, 4 months ago) by maxv
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +4 -14 lines
Remove #ifdef BRIDGE_IPF, compile in the code by default. Sent to
tech-net@.

Revision 1.173: download - view: text, markup, annotated - select for diffs
Fri May 1 22:27:42 2020 UTC (4 years, 7 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +4 -4 lines
report no enabled capabilities when no interface is part of bridge

Revision 1.172: download - view: text, markup, annotated - select for diffs
Thu Apr 30 10:04:54 2020 UTC (4 years, 7 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +13 -2 lines
for bridge(4), report the common enabled capabilities of the members
via SIOCGIFCAP for visibility

Revision 1.171: download - view: text, markup, annotated - select for diffs
Mon Apr 27 20:46:01 2020 UTC (4 years, 7 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +11 -4 lines
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 - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:15 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.156.2.2: preferred, colored; branchpoint 1.156: preferred, colored; next MAIN 1.157: preferred, colored
Changes since revision 1.156.2.2: +1 -1 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.156.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:57 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.156.2.1: preferred, colored; branchpoint 1.156: preferred, colored
Changes since revision 1.156.2.1: +22 -21 lines
Merge changes from current as of 20200406

Revision 1.170: download - view: text, markup, annotated - select for diffs
Fri Mar 27 16:47:00 2020 UTC (4 years, 8 months ago) by jdolecek
Branches: 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
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +3 -7 lines
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 - view: text, markup, annotated - select for diffs
Tue Mar 24 13:30:54 2020 UTC (4 years, 8 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +8 -2 lines
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 - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:06 2020 UTC (4 years, 9 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.165: preferred, colored; next MAIN 1.166: preferred, colored
Changes since revision 1.165: +15 -16 lines
Sync with head.

Revision 1.164.4.1: download - view: text, markup, annotated - select for diffs
Thu Feb 27 18:34:12 2020 UTC (4 years, 9 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +2 -5 lines
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 - view: text, markup, annotated - select for diffs
Mon Feb 24 00:47:38 2020 UTC (4 years, 9 months ago) by rin
Branches: MAIN
CVS tags: ad-namecache-base3
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +2 -5 lines
Remove debug printf I put into bridge_calc_csum_flags().
Sorry for noise.

Revision 1.167: download - view: text, markup, annotated - select for diffs
Sun Feb 23 21:50:21 2020 UTC (4 years, 9 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +3 -3 lines
disable the DEBUG bridge_calc_csum_flags() printf

Revision 1.166: download - view: text, markup, annotated - select for diffs
Wed Jan 29 04:18:34 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +15 -13 lines
Adopt <net/if_stats.h>.

Revision 1.165: download - view: text, markup, annotated - select for diffs
Mon Aug 5 13:30:21 2019 UTC (5 years, 4 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-20191119, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +3 -3 lines
 Cast uint32_t to avoid undefined behavior in bridge_rthash(). Found by kUBSan.

Revision 1.156.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:09:45 2019 UTC (5 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +158 -45 lines
Sync with HEAD

Revision 1.148.2.7: download - view: text, markup, annotated - select for diffs
Wed Dec 26 14:02:04 2018 UTC (5 years, 11 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.148.2.6: preferred, colored; branchpoint 1.148: preferred, colored; next MAIN 1.149: preferred, colored
Changes since revision 1.148.2.6: +134 -35 lines
Sync with HEAD, resolve a few conflicts

Revision 1.164: download - view: text, markup, annotated - select for diffs
Sat Dec 22 04:28:30 2018 UTC (5 years, 11 months ago) by rin
Branches: 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
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +21 -21 lines
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 - view: text, markup, annotated - select for diffs
Sat Dec 15 07:38:58 2018 UTC (5 years, 11 months ago) by rin
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Fri Dec 14 12:27:22 2018 UTC (5 years, 11 months ago) by martin
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +3 -2 lines
Need <netinet6/ip6_var.h> for ip6_statinc() prototype.

Revision 1.161: download - view: text, markup, annotated - select for diffs
Wed Dec 12 01:46:47 2018 UTC (5 years, 11 months ago) by rin
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +115 -17 lines
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 - view: text, markup, annotated - select for diffs
Mon Nov 26 01:52:50 2018 UTC (6 years ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.148.2.5: preferred, colored; branchpoint 1.148: preferred, colored
Changes since revision 1.148.2.5: +8 -2 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.160: download - view: text, markup, annotated - select for diffs
Fri Nov 9 06:44:31 2018 UTC (6 years ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-compat-1126
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +8 -2 lines
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 - view: text, markup, annotated - select for diffs
Wed Oct 3 17:57:39 2018 UTC (6 years, 2 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Diff to: previous 1.134.6.11: preferred, colored; branchpoint 1.134: preferred, colored; next MAIN 1.135: preferred, colored
Changes since revision 1.134.6.11: +20 -12 lines
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 - view: text, markup, annotated - select for diffs
Sun Sep 30 01:45:56 2018 UTC (6 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.148.2.4: preferred, colored; branchpoint 1.148: preferred, colored
Changes since revision 1.148.2.4: +20 -12 lines
Ssync with HEAD

Revision 1.159: download - view: text, markup, annotated - select for diffs
Wed Sep 19 07:51:23 2018 UTC (6 years, 2 months ago) by msaitoh
Branches: MAIN
CVS tags: pgoyette-compat-1020, pgoyette-compat-0930
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +6 -7 lines
Micro optimization. m_copym(M_COPYALL) -> m_copypacket().

Revision 1.158: download - view: text, markup, annotated - select for diffs
Tue Sep 18 09:27:35 2018 UTC (6 years, 2 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +9 -6 lines
- Fix bridge_enqueue() which was broken by last commit. Use correct mbuf
  pointer.
- Modify comment.

Revision 1.157: download - view: text, markup, annotated - select for diffs
Fri Sep 14 11:05:09 2018 UTC (6 years, 2 months ago) by msaitoh
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +13 -7 lines
 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 - view: text, markup, annotated - select for diffs
Mon Jun 25 07:26:06 2018 UTC (6 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.148.2.3: preferred, colored; branchpoint 1.148: preferred, colored
Changes since revision 1.148.2.3: +3 -4 lines
Sync with HEAD

Revision 1.134.6.11: download - view: text, markup, annotated - select for diffs
Thu Jun 7 17:42:25 2018 UTC (6 years, 5 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2
Diff to: previous 1.134.6.10: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.6.10: +3 -4 lines
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 - view: text, markup, annotated - select for diffs
Fri May 25 04:40:27 2018 UTC (6 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +3 -4 lines
Ensure to call if_register after interface initializations finish

Revision 1.148.2.3: download - view: text, markup, annotated - select for diffs
Mon May 21 04:36:15 2018 UTC (6 years, 6 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.148.2.2: preferred, colored; branchpoint 1.148: preferred, colored
Changes since revision 1.148.2.2: +4 -6 lines
Sync with HEAD

Revision 1.134.6.10: download - view: text, markup, annotated - select for diffs
Tue May 15 13:48:37 2018 UTC (6 years, 6 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.134.6.9: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.6.9: +4 -6 lines
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 - view: text, markup, annotated - select for diffs
Mon May 14 02:55:03 2018 UTC (6 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-compat-0521
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +4 -6 lines
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 - view: text, markup, annotated - select for diffs
Sun Apr 22 07:20:27 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.148.2.1: preferred, colored; branchpoint 1.148: preferred, colored
Changes since revision 1.148.2.1: +61 -50 lines
Sync with HEAD

Revision 1.134.6.9: download - view: text, markup, annotated - select for diffs
Wed Apr 18 14:11:42 2018 UTC (6 years, 7 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-0-RC1
Diff to: previous 1.134.6.8: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.6.8: +61 -50 lines
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 - view: text, markup, annotated - select for diffs
Wed Apr 18 06:37:17 2018 UTC (6 years, 7 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-compat-0502, pgoyette-compat-0422
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +6 -2 lines
Add missing PSLIST_ENTRY_INIT and PSLIST_ENTRY_DESTROY

Revision 1.153: download - view: text, markup, annotated - select for diffs
Wed Apr 18 06:04:03 2018 UTC (6 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +3 -3 lines
Get rid of a unnecessary semicolon

Pointed out by kamil@

Revision 1.152: download - view: text, markup, annotated - select for diffs
Wed Apr 18 04:01:58 2018 UTC (6 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +43 -15 lines
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 - view: text, markup, annotated - select for diffs
Wed Apr 18 03:49:44 2018 UTC (6 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +13 -28 lines
Simplify bridge_rtnode_insert (NFC)

Revision 1.150: download - view: text, markup, annotated - select for diffs
Wed Apr 18 03:47:28 2018 UTC (6 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +8 -14 lines
Remove obsolete NULL checks

Revision 1.148.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 16 02:00:08 2018 UTC (6 years, 7 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +6 -2 lines
Sync with HEAD, resolve some conflicts

Revision 1.134.6.8: download - view: text, markup, annotated - select for diffs
Tue Apr 10 11:48:29 2018 UTC (6 years, 7 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.134.6.7: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.6.7: +6 -2 lines
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 - view: text, markup, annotated - select for diffs
Tue Apr 10 07:05:39 2018 UTC (6 years, 7 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-compat-0415
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +6 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Feb 26 00:41:13 2018 UTC (6 years, 9 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.134.6.6: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.6.6: +4 -8 lines
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 - view: text, markup, annotated - select for diffs
Tue Jan 16 13:01:10 2018 UTC (6 years, 10 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.134.6.5: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.6.5: +4 -3 lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 15 09:49:16 2018 UTC (6 years, 10 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-base, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +4 -3 lines
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 - view: text, markup, annotated - select for diffs
Tue Jan 2 10:20:33 2018 UTC (6 years, 11 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.134.6.4: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.6.4: +17 -13 lines
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 - view: text, markup, annotated - select for diffs
Thu Dec 28 07:06:36 2017 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +4 -3 lines
Ensure the timer isn't running by using workqueue_wait

Revision 1.146: download - view: text, markup, annotated - select for diffs
Tue Dec 19 03:32:35 2017 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +6 -3 lines
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 - view: text, markup, annotated - select for diffs
Mon Dec 11 03:29:20 2017 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +6 -6 lines
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 - view: text, markup, annotated - select for diffs
Sun Dec 10 10:10:24 2017 UTC (6 years, 11 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.134.6.3: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.6.3: +65 -54 lines
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 - view: text, markup, annotated - select for diffs
Fri Dec 8 04:03:51 2017 UTC (6 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +8 -4 lines
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 - view: text, markup, annotated - select for diffs
Wed Dec 6 07:40:16 2017 UTC (7 years ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +6 -10 lines
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 - view: text, markup, annotated - select for diffs
Wed Dec 6 05:11:10 2017 UTC (7 years ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +5 -4 lines
Ensure to hold if_ioctl_lock when calling if_flags_set

Revision 1.76.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:39:02 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.76.2.1: preferred, colored; branchpoint 1.76: preferred, colored; next MAIN 1.77: preferred, colored
Changes since revision 1.76.2.1: +854 -682 lines
update from HEAD

Revision 1.134.6.3: download - view: text, markup, annotated - select for diffs
Thu Nov 23 13:34:24 2017 UTC (7 years ago) by martin
Branches: netbsd-8
Diff to: previous 1.134.6.2: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.6.2: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Thu Nov 23 02:13:31 2017 UTC (7 years ago) by snj
Branches: netbsd-8
Diff to: previous 1.134.6.1: preferred, colored; branchpoint 1.134: preferred, colored
Changes since revision 1.134.6.1: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Fri Nov 17 07:52:07 2017 UTC (7 years ago) by ozaki-r
Branches: MAIN
CVS tags: tls-maxphys-base-20171202
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +3 -3 lines
Add missing IFEF_NO_LINK_STATE_CHANGE to bridge

Revision 1.140: download - view: text, markup, annotated - select for diffs
Thu Nov 16 03:07:18 2017 UTC (7 years ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Wed Nov 15 06:17:40 2017 UTC (7 years ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +4 -4 lines
Mark callouts of bridge CALLOUT_MPSAFE

Revision 1.138: download - view: text, markup, annotated - select for diffs
Wed Oct 25 04:33:15 2017 UTC (7 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +2 -7 lines
Remove unnecessary splsoftnet

Revision 1.137: download - view: text, markup, annotated - select for diffs
Wed Oct 25 04:17:34 2017 UTC (7 years, 1 month ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +2 -3 lines
Don't free sc_rthash twice

Revision 1.136: download - view: text, markup, annotated - select for diffs
Mon Oct 23 09:22:51 2017 UTC (7 years, 1 month ago) by msaitoh
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +66 -54 lines
- 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 - view: text, markup, annotated - select for diffs
Mon Oct 2 13:33:41 2017 UTC (7 years, 2 months ago) by martin
Branches: netbsd-8
CVS tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +10 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Oct 2 07:40:24 2017 UTC (7 years, 2 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +10 -2 lines
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 - view: text, markup, annotated - select for diffs
Sun Sep 24 20:05:03 2017 UTC (7 years, 2 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE
Diff to: previous 1.90: preferred, colored; next MAIN 1.91: preferred, colored
Changes since revision 1.90: +5 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:11 2017 UTC (7 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.91.2.10: preferred, colored; branchpoint 1.91: preferred, colored; next MAIN 1.92: preferred, colored
Changes since revision 1.91.2.10: +10 -19 lines
Sync with HEAD

Revision 1.131.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:54:05 2017 UTC (7 years, 7 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.131: preferred, colored; next MAIN 1.132: preferred, colored
Changes since revision 1.131: +16 -25 lines
Sync with HEAD

Revision 1.129.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:49 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.129.2.1: preferred, colored; branchpoint 1.129: preferred, colored; next MAIN 1.130: preferred, colored
Changes since revision 1.129.2.1: +16 -25 lines
Sync with HEAD

Revision 1.134: download - view: text, markup, annotated - select for diffs
Tue Mar 7 01:53:53 2017 UTC (7 years, 9 months ago) by ozaki-r
Branches: 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
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +2 -14 lines
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 - view: text, markup, annotated - select for diffs
Thu Feb 16 08:12:44 2017 UTC (7 years, 9 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +10 -7 lines
add l2tp(4) L2TPv3 interface.

originally implemented by IIJ SEIL team.

Revision 1.91.2.10: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:58 2017 UTC (7 years, 10 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.91.2.9: preferred, colored; branchpoint 1.91: preferred, colored
Changes since revision 1.91.2.9: +8 -8 lines
Sync with HEAD

Revision 1.132: download - view: text, markup, annotated - select for diffs
Mon Jan 23 10:19:03 2017 UTC (7 years, 10 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20170204
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +8 -8 lines
Replace some splnet with splsoftnet

Revision 1.129.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 4 14:49:20 2016 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +4 -4 lines
Sync with HEAD

Revision 1.91.2.9: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:56:08 2016 UTC (8 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.91.2.8: preferred, colored; branchpoint 1.91: preferred, colored
Changes since revision 1.91.2.8: +76 -76 lines
Sync with HEAD

Revision 1.131: download - view: text, markup, annotated - select for diffs
Thu Sep 15 14:40:43 2016 UTC (8 years, 2 months ago) by christos
Branches: 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
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +4 -4 lines
Always do the mbuf checks. The packet filters (npf) expect the mbuf to be
pulled-up. (Krists Krilovs)

Revision 1.130: download - view: text, markup, annotated - select for diffs
Mon Aug 29 03:31:59 2016 UTC (8 years, 3 months ago) by ozaki-r
Branches: MAIN
CVS tags: localcount-20160914
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +74 -74 lines
KNF; replace white spaces with hard tabs

No functional change.

Revision 1.91.2.8: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:21 2016 UTC (8 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.91.2.7: preferred, colored; branchpoint 1.91: preferred, colored
Changes since revision 1.91.2.7: +33 -14 lines
Sync with HEAD

Revision 1.129: download - view: text, markup, annotated - select for diffs
Wed Jun 22 10:44:32 2016 UTC (8 years, 5 months ago) by knakahara
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 20 08:14:41 2016 UTC (8 years, 5 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +8 -2 lines
fix: should not assert IFEF_OUTPUT_MPSAFE in bridge_output()

Revision 1.127: download - view: text, markup, annotated - select for diffs
Mon Jun 20 07:23:56 2016 UTC (8 years, 5 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +2 -4 lines
tentative fix for ATF(net/if_bridge/t_bridge)

Revision 1.126: download - view: text, markup, annotated - select for diffs
Mon Jun 20 07:06:06 2016 UTC (8 years, 5 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +7 -2 lines
make bridge_output MP-safe, so that bridge(4) can enable IFEF_OUTPUT_MPSAFE.

making MP-scalable is future work.

Revision 1.125: download - view: text, markup, annotated - select for diffs
Fri Jun 10 13:31:44 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +19 -10 lines
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 - view: text, markup, annotated - select for diffs
Fri Jun 10 13:27:16 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +6 -5 lines
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 - view: text, markup, annotated - select for diffs
Sun May 29 08:44:38 2016 UTC (8 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.91.2.6: preferred, colored; branchpoint 1.91: preferred, colored
Changes since revision 1.91.2.6: +73 -29 lines
Sync with HEAD

Revision 1.123: download - view: text, markup, annotated - select for diffs
Mon May 16 01:23:51 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20160529
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +25 -13 lines
Apply if_get and if_put to bridge(4)

Revision 1.122: download - view: text, markup, annotated - select for diffs
Wed May 4 18:59:55 2016 UTC (8 years, 7 months ago) by roy
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +47 -4 lines
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 - view: text, markup, annotated - select for diffs
Thu Apr 28 01:37:17 2016 UTC (8 years, 7 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +4 -13 lines
introduce new ifnet MP-scalable sending interface "if_transmit".

Revision 1.120: download - view: text, markup, annotated - select for diffs
Thu Apr 28 00:16:56 2016 UTC (8 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sun Apr 24 18:08:40 2016 UTC (8 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +2 -4 lines
CID 1358673: dead code

Revision 1.91.2.6: download - view: text, markup, annotated - select for diffs
Fri Apr 22 15:44:17 2016 UTC (8 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.91.2.5: preferred, colored; branchpoint 1.91: preferred, colored
Changes since revision 1.91.2.5: +170 -186 lines
Sync with HEAD

Revision 1.118: download - view: text, markup, annotated - select for diffs
Fri Apr 22 00:25:42 2016 UTC (8 years, 7 months ago) by roy
Branches: MAIN
CVS tags: nick-nhusb-base-20160422
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +10 -5 lines
Change used from int to bool.
If used, abort the loop because we think we're already at the end.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Wed Apr 20 09:01:04 2016 UTC (8 years, 7 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +3 -4 lines
IFQ_ENQUEUE refactor (3/3) : eliminate pktattr argument from IFQ_ENQUEUE caller

Revision 1.116: download - view: text, markup, annotated - select for diffs
Wed Apr 20 08:58:48 2016 UTC (8 years, 7 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +3 -3 lines
IFQ_ENQUEUE refactor (2/3) : eliminate pktattr argument from altq implemantation

Revision 1.115: download - view: text, markup, annotated - select for diffs
Tue Apr 19 07:10:22 2016 UTC (8 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +91 -99 lines
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 - view: text, markup, annotated - select for diffs
Tue Apr 19 07:03:12 2016 UTC (8 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +59 -74 lines
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 - view: text, markup, annotated - select for diffs
Mon Apr 11 05:40:47 2016 UTC (8 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +6 -7 lines
Fix usage of pslist(9)

Pointed out by riastradh@.

Revision 1.112: download - view: text, markup, annotated - select for diffs
Mon Apr 11 02:04:14 2016 UTC (8 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +32 -15 lines
Use pslist(9) in bridge(4)

This adds missing memory barriers to list operations for pserialize.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Mon Mar 28 04:38:04 2016 UTC (8 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +2 -15 lines
Remove unused global bridge list

Pointed out by riastradh@

Revision 1.110: download - view: text, markup, annotated - select for diffs
Wed Mar 23 05:44:01 2016 UTC (8 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +4 -4 lines
Fix LIST_FOREACH argument

Revision 1.109: download - view: text, markup, annotated - select for diffs
Wed Mar 23 04:56:21 2016 UTC (8 years, 8 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sat Mar 19 11:30:32 2016 UTC (8 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.91.2.4: preferred, colored; branchpoint 1.91: preferred, colored
Changes since revision 1.91.2.4: +128 -270 lines
Sync with HEAD

Revision 1.108: download - view: text, markup, annotated - select for diffs
Mon Feb 15 01:11:41 2016 UTC (8 years, 9 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20160319
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +119 -263 lines
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 - view: text, markup, annotated - select for diffs
Wed Feb 10 06:30:23 2016 UTC (8 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +4 -5 lines
Don't share struct work, instead have one per softc

Pointed out by riastradh@

Revision 1.106: download - view: text, markup, annotated - select for diffs
Tue Feb 9 08:32:12 2016 UTC (8 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +9 -6 lines
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 - view: text, markup, annotated - select for diffs
Sun Dec 27 12:10:06 2015 UTC (8 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.91.2.3: preferred, colored; branchpoint 1.91: preferred, colored
Changes since revision 1.91.2.3: +16 -5 lines
Sync with HEAD (as of 26th Dec)

Revision 1.105: download - view: text, markup, annotated - select for diffs
Thu Nov 19 16:23:54 2015 UTC (9 years ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20151226
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +5 -2 lines

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 - view: text, markup, annotated - select for diffs
Tue Oct 20 14:46:45 2015 UTC (9 years, 1 month ago) by maxv
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +3 -3 lines
Harmless alloc inconsistency; make sure the exact same argument is given to
kmem_alloc/kmem_free. Found by Brainy.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Wed Oct 7 08:48:04 2015 UTC (9 years, 2 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +12 -4 lines
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 - view: text, markup, annotated - select for diffs
Tue Sep 22 12:06:10 2015 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.91.2.2: preferred, colored; branchpoint 1.91: preferred, colored
Changes since revision 1.91.2.2: +23 -20 lines
Sync with HEAD

Revision 1.102: download - view: text, markup, annotated - select for diffs
Fri Aug 28 14:23:18 2015 UTC (9 years, 3 months ago) by rjs
Branches: MAIN
CVS tags: nick-nhusb-base-20150921
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +2 -3 lines
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 - view: text, markup, annotated - select for diffs
Thu Aug 20 14:40:19 2015 UTC (9 years, 3 months ago) by christos
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +4 -4 lines
include "ioconf.h" to get the 'void <driver>attach(int count);' prototype.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Thu Jul 23 10:52:34 2015 UTC (9 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +21 -17 lines
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 - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:25 2015 UTC (9 years, 6 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.91.2.1: preferred, colored; branchpoint 1.91: preferred, colored
Changes since revision 1.91.2.1: +54 -36 lines
Sync with HEAD

Revision 1.99: download - view: text, markup, annotated - select for diffs
Mon Jun 1 06:14:43 2015 UTC (9 years, 6 months ago) by matt
Branches: MAIN
CVS tags: nick-nhusb-base-20150606
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +28 -13 lines
Modify the BRDGGIFS and BRDGRTS cmds to be more COMPAT_NETBSD32 friendly.
(XXX whitespace)

Revision 1.98: download - view: text, markup, annotated - select for diffs
Thu Apr 16 08:54:15 2015 UTC (9 years, 7 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +8 -5 lines
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 - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:22 2015 UTC (9 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +408 -182 lines
Sync with HEAD

Revision 1.97: download - view: text, markup, annotated - select for diffs
Thu Jan 8 10:47:44 2015 UTC (9 years, 10 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20150406
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +281 -109 lines
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 - view: text, markup, annotated - select for diffs
Thu Jan 1 08:43:26 2015 UTC (9 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +5 -2 lines
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 - view: text, markup, annotated - select for diffs
Wed Dec 31 17:36:24 2014 UTC (9 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +86 -47 lines
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 - view: text, markup, annotated - select for diffs
Thu Dec 25 09:10:01 2014 UTC (9 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +6 -10 lines
Use LIST_FOREACH_SAFE in bridge_rt* functions

Revision 1.93: download - view: text, markup, annotated - select for diffs
Wed Dec 24 08:55:09 2014 UTC (9 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +37 -22 lines
Replace malloc/free with kmem_* in if_bridge

Additionally M_NOWAIT is replaced with KM_SLEEP.

Revision 1.92: download - view: text, markup, annotated - select for diffs
Mon Dec 22 09:42:45 2014 UTC (9 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +11 -10 lines
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 - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:34 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +530 -214 lines
Rebase to HEAD as of a few days ago.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Fri Aug 15 15:32:24 2014 UTC (10 years, 3 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +6 -2 lines
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 - view: text, markup, annotated - select for diffs
Sun Aug 10 06:56:15 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.77: preferred, colored; next MAIN 1.78: preferred, colored
Changes since revision 1.77: +512 -191 lines
Rebase.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Wed Jul 23 05:32:23 2014 UTC (10 years, 4 months ago) by ozaki-r
Branches: 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
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +30 -25 lines
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 - view: text, markup, annotated - select for diffs
Wed Jul 23 04:09:48 2014 UTC (10 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +3 -2 lines
Add missing unlock

Revision 1.88: download - view: text, markup, annotated - select for diffs
Sun Jul 20 16:40:34 2014 UTC (10 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +7 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Jul 14 02:34:36 2014 UTC (10 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +275 -60 lines
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 - view: text, markup, annotated - select for diffs
Wed Jul 2 09:51:08 2014 UTC (10 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +9 -5 lines
Protect bridge_list with a mutex

Revision 1.85: download - view: text, markup, annotated - select for diffs
Wed Jul 2 09:43:16 2014 UTC (10 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +2 -5 lines
Remove obsolete codes for if_snd

Revision 1.84: download - view: text, markup, annotated - select for diffs
Mon Jun 23 06:27:58 2014 UTC (10 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +2 -6 lines
Get rid of unnecessary xc_broadcast after pktq_barrier

Pointed out by rmind@

Revision 1.83: download - view: text, markup, annotated - select for diffs
Wed Jun 18 10:51:03 2014 UTC (10 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +41 -56 lines
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 - view: text, markup, annotated - select for diffs
Wed Jun 18 09:20:46 2014 UTC (10 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +38 -28 lines
Tidy up bridge_input

No functional change.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Tue Jun 17 10:39:46 2014 UTC (10 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +42 -23 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 16 01:05:25 2014 UTC (10 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +93 -2 lines
Add net.interfaces.bridgeN.fwdq.{maxlen,len,drops} sysctl

Revision 1.79: download - view: text, markup, annotated - select for diffs
Mon Jun 16 01:03:57 2014 UTC (10 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +27 -30 lines
Use pktqueue for bridge forwarding queue and softint

Revision 1.78: download - view: text, markup, annotated - select for diffs
Sun Jun 15 16:10:46 2014 UTC (10 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +3 -7 lines
Get rid of unnecessary splnet for pool_{get,put}

A mutex prevents interrupts in the functions now.

Revision 1.73.4.2: download - view: text, markup, annotated - select for diffs
Thu May 22 11:41:09 2014 UTC (10 years, 6 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.73.4.1: preferred, colored; branchpoint 1.73: preferred, colored; next MAIN 1.74: preferred, colored
Changes since revision 1.73.4.1: +20 -25 lines
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 - view: text, markup, annotated - select for diffs
Wed Aug 28 23:59:36 2013 UTC (11 years, 3 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.76: preferred, colored; next MAIN 1.77: preferred, colored
Changes since revision 1.76: +20 -25 lines
sync with head

Revision 1.77: download - view: text, markup, annotated - select for diffs
Sat Jun 29 21:06:58 2013 UTC (11 years, 5 months ago) by rmind
Branches: 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
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +20 -25 lines
- 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 - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:38 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +10 -5 lines
sync with head

Revision 1.74.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 5 21:33:43 2012 UTC (12 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.74: preferred, colored; next MAIN 1.75: preferred, colored
Changes since revision 1.74: +8 -4 lines
sync to latest -current.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Thu Mar 22 12:59:33 2012 UTC (12 years, 8 months ago) by wiz
Branches: 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
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +3 -3 lines
Fix typo in kauth name. From PR 46234 by Matthew Mondor.
Tested by Geoff Adams and Ryo ONODERA.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Tue Mar 13 18:40:58 2012 UTC (12 years, 8 months ago) by elad
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +8 -4 lines
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 - view: text, markup, annotated - select for diffs
Sat Nov 19 22:51:25 2011 UTC (13 years ago) by tls
Branches: 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
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +4 -3 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 6 09:09:52 2011 UTC (13 years, 6 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.72: preferred, colored; next MAIN 1.73: preferred, colored
Changes since revision 1.72: +3 -3 lines
Sync with HEAD.

Revision 1.71.4.2: download - view: text, markup, annotated - select for diffs
Tue May 31 03:05:06 2011 UTC (13 years, 6 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.71.4.1: preferred, colored; branchpoint 1.71: preferred, colored; next MAIN 1.72: preferred, colored
Changes since revision 1.71.4.1: +1 -1 lines
sync with head

Revision 1.73: download - view: text, markup, annotated - select for diffs
Mon May 23 21:52:54 2011 UTC (13 years, 6 months ago) by joerg
Branches: 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
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -3 lines
simplify

Revision 1.71.4.1: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:55:51 2011 UTC (13 years, 9 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +4 -2 lines
sync with head

Revision 1.72: download - view: text, markup, annotated - select for diffs
Tue Dec 7 20:38:26 2010 UTC (14 years ago) by pooka
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +4 -2 lines
_KERNEL_TOP

Revision 1.61.4.4: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:26 2010 UTC (14 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.61.4.3: preferred, colored; branchpoint 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61.4.3: +2 -5 lines
sync with head

Revision 1.71: download - view: text, markup, annotated - select for diffs
Tue Jan 19 22:08:00 2010 UTC (14 years, 10 months ago) by pooka
Branches: 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
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +2 -5 lines
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 - view: text, markup, annotated - select for diffs
Thu Jul 23 23:32:47 2009 UTC (15 years, 4 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.64.2.1: preferred, colored; branchpoint 1.64: preferred, colored; next MAIN 1.65: preferred, colored
Changes since revision 1.64.2.1: +4 -3 lines
Sync with HEAD.

Revision 1.61.4.3: download - view: text, markup, annotated - select for diffs
Sat Jun 20 07:20:33 2009 UTC (15 years, 5 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.61.4.2: preferred, colored; branchpoint 1.61: preferred, colored
Changes since revision 1.61.4.2: +4 -3 lines
sync with head

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sun May 17 11:34:21 2009 UTC (15 years, 6 months ago) by cegger
Branches: 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
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +4 -3 lines
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 - view: text, markup, annotated - select for diffs
Sat May 16 10:41:49 2009 UTC (15 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.61.4.1: preferred, colored; branchpoint 1.61: preferred, colored
Changes since revision 1.61.4.1: +23 -11 lines
sync with head

Revision 1.64.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:22:19 2009 UTC (15 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +164 -108 lines
Sync with HEAD.

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

Revision 1.69: download - view: text, markup, annotated - select for diffs
Tue May 12 23:03:24 2009 UTC (15 years, 6 months ago) by elad
Branches: MAIN
CVS tags: yamt-nfs-mp-base4, jym-xensuspend-base
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +23 -11 lines
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 - view: text, markup, annotated - select for diffs
Mon May 4 08:14:14 2009 UTC (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +163 -114 lines
sync with head.

Revision 1.62.4.2: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:37:16 2009 UTC (15 years, 7 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.62.4.1: preferred, colored; branchpoint 1.62: preferred, colored; next MAIN 1.63: preferred, colored
Changes since revision 1.62.4.1: +143 -99 lines
Sync with HEAD.

Revision 1.62.6.4: download - view: text, markup, annotated - select for diffs
Sat Apr 4 18:03:06 2009 UTC (15 years, 8 months ago) by snj
Branches: 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
Diff to: previous 1.62.6.3: preferred, colored; branchpoint 1.62: preferred, colored; next MAIN 1.63: preferred, colored
Changes since revision 1.62.6.3: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sat Apr 4 18:02:21 2009 UTC (15 years, 8 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.62.6.2: preferred, colored; branchpoint 1.62: preferred, colored
Changes since revision 1.62.6.2: +4 -3 lines
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 - view: text, markup, annotated - select for diffs
Sat Apr 4 18:01:25 2009 UTC (15 years, 8 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.62.6.1: preferred, colored; branchpoint 1.62: preferred, colored
Changes since revision 1.62.6.1: +8 -6 lines
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 - view: text, markup, annotated - select for diffs
Sat Apr 4 18:00:03 2009 UTC (15 years, 8 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +140 -99 lines
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 - view: text, markup, annotated - select for diffs
Sat Apr 4 15:53:49 2009 UTC (15 years, 8 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +3 -3 lines
Fix another typo

Revision 1.67: download - view: text, markup, annotated - select for diffs
Sat Apr 4 15:47:28 2009 UTC (15 years, 8 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +4 -3 lines
Fix a comment, and make it build.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Sat Apr 4 15:31:47 2009 UTC (15 years, 8 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +8 -6 lines
Fixes from Masao Uebayashi

Revision 1.65: download - view: text, markup, annotated - select for diffs
Sat Apr 4 10:00:23 2009 UTC (15 years, 8 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +140 -99 lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 19 13:20:11 2009 UTC (15 years, 10 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +20 -13 lines
Sync with HEAD.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sun Jan 18 10:28:55 2009 UTC (15 years, 10 months ago) by mrg
Branches: MAIN
CVS tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +10 -10 lines
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 - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:30 2009 UTC (15 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.56.6.2: preferred, colored; branchpoint 1.56: preferred, colored; next MAIN 1.57: preferred, colored
Changes since revision 1.56.6.2: +10 -3 lines
Sync with HEAD.

Revision 1.62.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:15:25 2008 UTC (15 years, 11 months ago) by haad
Branches: haad-dm
Diff to: previous 1.62: preferred, colored; next MAIN 1.63: preferred, colored
Changes since revision 1.62: +12 -5 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Nov 7 00:20:13 2008 UTC (16 years, 1 month ago) by dyoung
Branches: MAIN
CVS tags: mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +12 -5 lines
*** 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 - view: text, markup, annotated - select for diffs
Sun Jun 29 09:33:18 2008 UTC (16 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.56.6.1: preferred, colored; branchpoint 1.56: preferred, colored
Changes since revision 1.56.6.1: +2 -4 lines
Sync with HEAD.

Revision 1.61.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:31:57 2008 UTC (16 years, 5 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61: +4 -6 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.61.8.1: download - view: text, markup, annotated - select for diffs
Wed Jun 18 16:33:50 2008 UTC (16 years, 5 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61: +4 -6 lines
Sync with head.

Revision 1.61.2.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 09:15:13 2008 UTC (16 years, 5 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.61: preferred, colored; next MAIN 1.62: preferred, colored
Changes since revision 1.61: +4 -6 lines
sync with head.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sun Jun 15 16:37:21 2008 UTC (16 years, 5 months ago) by christos
Branches: 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
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +4 -6 lines
- 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 - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:21 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +14 -12 lines
Sync with HEAD.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Tue Apr 15 03:57:04 2008 UTC (16 years, 7 months ago) by thorpej
Branches: 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
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +7 -6 lines
Make ip6 and icmp6 stats per-cpu.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sat Apr 12 09:26:45 2008 UTC (16 years, 7 months ago) by cegger
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -2 lines
make this build with BRIDGE_IPF and PFIL_HOOKS options

Revision 1.59: download - view: text, markup, annotated - select for diffs
Sat Apr 12 05:58:22 2008 UTC (16 years, 7 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +9 -9 lines
Make IP, TCP, UDP, and ICMP statistics per-CPU.  The stats are collated
when the user requests them via sysctl.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Tue Apr 8 23:37:43 2008 UTC (16 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +5 -5 lines
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 - view: text, markup, annotated - select for diffs
Mon Apr 7 06:31:27 2008 UTC (16 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +9 -9 lines
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 - view: text, markup, annotated - select for diffs
Sun Mar 23 02:05:04 2008 UTC (16 years, 8 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.54: preferred, colored; next MAIN 1.55: preferred, colored
Changes since revision 1.54: +39 -64 lines
sync with HEAD

Revision 1.31.2.6: download - view: text, markup, annotated - select for diffs
Wed Feb 27 08:37:00 2008 UTC (16 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.31.2.5: preferred, colored; branchpoint 1.31: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31.2.5: +3 -3 lines
sync with head.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Wed Feb 20 17:05:52 2008 UTC (16 years, 9 months ago) by matt
Branches: 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
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +3 -3 lines
s/u_\(int[0-9]*_t\)/u\1/g
(change u_int*_t to uint*_t)

Revision 1.54.8.1: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:07:01 2008 UTC (16 years, 9 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.54: preferred, colored; next MAIN 1.55: preferred, colored
Changes since revision 1.54: +38 -63 lines
Sync with HEAD.

Revision 1.31.2.5: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:47:01 2008 UTC (16 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.31.2.4: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.4: +38 -63 lines
sync with head

Revision 1.54.14.1: download - view: text, markup, annotated - select for diffs
Sun Jan 20 17:51:43 2008 UTC (16 years, 10 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.54: preferred, colored; next MAIN 1.55: preferred, colored
Changes since revision 1.54: +38 -63 lines
Sync with HEAD

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat Jan 19 23:17:47 2008 UTC (16 years, 10 months ago) by dyoung
Branches: MAIN
CVS tags: mjf-devfs-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +38 -63 lines
Use C99 array initializers for bridge_control_table[].

Revision 1.50.2.3: download - view: text, markup, annotated - select for diffs
Tue Oct 9 13:44:39 2007 UTC (17 years, 2 months ago) by ad
Branches: vmlocking
Diff to: previous 1.50.2.2: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50.2.2: +4 -4 lines
Sync with head.

Revision 1.52.6.1: download - view: text, markup, annotated - select for diffs
Mon Sep 3 16:48:53 2007 UTC (17 years, 3 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.52: preferred, colored; next MAIN 1.53: preferred, colored
Changes since revision 1.52: +4 -4 lines
Sync with HEAD.

Revision 1.31.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:42:03 2007 UTC (17 years, 3 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.31.2.3: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.3: +15 -15 lines
sync with head.

Revision 1.52.2.1: download - view: text, markup, annotated - select for diffs
Mon Sep 3 10:23:08 2007 UTC (17 years, 3 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.52: preferred, colored; next MAIN 1.53: preferred, colored
Changes since revision 1.52: +4 -4 lines
Sync with HEAD.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Mon Aug 27 14:59:11 2007 UTC (17 years, 3 months ago) by dyoung
Branches: 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
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +3 -3 lines
LLADDR -> CLLADDR.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sun Aug 26 22:59:08 2007 UTC (17 years, 3 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Wed Jul 11 20:10:53 2007 UTC (17 years, 4 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51: +4 -4 lines
Sync with head.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Mon Jul 9 21:10:59 2007 UTC (17 years, 5 months ago) by ad
Branches: 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
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -4 lines
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 - view: text, markup, annotated - select for diffs
Sun Jul 1 21:50:43 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.50.2.1: preferred, colored
Changes since revision 1.50.2.1: +4 -4 lines
Adapt to callout API change.

Revision 1.47.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 24 14:56:08 2007 UTC (17 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.47.2.2: preferred, colored; branchpoint 1.47: preferred, colored; next MAIN 1.48: preferred, colored
Changes since revision 1.47.2.2: +3 -3 lines
sync with head.

Revision 1.50.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 13 16:52:00 2007 UTC (17 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -3 lines
Sync with head.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Mon Mar 12 18:18:35 2007 UTC (17 years, 8 months ago) by ad
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: mjf-ufs-trans
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -3 lines
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.47.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:59:10 2007 UTC (17 years, 8 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.47.2.1: preferred, colored; branchpoint 1.47: preferred, colored
Changes since revision 1.47.2.1: +10 -10 lines
Sync with HEAD.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:03:15 2007 UTC (17 years, 9 months ago) by christos
Branches: MAIN
Branch point for: vmlocking
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +10 -10 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.47.2.1: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:54:40 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +4 -5 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.31.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:11:33 2007 UTC (17 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.31.2.2: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.2: +5 -6 lines
sync with head.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Wed Feb 21 02:24:14 2007 UTC (17 years, 9 months ago) by dyoung
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +3 -4 lines
Use __arraycount().

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat Feb 17 22:34:08 2007 UTC (17 years, 9 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Fri Jan 12 01:04:11 2007 UTC (17 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.40.4.1: preferred, colored; branchpoint 1.40: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.4.1: +3 -36 lines
Sync with head.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Thu Jan 4 19:07:03 2007 UTC (17 years, 11 months ago) by elad
Branches: MAIN
CVS tags: post-newlock2-merge, newlock2-nbase, newlock2-base
Branch point for: yamt-idlelwp
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +3 -3 lines
Consistent usage of KAUTH_GENERIC_ISSUSER.

Revision 1.31.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:50:20 2006 UTC (17 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.31.2.1: preferred, colored; branchpoint 1.31: preferred, colored
Changes since revision 1.31.2.1: +13 -40 lines
sync with head.

Revision 1.40.6.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:19:00 2006 UTC (17 years, 11 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.40.6.1: preferred, colored; branchpoint 1.40: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.6.1: +7 -40 lines
sync with head.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Thu Nov 23 04:07:07 2006 UTC (18 years ago) by rpaulo
Branches: 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
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -35 lines
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 - view: text, markup, annotated - select for diffs
Sat Nov 18 21:39:29 2006 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +10 -3 lines
Sync with head.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Thu Nov 16 01:33:40 2006 UTC (18 years ago) by christos
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +7 -7 lines
__unused removal on arguments; approved by core.

Revision 1.40.6.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:07:24 2006 UTC (18 years, 1 month ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +15 -8 lines
sync with head

Revision 1.44: download - view: text, markup, annotated - select for diffs
Tue Oct 17 18:21:29 2006 UTC (18 years, 1 month ago) by dogcow
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -4 lines
now that we have -Wno-unused-parameter, back out all the tremendously ugly
code to gratuitously access said parameters.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Fri Oct 13 16:53:36 2006 UTC (18 years, 1 month ago) by dogcow
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Thu Oct 12 01:32:27 2006 UTC (18 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +7 -7 lines
- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.41: download - view: text, markup, annotated - select for diffs
Thu Oct 5 17:35:19 2006 UTC (18 years, 2 months ago) by tls
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +10 -3 lines
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 - view: text, markup, annotated - select for diffs
Sat Sep 9 02:58:06 2006 UTC (18 years, 3 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36: +34 -13 lines
sync with head

Revision 1.36.6.3: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:46:14 2006 UTC (18 years, 3 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.36.6.2: preferred, colored; branchpoint 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36.6.2: +5 -6 lines
sync with head

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sun Jul 23 22:06:12 2006 UTC (18 years, 4 months ago) by ad
Branches: 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
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +5 -6 lines
Use the LWP cached credentials where sane.

Revision 1.36.6.2: download - view: text, markup, annotated - select for diffs
Mon Jun 26 12:53:38 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.36.6.1: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.6.1: +11 -9 lines
sync with head.

Revision 1.31.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:10:27 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +163 -133 lines
sync with head.

Revision 1.38.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 19 04:09:12 2006 UTC (18 years, 5 months ago) by chap
Branches: chap-midi
Diff to: previous 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38: +11 -9 lines
Sync with head.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Wed Jun 7 22:33:42 2006 UTC (18 years, 6 months ago) by kardel
Branches: MAIN
CVS tags: yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +11 -9 lines
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 - view: text, markup, annotated - select for diffs
Thu Jun 1 22:38:37 2006 UTC (18 years, 6 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.36.4.1: preferred, colored; branchpoint 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36.4.1: +25 -5 lines
Sync with head.

Revision 1.36.10.1: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:43 2006 UTC (18 years, 6 months ago) by tron
Branches: peter-altq
Diff to: previous 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36: +25 -5 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.36.6.1: download - view: text, markup, annotated - select for diffs
Wed May 24 10:58:56 2006 UTC (18 years, 6 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +25 -5 lines
sync with head.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Thu May 18 09:05:51 2006 UTC (18 years, 6 months ago) by liamjfoy
Branches: MAIN
CVS tags: yamt-pdpolicy-base5, simonb-timecounters-base
Branch point for: chap-midi
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +21 -4 lines
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 - view: text, markup, annotated - select for diffs
Sun May 14 21:19:33 2006 UTC (18 years, 6 months ago) by elad
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +6 -3 lines
integrate kauth.

Revision 1.36.8.3: download - view: text, markup, annotated - select for diffs
Sat May 6 23:31:58 2006 UTC (18 years, 7 months ago) by christos
Branches: elad-kernelauth
Diff to: previous 1.36.8.2: preferred, colored; branchpoint 1.36: preferred, colored; next MAIN 1.37: preferred, colored
Changes since revision 1.36.8.2: +3 -2 lines
- 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 - view: text, markup, annotated - select for diffs
Fri Mar 10 15:05:22 2006 UTC (18 years, 9 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.36.8.1: preferred, colored; branchpoint 1.36: preferred, colored
Changes since revision 1.36.8.1: +3 -3 lines
generic_authorize() -> kauth_authorize_generic().

Revision 1.36.8.1: download - view: text, markup, annotated - select for diffs
Wed Mar 8 01:11:55 2006 UTC (18 years, 9 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +5 -3 lines
Adapt to kernel authorization KPI.

Revision 1.29.4.2: download - view: text, markup, annotated - select for diffs
Sun Feb 12 16:50:33 2006 UTC (18 years, 9 months ago) by tron
Branches: netbsd-3-0
CVS tags: netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE
Diff to: previous 1.29.4.1: preferred, colored; branchpoint 1.29: preferred, colored; next MAIN 1.30: preferred, colored
Changes since revision 1.29.4.1: +1 -0 lines
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 - view: text, markup, annotated - select for diffs
Sun Feb 12 16:49:50 2006 UTC (18 years, 9 months ago) by tron
Branches: 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
Diff to: previous 1.29.2.1: preferred, colored; branchpoint 1.29: preferred, colored; next MAIN 1.30: preferred, colored
Changes since revision 1.29.2.1: +1 -0 lines
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 - view: text, markup, annotated - select for diffs
Sun Feb 12 16:30:24 2006 UTC (18 years, 9 months ago) by tron
Branches: netbsd-2-0
Diff to: previous 1.22.2.2: preferred, colored; branchpoint 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22.2.2: +1 -0 lines
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 - view: text, markup, annotated - select for diffs
Sun Feb 12 16:29:54 2006 UTC (18 years, 9 months ago) by tron
Branches: netbsd-2-1
Diff to: previous 1.22.2.1.4.1: preferred, colored; branchpoint 1.22.2.1: preferred, colored; next MAIN 1.22.2.2: preferred, colored
Changes since revision 1.22.2.1.4.1: +1 -0 lines
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 - view: text, markup, annotated - select for diffs
Sun Feb 12 16:28:30 2006 UTC (18 years, 9 months ago) by tron
Branches: netbsd-2
Diff to: previous 1.22.2.1.2.1: preferred, colored; branchpoint 1.22.2.1: preferred, colored; next MAIN 1.22.2.2: preferred, colored
Changes since revision 1.22.2.1.2.1: +1 -0 lines
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 - view: text, markup, annotated - select for diffs
Sat Feb 4 14:18:52 2006 UTC (18 years, 10 months ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +11 -9 lines
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 - view: text, markup, annotated - select for diffs
Wed Feb 1 14:52:37 2006 UTC (18 years, 10 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.34.2.1: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34.2.1: +3 -2 lines
sync with head.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Tue Jan 17 13:23:02 2006 UTC (18 years, 10 months ago) by christos
Branches: 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
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +3 -2 lines
Make sure that breq is also cleared (from Xin LI)

Revision 1.34.2.1: download - view: text, markup, annotated - select for diffs
Sun Jan 15 10:02:57 2006 UTC (18 years, 10 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +4 -2 lines
sync with head.

Revision 1.29.4.1: download - view: text, markup, annotated - select for diffs
Mon Jan 9 13:35:35 2006 UTC (18 years, 10 months ago) by tron
Branches: netbsd-3-0
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 9 13:33:41 2006 UTC (18 years, 10 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 9 13:31:22 2006 UTC (18 years, 10 months ago) by tron
Branches: netbsd-2-0
Diff to: previous 1.22.2.1: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.1: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 9 13:30:37 2006 UTC (18 years, 10 months ago) by tron
Branches: netbsd-2-1
Diff to: previous 1.22.2.1: preferred, colored
Changes since revision 1.22.2.1: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 9 13:29:53 2006 UTC (18 years, 10 months ago) by tron
Branches: netbsd-2
Diff to: previous 1.22.2.1: preferred, colored
Changes since revision 1.22.2.1: +4 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Jan 9 13:04:38 2006 UTC (18 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +4 -2 lines
Make sure we initialize all structs to 0; from Xin LI

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sat Dec 24 20:45:09 2005 UTC (18 years, 11 months ago) by perry
Branches: MAIN
Branch point for: yamt-uio_vmspace
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +3 -3 lines
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Dec 11 23:05:24 2005 UTC (18 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +127 -122 lines
ANSI function decls and application of static.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:24:51 2005 UTC (18 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -2 lines
merge ktrace-lwp.

Revision 1.15.2.8: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:10:32 2005 UTC (19 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.15.2.7: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15.2.7: +10 -10 lines
Sync with HEAD. Here we go again...

Revision 1.31: download - view: text, markup, annotated - select for diffs
Wed Jun 1 19:45:34 2005 UTC (19 years, 6 months ago) by jdc
Branches: 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
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +10 -9 lines
Fix this properly by renaming the conflicting variables.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Jun 1 19:38:13 2005 UTC (19 years, 6 months ago) by jdc
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -3 lines
Remove extraneous definition of struct llc (found by shadow warning).

Revision 1.27.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:29:31 2005 UTC (19 years, 7 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27: +50 -18 lines
sync with -current

Revision 1.27.6.2: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:36:31 2005 UTC (19 years, 8 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.27.6.1: preferred, colored; branchpoint 1.27: preferred, colored; next MAIN 1.28: preferred, colored
Changes since revision 1.27.6.1: +16 -16 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.15.2.7: download - view: text, markup, annotated - select for diffs
Fri Mar 4 16:52:56 2005 UTC (19 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.15.2.6: preferred, colored
Changes since revision 1.15.2.6: +16 -16 lines
Sync with HEAD.

Hi Perry!

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Feb 26 22:45:09 2005 UTC (19 years, 9 months ago) by perry
Branches: 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
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +16 -16 lines
nuke trailing whitespace

Revision 1.27.6.1: download - view: text, markup, annotated - select for diffs
Sat Feb 12 18:17:53 2005 UTC (19 years, 9 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +36 -4 lines
sync with head.

Revision 1.15.2.6: download - view: text, markup, annotated - select for diffs
Fri Feb 4 11:47:42 2005 UTC (19 years, 10 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.15.2.5: preferred, colored
Changes since revision 1.15.2.5: +36 -4 lines
Sync with HEAD.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Jan 31 23:49:36 2005 UTC (19 years, 10 months ago) by kim
Branches: MAIN
CVS tags: yamt-km-base2
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +36 -4 lines
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 - view: text, markup, annotated - select for diffs
Sat Dec 18 09:32:50 2004 UTC (19 years, 11 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.15.2.4: preferred, colored
Changes since revision 1.15.2.4: +6 -4 lines
Sync with HEAD.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sat Dec 4 18:31:43 2004 UTC (20 years ago) by peter
Branches: MAIN
CVS tags: yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +6 -4 lines
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 - view: text, markup, annotated - select for diffs
Tue Oct 19 15:58:10 2004 UTC (20 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.15.2.3: preferred, colored
Changes since revision 1.15.2.3: +18 -12 lines
Sync with HEAD

Revision 1.22.2.1: download - view: text, markup, annotated - select for diffs
Fri Oct 8 03:11:13 2004 UTC (20 years, 2 months ago) by jmc
Branches: 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
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +7 -2 lines
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 - view: text, markup, annotated - select for diffs
Wed Oct 6 10:01:00 2004 UTC (20 years, 2 months ago) by bad
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +7 -2 lines
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 - view: text, markup, annotated - select for diffs
Tue Oct 5 03:36:45 2004 UTC (20 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +13 -12 lines
Only enable BRIDGE_IPF code if PFIL_HOOKS is enabled.

Revision 1.15.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:36:35 2004 UTC (20 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.15.2.2: preferred, colored
Changes since revision 1.15.2.2: +2 -2 lines
Fix the sync with head I botched.

Revision 1.15.2.2: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:54:16 2004 UTC (20 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.15.2.1: preferred, colored
Changes since revision 1.15.2.1: +0 -0 lines
Sync with HEAD.

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:54:11 2004 UTC (20 years, 4 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +76 -56 lines
Sync with HEAD

Revision 1.24: download - view: text, markup, annotated - select for diffs
Wed Apr 21 19:10:31 2004 UTC (20 years, 7 months ago) by itojun
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +3 -3 lines
kill a sprintf

Revision 1.23: download - view: text, markup, annotated - select for diffs
Wed Apr 21 18:40:38 2004 UTC (20 years, 7 months ago) by itojun
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +4 -3 lines
kill sprintf, use snprintf

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat Jan 31 20:11:13 2004 UTC (20 years, 10 months ago) by jdc
Branches: 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
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +58 -61 lines
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 - view: text, markup, annotated - select for diffs
Tue Dec 9 19:33:22 2003 UTC (21 years ago) by augustss
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -3 lines
Fix spelling mistake in a comment.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Oct 28 22:31:12 2003 UTC (21 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -4 lines
Mark this initializer in the canonical way so it can be found later.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Oct 25 18:29:12 2003 UTC (21 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +6 -3 lines
Fix uninitialized variable warnings

Revision 1.18: download - view: text, markup, annotated - select for diffs
Tue Sep 16 17:37:27 2003 UTC (21 years, 2 months ago) by jdc
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +43 -23 lines
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 - view: text, markup, annotated - select for diffs
Mon Aug 11 15:14:16 2003 UTC (21 years, 3 months ago) by itojun
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -3 lines
rm extra blank line

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Jul 13 08:51:36 2003 UTC (21 years, 4 months ago) by jdc
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -3 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 30 03:13:39 2003 UTC (21 years, 5 months ago) by grant
Branches: 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
Diff to: previous 1.5.4.1: preferred, colored; branchpoint 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5.4.1: +27 -2 lines
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 - view: text, markup, annotated - select for diffs
Mon Jun 23 11:02:09 2003 UTC (21 years, 5 months ago) by martin
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -2 lines
Make sure to include opt_foo.h if a defflag option FOO is used.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat May 24 14:22:14 2003 UTC (21 years, 6 months ago) by kristerw
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +10 -6 lines
Make sure splx() is called for all bridge_ioctl() error cases.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri May 16 04:54:55 2003 UTC (21 years, 6 months ago) by itojun
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +6 -4 lines
use strlcpy

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed May 14 23:18:29 2003 UTC (21 years, 6 months ago) by itojun
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +3 -13 lines
use arc4random

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Mar 19 10:34:34 2003 UTC (21 years, 8 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +27 -2 lines
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 - view: text, markup, annotated - select for diffs
Thu Feb 27 19:22:49 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -2 lines
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 - view: text, markup, annotated - select for diffs
Sat Feb 15 00:46:30 2003 UTC (21 years, 9 months ago) by perseant
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +353 -2 lines
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 - view: text, markup, annotated - select for diffs
Fri Sep 6 08:48:51 2002 UTC (22 years, 3 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.2.4.5: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.4.5: +25 -8 lines
sync kqueue branch with HEAD

Revision 1.5.2.3: download - view: text, markup, annotated - select for diffs
Thu Aug 29 00:56:41 2002 UTC (22 years, 3 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.5.2.2: preferred, colored; branchpoint 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5.2.2: +25 -8 lines
catch up with -current.

Revision 1.2.2.9: download - view: text, markup, annotated - select for diffs
Tue Aug 27 23:47:51 2002 UTC (22 years, 3 months ago) by nathanw
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.2.2.8: preferred, colored; branchpoint 1.2: preferred, colored; next MAIN 1.3: preferred, colored
Changes since revision 1.2.2.8: +25 -8 lines
Catch up to -current.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Aug 24 19:00:31 2002 UTC (22 years, 3 months ago) by martin
Branches: 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
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +25 -8 lines
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 - view: text, markup, annotated - select for diffs
Fri Jul 12 01:40:28 2002 UTC (22 years, 4 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.2.2.7: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.7: +2 -3 lines
No longer need to pull in lwp.h; proc.h pulls it in for us.

Revision 1.2.2.7: download - view: text, markup, annotated - select for diffs
Mon Jun 24 22:11:28 2002 UTC (22 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.2.2.6: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.6: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Sun Jun 23 17:50:22 2002 UTC (22 years, 5 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.2.4.4: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.4.4: +8 -4 lines
catch up with -current on kqueue branch

Revision 1.5.2.2: download - view: text, markup, annotated - select for diffs
Thu Jun 20 15:52:07 2002 UTC (22 years, 5 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.5.2.1: preferred, colored; branchpoint 1.5: preferred, colored
Changes since revision 1.5.2.1: +5 -2 lines
catch up with -current.

Revision 1.2.2.6: download - view: text, markup, annotated - select for diffs
Thu Jun 20 03:48:10 2002 UTC (22 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.2.2.5: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.5: +6 -3 lines
Catch up to -current.

Revision 1.5.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 16:28:33 2002 UTC (22 years, 6 months ago) by tv
Branches: 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
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +5 -2 lines
Pull up revision 1.7 (requested by itojun in ticket #217):
reject "add" request if if_mtu is different.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sat Jun 8 23:17:01 2002 UTC (22 years, 6 months ago) by itojun
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +5 -2 lines
reject "add" request if if_mtu is different.

Revision 1.5.2.1: download - view: text, markup, annotated - select for diffs
Thu May 30 13:52:24 2002 UTC (22 years, 6 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -3 lines
Catch up with -current.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu May 23 06:19:39 2002 UTC (22 years, 6 months ago) by itojun
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -3 lines
use IFT_BRIDGE

Revision 1.2.2.5: download - view: text, markup, annotated - select for diffs
Mon Apr 1 07:48:19 2002 UTC (22 years, 8 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.2.2.4: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.4: +5 -4 lines
Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Mar 24 16:11:23 2002 UTC (22 years, 8 months ago) by jdolecek
Branches: MAIN
CVS tags: netbsd-1-6-base
Branch point for: netbsd-1-6, gehenna-devsw
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +4 -3 lines
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 - view: text, markup, annotated - select for diffs
Sat Mar 16 16:02:04 2002 UTC (22 years, 8 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.2.4.3: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.4.3: +3 -3 lines
Catch up with -current.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Fri Mar 8 20:48:43 2002 UTC (22 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: newlock-base, newlock, eeh-devprop-base, eeh-devprop
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -3 lines
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 - view: text, markup, annotated - select for diffs
Thu Jan 10 20:02:02 2002 UTC (22 years, 10 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.2.4.2: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.4.2: +4 -1 lines
Sync kqueue branch with -current.

Revision 1.2.2.4: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:17:19 2001 UTC (23 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.2.2.3: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.3: +4 -1 lines
Catch up to -current.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Nov 12 23:49:37 2001 UTC (23 years ago) by lukem
Branches: MAIN
CVS tags: ifpoll-base
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -1 lines
add RCSIDs

Revision 1.2.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 25 16:15:55 2001 UTC (23 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.2.2.2: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.2: +3 -2 lines
LWPify.

Revision 1.2.4.2: download - view: text, markup, annotated - select for diffs
Sat Aug 25 06:16:56 2001 UTC (23 years, 3 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.2.4.1: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.4.1: +1779 -0 lines
Merge Aug 24 -current into the kqueue branch.

Revision 1.2.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 24 00:12:08 2001 UTC (23 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.2.2.1: preferred, colored; branchpoint 1.2: preferred, colored
Changes since revision 1.2.2.1: +1779 -0 lines
Catch up with -current.

Revision 1.2.4.1
Fri Aug 17 22:10:20 2001 UTC (23 years, 3 months ago) by thorpej
Branches: kqueue
FILE REMOVED
Changes since revision 1.2: +0 -1779 lines
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 (23 years, 3 months ago) by nathanw
Branches: nathanw_sa
FILE REMOVED
Changes since revision 1.2: +0 -1779 lines
file if_bridge.c was added on branch nathanw_sa on 2001-08-24 00:12:08 +0000

Revision 1.2: download - view: text, markup, annotated - select for diffs
Fri Aug 17 22:10:20 2001 UTC (23 years, 3 months ago) by thorpej
Branches: 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
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +5 -2 lines
Only report expire time for DYNAMIC forwarding table entries.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Aug 17 21:37:27 2001 UTC (23 years, 3 months ago) by thorpej
Branches: 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).

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>