Skip site navigation (1)Skip section navigation (2)

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

[BACK] Up to [FreeBSD] / src / sys / net

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.52.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.52.2.1: preferred, colored
Changes since revision 1.52.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)

Revision 1.52.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)

Revision 1.50.2.3: download - view: text, markup, annotated - select for diffs
Fri Jul 8 09:18:50 2011 UTC (7 months ago) by zec
Branches: RELENG_8
Diff to: previous 1.50.2.2: preferred, colored; branchpoint 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50.2.2: +5 -0 lines
SVN rev 223860 on 2011-07-08 09:18:50Z by zec

MFC r222834:
  Set curvnet context in a callout-trigerred code path.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Tue Jun 7 20:46:03 2011 UTC (8 months ago) by zec
Branches: MAIN
CVS tags: RELENG_9_BP, HEAD
Branch point for: RELENG_9
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +5 -0 lines
SVN rev 222834 on 2011-06-07 20:46:03Z by zec

Set curvnet context in a callout-trigerred code path.

MFC after:	3 days

Revision 1.39.2.1.8.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.39.2.1: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.2.1: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)

Revision 1.50.2.2.6.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.50.2.2: preferred, colored; next MAIN 1.50.2.3: preferred, colored
Changes since revision 1.50.2.2: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)

Revision 1.50.2.2.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 3 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.50.2.2: preferred, colored; next MAIN 1.50.2.3: preferred, colored
Changes since revision 1.50.2.2: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)

Revision 1.39.2.1.6.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (23 months, 4 weeks ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.39.2.1: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.2.1: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)

Revision 1.50.2.2.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.50.2.2: preferred, colored; next MAIN 1.50.2.3: preferred, colored
Changes since revision 1.50.2.2: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)

Revision 1.50.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 28 20:06:02 2009 UTC (2 years, 5 months ago) by rwatson
Branches: RELENG_8
CVS tags: RELENG_8_2_BP, RELENG_8_1_BP, RELENG_8_0_BP
Branch point for: RELENG_8_2, RELENG_8_1, RELENG_8_0
Diff to: previous 1.50.2.1: preferred, colored; branchpoint 1.50: preferred, colored
Changes since revision 1.50.2.1: +2 -2 lines
SVN rev 196626 on 2009-08-28 20:06:02Z by rwatson

Merge r196481 from head to stable/8:

  Rework global locks for interface list and index management, correcting
  several critical bugs, including race conditions and lock order issues:

  Replace the single rwlock, ifnet_lock, with two locks, an rwlock and an
  sxlock.  Either can be held to stablize the lists and indexes, but both
  are required to write.  This allows the list to be held stable in both
  network interrupt contexts and sleepable user threads across sleeping
  memory allocations or device driver interactions.  As before, writes to
  the interface list must occur from sleepable contexts.

  Reviewed by:  bz, julian

Approved by:	re (kib)

Revision 1.51: download - view: text, markup, annotated - select for diffs
Sun Aug 23 20:40:19 2009 UTC (2 years, 5 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +2 -2 lines
SVN rev 196481 on 2009-08-23 20:40:19Z by rwatson

Rework global locks for interface list and index management, correcting
several critical bugs, including race conditions and lock order issues:

Replace the single rwlock, ifnet_lock, with two locks, an rwlock and an
sxlock.  Either can be held to stablize the lists and indexes, but both
are required to write.  This allows the list to be held stable in both
network interrupt contexts and sleepable user threads across sleeping
memory allocations or device driver interactions.  As before, writes to
the interface list must occur from sleepable contexts.

Reviewed by:	bz, julian
MFC after:	3 days

Revision 1.50.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat Aug 1 19:26:27 2009 UTC (2 years, 6 months ago) by rwatson
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +0 -1 lines
SVN rev 196019 on 2009-08-01 19:26:27Z by rwatson

Merge the remainder of kern_vimage.c and vimage.h into vnet.c and
vnet.h, we now use jails (rather than vimages) as the abstraction
for virtualization management, and what remained was specific to
virtual network stacks.  Minor cleanups are done in the process,
and comments updated to reflect these changes.

Reviewed by:	bz
Approved by:	re (vimage blanket)

Revision 1.49: download - view: text, markup, annotated - select for diffs
Tue Jul 14 22:48:30 2009 UTC (2 years, 6 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +0 -1 lines
SVN rev 195699 on 2009-07-14 22:48:30Z by rwatson

Build on Jeff Roberson's linker-set based dynamic per-CPU allocator
(DPCPU), as suggested by Peter Wemm, and implement a new per-virtual
network stack memory allocator.  Modify vnet to use the allocator
instead of monolithic global container structures (vinet, ...).  This
change solves many binary compatibility problems associated with
VIMAGE, and restores ELF symbols for virtualized global variables.

Each virtualized global variable exists as a "reference copy", and also
once per virtual network stack.  Virtualized global variables are
tagged at compile-time, placing the in a special linker set, which is
loaded into a contiguous region of kernel memory.  Virtualized global
variables in the base kernel are linked as normal, but those in modules
are copied and relocated to a reserved portion of the kernel's vnet
region with the help of a the kernel linker.

Virtualized global variables exist in per-vnet memory set up when the
network stack instance is created, and are initialized statically from
the reference copy.  Run-time access occurs via an accessor macro, which
converts from the current vnet and requested symbol to a per-vnet
address.  When "options VIMAGE" is not compiled into the kernel, normal
global ELF symbols will be used instead and indirection is avoided.

This change restores static initialization for network stack global
variables, restores support for non-global symbols and types, eliminates
the need for many subsystem constructors, eliminates large per-subsystem
structures that caused many binary compatibility issues both for
monitoring applications (netstat) and kernel modules, removes the
per-function INIT_VNET_*() macros throughout the stack, eliminates the
need for vnet_symmap ksym(2) munging, and eliminates duplicate
definitions of virtualized globals under VIMAGE_GLOBALS.

Bump __FreeBSD_version and update UPDATING.

Portions submitted by:  bz
Reviewed by:            bz, zec
Discussed with:         gnn, jamie, jeff, jhb, julian, sam
Suggested by:           peter
Approved by:            re (kensmith)

Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Jun 23 17:03:45 2009 UTC (2 years, 7 months ago) by bz
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +0 -1 lines
SVN rev 194739 on 2009-06-23 17:03:45Z by bz

After cleaning up rt_tables from vnet.h and cleaning up opt_route.h
a lot of files no longer need route.h either. Garbage collect them.
While here remove now unneeded vnet.h #includes as well.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun Jun 21 08:49:06 2009 UTC (2 years, 7 months ago) by rdivacky
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +1 -1 lines
SVN rev 194577 on 2009-06-21 08:49:06Z by rdivacky

In non-debugging mode make this define (void)0 instead of nothing. This
helps to catch bugs like the below with clang.

	if (cond);		<--- note the trailing ;
	   something();

Approved by:	ed (mentor)
Discussed on:	current@

Revision 1.46: download - view: text, markup, annotated - select for diffs
Mon Jun 8 19:57:35 2009 UTC (2 years, 8 months ago) by bz
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +0 -2 lines
SVN rev 193744 on 2009-06-08 19:57:35Z by bz

After r193232 rt_tables in vnet.h are no longer indirectly dependent on
the ROUTETABLES kernel option thus there is no need to include opt_route.h
anymore in all consumers of vnet.h and no longer depend on it for module
builds.

Remove the hidden include in flowtable.h as well and leave the two
explicit #includes in ip_input.c and ip_output.c.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Mon Apr 27 22:46:26 2009 UTC (2 years, 9 months ago) by kmacy
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -14 lines
SVN rev 191608 on 2009-04-27 22:46:26Z by kmacy

replace IFQ_ENQUEUE + if_start with if_transmit

Revision 1.39.2.1.4.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.39.2.1: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.2.1: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)

Revision 1.44: download - view: text, markup, annotated - select for diffs
Fri Feb 27 14:12:05 2009 UTC (2 years, 11 months ago) by bz
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +3 -0 lines
SVN rev 189106 on 2009-02-27 14:12:05Z by bz

For all files including net/vnet.h directly include opt_route.h and
net/route.h.

Remove the hidden include of opt_route.h and net/route.h from net/vnet.h.

We need to make sure that both opt_route.h and net/route.h are included
before net/vnet.h because of the way MRT figures out the number of FIBs
from the kernel option. If we do not, we end up with the default number
of 1 when including net/vnet.h and array sizes are wrong.

This does not change the list of files which depend on opt_route.h
but we can identify them now more easily.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Tue Dec 2 21:37:28 2008 UTC (3 years, 2 months ago) by bz
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +1 -0 lines
SVN rev 185571 on 2008-12-02 21:37:28Z by bz

Rather than using hidden includes (with cicular dependencies),
directly include only the header files needed. This reduces the
unneeded spamming of various headers into lots of files.

For now, this leaves us with very few modules including vnet.h
and thus needing to depend on opt_route.h.

Reviewed by:	brooks, gnn, des, zec, imp
Sponsored by:	The FreeBSD Foundation

Revision 1.39.2.1.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.39.2.1: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39.2.1: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)

Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu Oct 2 15:37:58 2008 UTC (3 years, 4 months ago) by zec
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +1 -0 lines
SVN rev 183550 on 2008-10-02 15:37:58Z by zec

Step 1.5 of importing the network stack virtualization infrastructure
from the vimage project, as per plan established at devsummit 08/08:
http://wiki.freebsd.org/Image/Notes200808DevSummit

Introduce INIT_VNET_*() initializer macros, VNET_FOREACH() iterator
macros, and CURVNET_SET() context setting macros, all currently
resolving to NOPs.

Prepare for virtualization of selected SYSCTL objects by introducing a
family of SYSCTL_V_*() macros, currently resolving to their global
counterparts, i.e. SYSCTL_V_INT() == SYSCTL_INT().

Move selected #defines from sys/sys/vimage.h to newly introduced header
files specific to virtualized subsystems (sys/net/vnet.h,
sys/netinet/vinet.h etc.).

All the changes are verified to have zero functional impact at this
point in time by doing MD5 comparision between pre- and post-change
object files(*).

(*) netipsec/keysock.c did not validate depending on compile time options.

Implemented by:	julian, bz, brooks, zec
Reviewed by:	julian, bz, brooks, kris, rwatson, ...
Approved by:	julian (mentor)
Obtained from:	//depot/projects/vimage-commit2/...
X-MFC after:	never
Sponsored by:	NLnet Foundation, The FreeBSD Foundation

Revision 1.3.2.14.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.3.2.14: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.2.14: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sun Aug 17 23:27:27 2008 UTC (3 years, 5 months ago) by bz
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -1 lines
SVN rev 181803 on 2008-08-17 23:27:27Z by bz

Commit step 1 of the vimage project, (network stack)
virtualization work done by Marko Zec (zec@).

This is the first in a series of commits over the course
of the next few weeks.

Mark all uses of global variables to be virtualized
with a V_ prefix.
Use macros to map them back to their global names for
now, so this is a NOP change only.

We hope to have caught at least 85-90% of what is needed
so we do not invalidate a lot of outstanding patches again.

Obtained from:	//depot/projects/vimage-commit2/...
Reviewed by:	brooks, des, ed, mav, julian,
		jamie, kris, rwatson, zec, ...
		(various people I forgot, different versions)
		md5 (with a bit of help)
Sponsored by:	NLnet Foundation, The FreeBSD Foundation
X-MFC after:	never
V_Commit_Message_Reviewed_By:	more people than the patch

Revision 1.3.2.14: download - view: text, markup, annotated - select for diffs
Mon Jun 2 02:30:02 2008 UTC (3 years, 8 months ago) by thompsa
Branches: RELENG_6
CVS tags: RELENG_6_4_BP
Branch point for: RELENG_6_4
Diff to: previous 1.3.2.13: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.2.13: +7 -7 lines
SVN rev 179484 on 2008-06-02 02:30:02Z by thompsa

MFC r177993

 Fix spelling, retaining old define.

Revision 1.39.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 8 06:55:09 2008 UTC (3 years, 10 months ago) by thompsa
Branches: RELENG_7
CVS tags: RELENG_7_4_BP, RELENG_7_3_BP, RELENG_7_2_BP, RELENG_7_1_BP
Branch point for: RELENG_7_4, RELENG_7_3, RELENG_7_2, RELENG_7_1
Diff to: previous 1.39: preferred, colored; next MAIN 1.40: preferred, colored
Changes since revision 1.39: +7 -7 lines
MFC bridgestp.c r1.40, bridgestp.h r1.15

 Fix spelling, retaining old define.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sun Dec 9 20:47:12 2007 UTC (4 years, 2 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +7 -7 lines
Fix spelling.

Obtained from:	OpenBSD

Revision 1.3.2.13: download - view: text, markup, annotated - select for diffs
Fri Aug 24 10:34:30 2007 UTC (4 years, 5 months ago) by thompsa
Branches: RELENG_6
CVS tags: RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3
Diff to: previous 1.3.2.12: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.12: +41 -8 lines
MFC r1.38,1.39

 - Ensure the path cost does not exceed 65535 in legacy STP mode.
 - If the path cost is calculated when the link is down, set a pending flag so
   it is calculated again when it comes back up.
 - To not use 00:00:00:00:00:00 as the bridge id, all interfaces are scanned and
   the lowest number wins. All zeros is too low.
 - If the STP state machine is stopped then clear the bridge-id and root-id.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Sat Aug 18 12:06:13 2007 UTC (4 years, 5 months ago) by thompsa
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Branch point for: RELENG_7
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +13 -8 lines
If the STP state machine is stopped then clear the bridge-id and root-id.

Approved by:	re (kensmith)

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sat Aug 4 21:09:04 2007 UTC (4 years, 6 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +30 -2 lines
- Ensure the path cost does not exceed 65535 in legacy STP mode.
- If the path cost is calculated when the link is down, set a pending flag so
  it is calculated again when it comes back up.
- To not use 00:00:00:00:00:00 as the bridge id, all interfaces are scanned and
  the lowest number wins. All zeros is too low.

Approved by:	re (rwatson)

Revision 1.3.2.12: download - view: text, markup, annotated - select for diffs
Fri Jun 29 00:35:37 2007 UTC (4 years, 7 months ago) by thompsa
Branches: RELENG_6
Diff to: previous 1.3.2.11: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.11: +2 -2 lines
MFC r1.37
  Check the correct port to see if synced is true.

PR:             misc/113958
Submitted by:   Aaron Needles

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Jun 22 23:28:33 2007 UTC (4 years, 7 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +2 -2 lines
Check the correct port to see if synced is true.

PR:		misc/113958
Submitted by:	Aaron Needles
Approved by:	re (bmah)
MFC after:	1 week

Revision 1.3.2.11: download - view: text, markup, annotated - select for diffs
Thu Apr 26 02:08:14 2007 UTC (4 years, 9 months ago) by thompsa
Branches: RELENG_6
Diff to: previous 1.3.2.10: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.10: +4 -4 lines
MFC bridgestp.c r1.35-36, bridgestp.h r1.13, if_bridge.c r1.94-95
 - Change the passing of callbacks to a struct in case this needs to be
   extended in the future.
 - Properly move the setting of bstp_linkstate_p to the bridgestp module.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Wed Mar 14 20:55:51 2007 UTC (4 years, 10 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +1 -0 lines
Properly move the setting of bstp_linkstate_p to the bridgestp module.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Mar 9 19:34:55 2007 UTC (4 years, 11 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +3 -4 lines
Change the passing of callbacks to a struct in case this needs to be extended in the future.

Revision 1.3.2.10: download - view: text, markup, annotated - select for diffs
Sun Jan 21 00:18:34 2007 UTC (5 years ago) by thompsa
Branches: RELENG_6
Diff to: previous 1.3.2.9: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.9: +1846 -826 lines
MFC Rapid Spanning Tree support.

This fully syncs bridgestp* and if_bridge* to HEAD with the exception of the
default spanning tree protocol being v1 and not rstp.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Thu Jan 18 07:13:01 2007 UTC (5 years ago) by thompsa
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +1 -1 lines
Set topology change propagation on all ports _except_ the caller.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Mon Dec 11 23:46:40 2006 UTC (5 years, 1 month ago) by thompsa
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +10 -10 lines
These days P2P means peer-2-peer (also well known from serveral filesharing
protocols) while PointToPoint has been PtP links. Change the variables
accordingly while the code is still fresh and undocumented.

Requested by:	bz

Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Dec 4 14:45:02 2006 UTC (5 years, 2 months ago) by syrinx
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +9 -2 lines
Add two new flags to if_bridge(4) indicating whether the edge flag
of the bridge port and path cost have been administratively set or
calculated automatically by RSTP.

Make sure to transition from non-edge to edge when the port goes down
and the edge flag was manually set before.
This is needed to comply with the condition
	((!portEnabled && AdminEdge) || ....)
in the Bridge Detection State Machine (IEE802.1D-2004, p. 171).

Reviewed by:	thompsa
Approved by:	bz (mentor)

Revision 1.31: download - view: text, markup, annotated - select for diffs
Mon Nov 27 00:35:40 2006 UTC (5 years, 2 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +33 -3 lines
Sync with the OpenBSD port of RSTP
 - use flags rather than sperate ioctls for edge, p2p
 - implement p2p and autop2p flags
 - define large pathcost constant as ULL
 - show bridgeid and rootid in ifconfig

Obtained from:	Reyk Floeter <reyk@openbsd.org>

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Nov 26 20:33:29 2006 UTC (5 years, 2 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +1 -0 lines
Initialize the port info, this shouldnt have been removed in r1.28

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sun Nov 26 19:49:34 2006 UTC (5 years, 2 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +0 -1 lines
Remove redundant setting of port state.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Nov 26 18:43:48 2006 UTC (5 years, 2 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +24 -17 lines
use two stage creation of stp ports, this means that the stp variables can be
set before the port is marked STP and they will no longer be overwrittten

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Nov 19 23:08:35 2006 UTC (5 years, 2 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +3 -11 lines
Do not call bstp_stop() internally as it clears the running flag which causes
the timer to never be restarted.

Reported by:	bz

Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Nov 9 22:50:49 2006 UTC (5 years, 3 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +43 -20 lines
MFp4
 - Each stp port is added sequentially so it was possible for our bridgeid to
   change every time because the new port has a lower MAC address.  Instead
   just find the lowest MAC address from all Ethernet adapters in the machine
   as the value only needs to be unique, this stops a lot of churn on the
   protocol.
 - Update the states after enabling or disabling a port.
 - Keep tabs if we have been stopped or started by our parent bridge.
 - The callout only needs to be drained before destroying the mutex, move it to
   bstp_detach.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Fri Nov 3 03:34:04 2006 UTC (5 years, 3 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +1 -1 lines
Defer sending the bpdu from bstp_update_info as all code paths will test this
flag anyway.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Thu Nov 2 08:44:19 2006 UTC (5 years, 3 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +7 -3 lines
Do not test all the conditions if the port is already forwarding. Also print a
debug message if the port is agreed as it is an important condition of the
protocol.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Thu Nov 2 08:04:13 2006 UTC (5 years, 3 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +13 -15 lines
Fix a resource leak when the mbuf pointer changes.

CID:		1564, 1565
Found by:	Coverity Prevent (tm)

Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Nov 2 00:39:36 2006 UTC (5 years, 3 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +8 -7 lines
If the port is agreed or edge then allow it go go straight to forwarding rather
than waiting another tick (1s) for the states to be checked again.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed Nov 1 09:07:47 2006 UTC (5 years, 3 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +1716 -858 lines
Bring in support for the Rapid Spanning Tree Protocol (802.1w).

RSTP provides faster spanning tree convergence, the protocol will exchange
information with neighboring switches to quickly transition to forwarding
without creating loops. The code will default to RSTP mode but will downgrade
any port connected to a legacy STP network so is fully backward compatible.

Reviewed by:	syrinx
Tested by:	syrinx

Revision 1.3.2.9: download - view: text, markup, annotated - select for diffs
Sat Oct 21 19:10:39 2006 UTC (5 years, 3 months ago) by thompsa
Branches: RELENG_6
CVS tags: RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2
Diff to: previous 1.3.2.8: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.8: +10 -0 lines
MFC bridgestp.c r1.15, if_bridge.c r1.73, if_bridgevar.h r1.15
  Add some statistics that are needed to support RFC4188 as part of the SoC2006
  work on a bridge monitoring module for BSNMP.

Approved by:	re (hrs)

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Oct 1 03:48:32 2006 UTC (5 years, 4 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +0 -5 lines
Remove licence clauses 3 & 4

OKed by:	Jason L. Wright

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sat Aug 12 20:30:58 2006 UTC (5 years, 5 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +1 -0 lines
Add the module version to fix the loading with if_bridge.

Reported by:	keramida
Tested by:	keramida

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Aug 2 02:51:42 2006 UTC (5 years, 6 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -1 lines
Fix style in the last commit, the variable declaration goes at the top of the
function.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Aug 2 02:47:27 2006 UTC (5 years, 6 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +34 -3 lines
Add a callback so we can notify the parent bridge that a port state change has
occured, we need to do this from a taskqueue to avoid a LOR with the if_bridge
mutex.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Wed Aug 2 01:36:40 2006 UTC (5 years, 6 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -0 lines
Be sure to disable the port when removing it from STP.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Jul 31 20:24:46 2006 UTC (5 years, 6 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +10 -0 lines
Add some statistics that are needed to support RFC4188 as part of the SoC2006
work on a bridge monitoring module for BSNMP.

Submitted by:	shteryana (SoC 2006)

Revision 1.14: download - view: text, markup, annotated - select for diffs
Wed Jul 26 10:45:38 2006 UTC (5 years, 6 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +0 -0 lines
Forced commit due to missing log on the last revision.

Split the spanning tree state into its own structures and provide a simple API
to perform functions such as adding and deleting ports. This is just a
mechanical change and the STP operation remains the same. The bridgestp code
now has no knowledge of if_bridge.

This makes the code easier to read and can now also support other bridges such
as ng_bridge.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Wed Jul 26 10:43:02 2006 UTC (5 years, 6 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +632 -562 lines
/tmp/cvsuusTrc

Revision 1.3.2.8: download - view: text, markup, annotated - select for diffs
Thu Mar 9 08:21:19 2006 UTC (5 years, 11 months ago) by thompsa
Branches: RELENG_6
CVS tags: RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Diff to: previous 1.3.2.7: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.7: +10 -13 lines
MFC bridgestp.c r1.12, if_bridgevar.h r1.11

 Add a timer to periodically check the interface state.

Approved by:	re (scottl)

Revision 1.12: download - view: text, markup, annotated - select for diffs
Mon Mar 6 02:28:41 2006 UTC (5 years, 11 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +10 -13 lines
If we miss the LINK_UP event from the network interface then the bridge port
will remain in the disabled state until another link event happens in the
future (if at all). Add a timer to periodically check the interface state and
recover.

Reported by:	Nik Lam <freebsdnik j2d.lam.net.au>
MFC after:	3 days

Revision 1.6.2.4: download - view: text, markup, annotated - select for diffs
Fri Mar 3 21:37:01 2006 UTC (5 years, 11 months ago) by thompsa
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5
Diff to: previous 1.6.2.3: preferred, colored; next MAIN 1.7: preferred, colored
Changes since revision 1.6.2.3: +30 -15 lines
MFC r1.11: Fix up the Bridge Identifier field in the BPDU packet.

Approved by:    re (scottl)

Revision 1.3.2.7: download - view: text, markup, annotated - select for diffs
Fri Mar 3 21:36:26 2006 UTC (5 years, 11 months ago) by thompsa
Branches: RELENG_6
Diff to: previous 1.3.2.6: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.6: +30 -15 lines
MFC r1.11: Fix up the Bridge Identifier field in the BPDU packet.

Approved by:	re (scottl)

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Feb 28 00:13:24 2006 UTC (5 years, 11 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +30 -15 lines
Fix up the Bridge Identifier field in the BPDU packet.

 - use the cu_bridge_id rather than the cu_rootid for the bridge address [1]
 - the memcmp return value is not signed so the wrong interface may have been
   selected
 - fix up the calculation of sc_bridge_id

PR:		kern/93909 [1]
MFC after:	3 days

Revision 1.6.2.3: download - view: text, markup, annotated - select for diffs
Thu Jan 19 04:22:25 2006 UTC (6 years ago) by thompsa
Branches: RELENG_5
Diff to: previous 1.6.2.2: preferred, colored
Changes since revision 1.6.2.2: +1 -1 lines
MFC: sync code to HEAD (excluding etherip support)
 - whitespace
 - add net.link.bridge.pfil_onlyip
 - use time_uptime
 - clear IFCAP_TXCSUM while bridging

Revision 1.3.2.6: download - view: text, markup, annotated - select for diffs
Tue Jan 3 21:47:34 2006 UTC (6 years, 1 month ago) by thompsa
Branches: RELENG_6
Diff to: previous 1.3.2.5: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.5: +1 -1 lines
MFC: sync code to HEAD
 - whitespace
 - add net.link.bridge.pfil_onlyip
 - use time_uptime

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Dec 17 10:03:48 2005 UTC (6 years, 1 month ago) by thompsa
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +1 -1 lines
Minor whitespace cleanup.

Revision 1.6.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 16 10:20:16 2005 UTC (6 years, 2 months ago) by thompsa
Branches: RELENG_5
Diff to: previous 1.6.2.1: preferred, colored
Changes since revision 1.6.2.1: +111 -99 lines
MFC: Sync bridge code up with HEAD
 - plug mbuf and refcnt leak
 - make funtions static
 - cleanup on member removal
 - cleanup bridge hooks

Revision 1.3.2.5: download - view: text, markup, annotated - select for diffs
Wed Nov 16 10:17:15 2005 UTC (6 years, 2 months ago) by thompsa
Branches: RELENG_6
Diff to: previous 1.3.2.4: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.4: +112 -99 lines
MFC: Sync bridge code up with HEAD
 - plug mbuf and refcnt leak
 - make funtions static

Revision 1.3.2.3.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 23 02:37:28 2005 UTC (6 years, 3 months ago) by thompsa
Branches: RELENG_6_0
CVS tags: RELENG_6_0_0_RELEASE
Diff to: previous 1.3.2.3: preferred, colored; next MAIN 1.3.2.4: preferred, colored
Changes since revision 1.3.2.3: +0 -1 lines
MFC ng_ether support for if_bridge and cleanup of bridge hooks.

 bridgestp.c; r1.8
 if_bridge.c; r1.25, 1.27
 if_bridgevar.h; r1.5
 if_ethersubr.c; r1.201, 1.202, 1.206
 ng_ether.c; r1.52 - 1.54

Approved by:    re (scottl)

Revision 1.3.2.4: download - view: text, markup, annotated - select for diffs
Sun Oct 23 02:36:58 2005 UTC (6 years, 3 months ago) by thompsa
Branches: RELENG_6
Diff to: previous 1.3.2.3: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.3: +0 -1 lines
MFC ng_ether support for if_bridge and cleanup of bridge hooks.

 bridgestp.c; r1.8
 if_bridge.c; r1.25, 1.27
 if_bridgevar.h; r1.5
 if_ethersubr.c; r1.201, 1.202, 1.206
 ng_ether.c; r1.52 - 1.54

Approved by:	re (scottl)

Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Oct 14 10:38:12 2005 UTC (6 years, 3 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +111 -98 lines
Change most of the bridge and stp funtions to static. This has highlighted
that the following funtions are not used, wrap in '#ifdef noused' for the
moment.

 bstp_enable_change_detection
 bstp_disable_change_detection
 bstp_set_bridge_priority
 bstp_set_port_priority
 bstp_set_path_cost

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Oct 14 02:38:47 2005 UTC (6 years, 3 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +0 -1 lines
Further clean up the bridge hooks in if_ethersubr.c and ng_ether.c

- move the function pointer definitions to if_bridgevar.h
- move most of the logic to the new BRIDGE_INPUT and BRIDGE_OUTPUT macros
- remove unneeded functions from if_bridgevar.h and sort a little.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Tue Oct 11 02:58:32 2005 UTC (6 years, 4 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +1 -1 lines
Do not unconditionally set a spanning tree port to forwarding as the link may be
down when we attach. We wont get updated until a linkstate change happens.

Go via bstp_ifupdstatus() which checks the media status first.

Revision 1.6.2.1: download - view: text, markup, annotated - select for diffs
Mon Oct 3 21:40:42 2005 UTC (6 years, 4 months ago) by thompsa
Branches: RELENG_5
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +8 -28 lines
MFC if_bridge code; bridgestp.c r1.6, if_bridge.c r1.23, if_bridgevar.h r1.4

 Add if_bridge, which provides more advanced Ethernet bridging and 802.1d
 spanning tree support.

 Based on Jason Wright's bridge driver from OpenBSD, and modified by Jason R.
 Thorpe in NetBSD.

Conversion to old-ifconfig taken from green@

Approved by:	mlaier (mentor)

Revision 1.3.2.3: download - view: text, markup, annotated - select for diffs
Tue Aug 30 20:26:53 2005 UTC (6 years, 5 months ago) by thompsa
Branches: RELENG_6
CVS tags: RELENG_6_0_BP
Branch point for: RELENG_6_0
Diff to: previous 1.3.2.2: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.2: +1 -3 lines
MFC: bridgestp.c, r1.6; if_bridge.c, r1.18

> Mark the callouts as MPSAFE as if_bridge has been giant-free since day 1.
>
> Use the SMP friendly callout_init_mtx() while we are here.
>

Approved by:	re (kensmith), mlaier (mentor)

Revision 1.3.2.2: download - view: text, markup, annotated - select for diffs
Thu Aug 25 05:01:19 2005 UTC (6 years, 5 months ago) by rwatson
Branches: RELENG_6
Diff to: previous 1.3.2.1: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.2.1: +3 -3 lines
Merge linux_ioctl.c:1.128 svr4_sockio.c:1.17 altq_cbq.c:1.3 if_oltr.c:1.38
if_pflog.c:1.14 if_pfsync.c:1.21 if_an.c:1.70 if_ar.c:1.72 if_arl.c:1.11
amrr.c:1.10 onoe.c:1.10 if_ath.c:1.101 awi.c:1.41 if_bfe.c:1.27
if_bge.c:1.93 if_cm_isa.c:1.7 smc90cx6.c:1.16 if_cnw.c:1.20 if_cp.c:1.25
if_cs.c:1.42 if_ct.c:1.26 if_cx.c:1.46 if_ed.c:1.256 if_em.c:1.68
if_en_pci.c:1.37 midway.c:1.66 if_ep.c:1.143 if_ex.c:1.58 if_fatm.c:1.20
if_fe.c:1.93 if_fwe.c:1.38 if_fwip.c:1.8 if_fxp.c:1.244 if_gem.c:1.33
if_hatm.c:1.25 if_hatm_intr.c:1.20 if_hatm_ioctl.c:1.13 if_hatm_rx.c:1.10
if_hatm_tx.c:1.14 if_hme.c:1.39 if_ie.c:1.104 if_ndis.c:1.101
if_ic.c:1.24 if_ipw.c:1.10 if_iwi.c:1.10 if_ixgb.c:1.13 if_lge.c:1.41
if_lnc.c:1.113 if_my.c:1.31 if_nge.c:1.77 if_nve.c:1.10 if_owi.c:1.12
if_patm.c:1.9 if_patm_intr.c:1.6 if_patm_ioctl.c:1.10 if_patm_tx.c:1.10
pdq_ifsubr.c:1.28 if_plip.c:1.38 if_ral.c:1.12 if_ral_pci.c:1.2
if_ray.c:1.81 if_rayvar.h:1.22 if_re.c:1.49 if_sbni.c:1.21 if_sbsh.c:1.14
if_sn.c:1.48 dp83932.c:1.21 if_snc_pccard.c:1.9 if_sr.c:1.70 if_tx.c:1.91
if_txp.c:1.33 if_aue.c:1.92 if_axe.c:1.32 if_cdce.c:1.8 if_cue.c:1.59
if_kue.c:1.66 if_rue.c:1.23 if_udav.c:1.16 if_ural.c:1.12 if_vge.c:1.16
if_vx.c:1.58 if_wi.c:1.185 if_wi_pci.c:1.26 if_wl.c:1.68 if_xe.c:1.60
if_xe_pccard.c:1.30 if_el.c:1.68 i4b_ipr.c:1.35 i4b_isppp.c:1.31
kern_poll.c:1.20 bridge.c:1.94 bridgestp.c:1.4 if_arcsubr.c:1.27
if_atm.h:1.24 if_atmsubr.c:1.40 if_bridge.c:1.16 if_ef.c:1.35
if_ethersubr.c:1.196 if_faith.c:1.37 if_fddisubr.c:1.100 if_fwsubr.c:1.14
if_gif.c:1.54 if_gre.c:1.34 if_iso88025subr.c:1.70 if_loop.c:1.107
if_ppp.c:1.106 if_spppsubr.c:1.121 if_tap.c:1.57 if_tun.c:1.154
if_vlan.c:1.80 ppp_tty.c:1.67 ieee80211_ioctl.c:1.32 atm_if.c:1.31
ng_eiface.c:1.33 ng_ether.c:1.50 ng_fec.c:1.19 ng_iface.c:1.44
ng_sppp.c:1.9 ip_carp.c:1.30 ip_fastfwd.c:1.30 in6.c:1.53 nd6_nbr.c:1.31
natm.c:1.40 if_dc.c:1.162 if_de.c:1.168 if_pcn.c:1.72 if_rl.c:1.154
if_sf.c:1.84 if_sis.c:1.135 if_sk.c:1.108 if_ste.c:1.86 if_ti.c:1.109
if_tl.c:1.101 if_vr.c:1.106 if_wb.c:1.81 if_xl.c:1.194 from HEAD to
RELENG_6:

  Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
  IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
  ifnet.if_drv_flags.  Device drivers are now responsible for
  synchronizing access to these flags, as they are in if_drv_flags.  This
  helps prevent races between the network stack and device driver in
  maintaining the interface flags field.

  Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
  some less so.

  Reviewed by:    pjd, bz

Approved by:	re (scottl)

Revision 1.3.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 19 02:43:07 2005 UTC (6 years, 5 months ago) by thompsa
Branches: RELENG_6
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -0 lines
MFC: if_bridge.c, r1.17; bridgestp.c, r1.5

>   Ensure that we are holding the lock when initialising the bridge interface. We
>   could initialise while unlocked if the bridge is not up when setting the inet
>   address, ether_ioctl() would call bridge_init.
>
>   Change it so bridge_init is always called unlocked and then locks before
>   calling bstp_initialization().

Approved by:	re (kensmith), mlaier (mentor)

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Aug 18 20:17:00 2005 UTC (6 years, 5 months ago) by thompsa
Branches: MAIN
Branch point for: RELENG_5
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +1 -3 lines
Mark the callouts as MPSAFE as if_bridge has been giant-free since day 1.

Use the SMP friendly callout_init_mtx() while we are here.

Approved by:	mlaier (mentor)
MFC after:	3 days

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Aug 15 02:54:29 2005 UTC (6 years, 5 months ago) by thompsa
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -0 lines
Ensure that we are holding the lock when initialising the bridge interface. We
could initialise while unlocked if the bridge is not up when setting the inet
address, ether_ioctl() would call bridge_init.

Change it so bridge_init is always called unlocked and then locks before
calling bstp_initialization().

Reported by:    Michal Mertl
Approved by:    mlaier (mentor)
MFC after:      3 days

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Aug 9 10:19:58 2005 UTC (6 years, 6 months ago) by rwatson
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +3 -3 lines
Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to
ifnet.if_drv_flags.  Device drivers are now responsible for
synchronizing access to these flags, as they are in if_drv_flags.  This
helps prevent races between the network stack and device driver in
maintaining the interface flags field.

Many __FreeBSD__ and __FreeBSD_version checks maintained and continued;
some less so.

Reviewed by:	pjd, bz
MFC after:	7 days

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Jul 6 01:24:45 2005 UTC (6 years, 7 months ago) by thompsa
Branches: MAIN
CVS tags: RELENG_6_BP
Branch point for: RELENG_6
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +2 -2 lines
- Previously when broadcasting to N number of interfaces we would run pfil
  hooks for each outgoing interface but also run pfil hooks _N times_ on the
  bridge interface. This is changed so pfil hooks are run once for the bridge
  interface (bridge0) and then only on the outgoing interfaces in the broadcast
  loop.

- Simplify bridge_enqueue() by moving bridge_pfil() to the callers.

- Check (inet6_pfil_hook.ph_busy_count >= 0), it may be possible to have a
  packet filter hooked for only ipv6 but we were only checking if ipv4 hooks
  were busy.

- Minor optimisation for null mbuf check after bridge_pfil(), move it into the
  if-block as it couldnt possibly be null outside.

Prodded by:	mlaier
Approved by:	re (scottl), mlaier (mentor)

Revision 1.2: download - view: text, markup, annotated - select for diffs
Fri Jun 10 16:49:18 2005 UTC (6 years, 8 months ago) by brooks
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +1 -3 lines
Stop embedding struct ifnet at the top of driver softcs. Instead the
struct ifnet or the layer 2 common structure it was embedded in have
been replaced with a struct ifnet pointer to be filled by a call to the
new function, if_alloc(). The layer 2 common structure is also allocated
via if_alloc() based on the interface type. It is hung off the new
struct ifnet member, if_l2com.

This change removes the size of these structures from the kernel ABI and
will allow us to better manage them as interfaces come and go.

Other changes of note:
 - Struct arpcom is no longer referenced in normal interface code.
   Instead the Ethernet address is accessed via the IFP2ENADDR() macro.
   To enforce this ac_enaddr has been renamed to _ac_enaddr.
 - The second argument to ether_ifattach is now always the mac address
   from driver private storage rather than sometimes being ac_enaddr.

Reviewed by:	sobomax, sam

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Jun 5 02:59:26 2005 UTC (6 years, 8 months ago) by thompsa
Branches: MAIN
Add if_bridge, which provides more advanced Ethernet bridging and 802.1d
spanning tree support.

Based on Jason Wright's bridge driver from OpenBSD, and modified by Jason R.
Thorpe in NetBSD.

Reviewed by:	mlaier, bms, green
Silence from:	-net
Approved by:	mlaier (mentor)
Obtained from:	NetBSD

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