The NetBSD Project

CVS log for src/sys/netinet/ip_carp.c

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.117.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 21 12:26:49 2024 UTC (2 months, 2 weeks ago) by martin
Branches: netbsd-10
Diff to: previous 1.117: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117: +20 -6 lines
Pull up following revision(s) (requested by rin in ticket #902):

	sbin/ifconfig/carp.c: revision 1.15
	sbin/ifconfig/ifconfig.8: revision 1.125
	tests/net/carp/t_basic.sh: revision 1.9
	sys/netinet/ip_carp.c: revision 1.118
	sys/netinet/ip_carp.c: revision 1.119

Fix parser for carp state.

The state values are uppercase words INIT, BACKUP and MASTER.

Use backing device to send advertisements. Otherwise the packets originate
from the virtual MAC address, which confuses switches.

Select virtual address as sender if backing interface is anonymous.

Use correct scope for IPv6.

Don't expect the net/carp/t_basic/carp_handover_ipv6_halt_nocarpdevip
and carp_handover_ipv6_ifdown_nocarpdevip test cases to fail.  At
least on the TNF i386 and amd64 testbeds, they pass more often than
not since the commit of src/sys/netinet/ip_carp.c 1.119 by mlelstv on
2023.04.07.06.44.08.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Tue Aug 1 07:04:16 2023 UTC (16 months, 1 week ago) by mrg
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, HEAD
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +6 -6 lines
fix simple mis-matched function prototype and definitions.

most of these are like, eg

   void foo(int[2]);

with either of these

   void foo(int*) { ... }
   void foo(int[]) { ... }

in some cases (such as stat or utimes* calls found in our header files),
we now match standard definition from opengroup.

found by GCC 12.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Fri Apr 7 06:44:08 2023 UTC (20 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +12 -4 lines
Select virtual address as sender if backing interface is anonymous.
Use correct scope for IPv6.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Sun Mar 26 10:32:38 2023 UTC (20 months, 1 week ago) by mlelstv
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +10 -4 lines
Use backing device to send advertisements. Otherwise the packets originate
from the virtual MAC address, which confuses switches.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Fri Sep 2 23:48:11 2022 UTC (2 years, 3 months ago) by thorpej
Branches: MAIN
CVS tags: 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: netbsd-10
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +2 -3 lines
Remove unnecessary inclusion of <net/netisr.h>.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Thu Sep 30 03:43:25 2021 UTC (3 years, 2 months ago) by yamaguchi
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +14 -8 lines
carp: Register carp_carpdev_state to link-state change hook

Revision 1.114.6.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.114: preferred, colored; next MAIN 1.115: preferred, colored
Changes since revision 1.114: +3 -12 lines
Sync w/ HEAD.

Revision 1.115: 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
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.114: preferred, colored
Changes since revision 1.114: +3 -12 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.114: download - view: text, markup, annotated - select for diffs
Wed Oct 14 13:43:56 2020 UTC (4 years, 1 month ago) by roy
Branches: MAIN
CVS tags: thorpej-futex-base, thorpej-futex, 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.113: preferred, colored
Changes since revision 1.113: +13 -4 lines
carp: Don't set a link level address if vhid == -1

Link level address for carp is dervied from vhid.
Until vhid is set, carp is useless, so don't give it a link level address
until a vhid is set.

This fixes recent test case breakage where carp was fixed to actually
print the ethernet address set by default. Note that neither carp nor
the test case itself was actually broken as the error is the common
ATF net code assuming that a cloned interface's link level address is
unique upon creation.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Mon Oct 12 15:18:48 2020 UTC (4 years, 1 month ago) by roy
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +5 -4 lines
carp: link state is DOWN until it becomes a MASTER

This is consitent with other BSD's handling of CARP and means
we don't have to carry a custom flag for it.

Revision 1.112: download - view: text, markup, annotated - select for diffs
Mon Oct 12 11:07:27 2020 UTC (4 years, 1 month ago) by roy
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +3 -3 lines
carp: Set ethernet address just before interface registation

Otherwise ifconfig reports SIOCGLIFADDR errors.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Fri Oct 9 08:10:41 2020 UTC (4 years, 1 month ago) by roy
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +2 -35 lines
carp: Remove media, software should use link status.

carp literally has no media just like ppp, vlan, etc.

Revision 1.99.2.3: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:16 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.99.2.2: preferred, colored; branchpoint 1.99: preferred, colored; next MAIN 1.100: preferred, colored
Changes since revision 1.99.2.2: +1 -3 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.99.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:58 2020 UTC (4 years, 8 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.99.2.1: preferred, colored; branchpoint 1.99: preferred, colored
Changes since revision 1.99.2.1: +61 -34 lines
Merge changes from current as of 20200406

Revision 1.104.2.3: download - view: text, markup, annotated - select for diffs
Sat Feb 29 20:21:07 2020 UTC (4 years, 9 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.104.2.2: preferred, colored; branchpoint 1.104: preferred, colored; next MAIN 1.105: preferred, colored
Changes since revision 1.104.2.2: +16 -25 lines
Sync with head.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Thu Feb 6 23:30:20 2020 UTC (4 years, 10 months ago) by thorpej
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, ad-namecache-base3
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +3 -9 lines
Perform link state change processing on a work queue, rather than in a
softint.

Revision 1.109: download - view: text, markup, annotated - select for diffs
Tue Feb 4 05:46:32 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +3 -3 lines
Use ifmedia_fini().

Revision 1.108: download - view: text, markup, annotated - select for diffs
Wed Jan 29 04:37:24 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +14 -17 lines
Adopt <net/if_stats.h>.

Revision 1.104.2.2: download - view: text, markup, annotated - select for diffs
Sat Jan 25 22:38:52 2020 UTC (4 years, 10 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.104.2.1: preferred, colored; branchpoint 1.104: preferred, colored
Changes since revision 1.104.2.1: +2 -9 lines
Sync with head.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Mon Jan 20 18:38:22 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
CVS tags: ad-namecache-base2
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +2 -6 lines
Remove FDDI support.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Sun Jan 19 20:00:37 2020 UTC (4 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +2 -5 lines
Remove Token Ring support.

Revision 1.104.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 17 21:47:36 2020 UTC (4 years, 10 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +48 -5 lines
Sync with head.

Revision 1.105: download - view: text, markup, annotated - select for diffs
Thu Jan 16 12:56:40 2020 UTC (4 years, 10 months ago) by kardel
Branches: MAIN
CVS tags: ad-namecache-base1
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +48 -5 lines
Provide SIOCGIFMEDIA ioctl to deliver link status.
Add link0 (IFF_LINK0) flag to map INIT state to LINK_STATE_DOWN
instead of LINK_STATE_UNKNOWN. This allows routing software to
suppress routes to the interface of the carp interface when in
init state (e. g. link down in the parent interface).

Revision 1.104: download - view: text, markup, annotated - select for diffs
Sun Nov 10 21:16:38 2019 UTC (5 years ago) by chs
Branches: MAIN
CVS tags: phil-wifi-20191119, ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +3 -5 lines
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.

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

Revision 1.103: download - view: text, markup, annotated - select for diffs
Sat Jun 1 19:13:41 2019 UTC (5 years, 6 months ago) by joerg
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +4 -2 lines
Define carp6_cksum only when it is used, that is under INET6

Revision 1.90.2.4: download - view: text, markup, annotated - select for diffs
Tue Mar 19 13:42:54 2019 UTC (5 years, 8 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.90.2.3: preferred, colored; branchpoint 1.90: preferred, colored; next MAIN 1.91: preferred, colored
Changes since revision 1.90.2.3: +4 -3 lines
Pull up following revision(s) (requested by ozaki-r in ticket #1218):

	sys/netinet/ip_carp.c: revision 1.102

carp: don't skip pserialize_read_enter and ifa_release

Revision 1.102: download - view: text, markup, annotated - select for diffs
Thu Mar 14 07:05:07 2019 UTC (5 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +4 -3 lines
carp: don't skip pserialize_read_enter and ifa_release

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

Revision 1.101: download - view: text, markup, annotated - select for diffs
Sat Dec 22 14:28:57 2018 UTC (5 years, 11 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +4 -4 lines
Replace M_ALIGN and MH_ALIGN by m_align.

Revision 1.94.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.94.2.4: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.2.4: +3 -3 lines
Ssync with HEAD

Revision 1.100: download - view: text, markup, annotated - select for diffs
Fri Sep 14 05:09:51 2018 UTC (6 years, 2 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +3 -3 lines
Use non-variadic function pointer in protosw::pr_input.

Revision 1.94.2.4: download - view: text, markup, annotated - select for diffs
Sat Jul 28 04:38:10 2018 UTC (6 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.94.2.3: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.2.3: +3 -3 lines
Sync with HEAD

Revision 1.99: download - view: text, markup, annotated - select for diffs
Tue Jun 26 06:48:03 2018 UTC (6 years, 5 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-0906, pgoyette-compat-0728
Branch point for: phil-wifi
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +3 -3 lines
 Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward
compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same
as FreeBSD.

 This change also fixes a bug that the direction is misunderstand on some
environment by passing the direction to bpf_mtap*() instead of checking
m->m_pkthdr.rcvif.

Revision 1.94.2.3: 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.94.2.2: preferred, colored; branchpoint 1.94: preferred, colored
Changes since revision 1.94.2.2: +11 -4 lines
Sync with HEAD

Revision 1.98: download - view: text, markup, annotated - select for diffs
Thu Jun 14 08:06:07 2018 UTC (6 years, 5 months ago) by yamaguchi
Branches: MAIN
CVS tags: pgoyette-compat-0625
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +9 -2 lines
Add the lock to refer the list included in ethercom for safety

The lock is already held while adding and deleting
ok ozaki-r@

Revision 1.97: download - view: text, markup, annotated - select for diffs
Thu Jun 14 07:54:57 2018 UTC (6 years, 5 months ago) by yamaguchi
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +4 -4 lines
Use ether_lookup_multi() instead of the macro

ok ozaki-r@

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

Revision 1.96: download - view: text, markup, annotated - select for diffs
Fri May 18 18:58:51 2018 UTC (6 years, 6 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-0521
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +3 -3 lines
IP6_EXTHDR_GET -> M_REGION_GET, no functional change.

Revision 1.94.2.1: download - view: text, markup, annotated - select for diffs
Thu Mar 22 01:44:51 2018 UTC (6 years, 8 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +6 -10 lines
Synch with HEAD, resolve conflicts

Revision 1.95: download - view: text, markup, annotated - select for diffs
Wed Mar 21 15:33:25 2018 UTC (6 years, 8 months ago) by maxv
Branches: MAIN
CVS tags: pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +6 -10 lines
Fix an untriggerable memory leak. carp_prepare_ad does not fail, so switch
it to void.

Revision 1.90.2.3: download - view: text, markup, annotated - select for diffs
Tue Jan 2 10:20:34 2018 UTC (6 years, 11 months ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Diff to: previous 1.90.2.2: preferred, colored; branchpoint 1.90: preferred, colored
Changes since revision 1.90.2.2: +8 -3 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.90.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 10:10:25 2017 UTC (6 years, 11 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.90.2.1: preferred, colored; branchpoint 1.90: preferred, colored
Changes since revision 1.90.2.1: +12 -3 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.94: download - view: text, markup, annotated - select for diffs
Wed Dec 6 09:54:47 2017 UTC (7 years ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-compat-base, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +8 -2 lines
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).

Revision 1.50.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:39:04 2017 UTC (7 years ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.50.2.1: preferred, colored; branchpoint 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50.2.1: +232 -113 lines
update from HEAD

Revision 1.90.2.1: download - view: text, markup, annotated - select for diffs
Thu Nov 30 15:57:37 2017 UTC (7 years ago) by martin
Branches: netbsd-8
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +49 -13 lines
Pull up following revision(s) (requested by ozaki-r in ticket #407):
	sys/compat/linux32/common/linux32_socket.c: revision 1.28
	sys/net/if.c: revision 1.400
	sys/netipsec/key.c: revision 1.243
	sys/compat/linux/common/linux_socket.c: revision 1.139
	sys/netinet/ip_carp.c: revision 1.93
	sys/netinet6/in6.c: revision 1.252
	sys/netinet6/in6.c: revision 1.253
	sys/netinet6/in6.c: revision 1.254
	sys/net/if_spppsubr.c: revision 1.173
	sys/net/if_spppsubr.c: revision 1.174
	sys/compat/common/uipc_syscalls_40.c: revision 1.14
Protect IFADDR_READER_FOREACH and obtained ifa with psz/psref
Fix usage of FOREACH macro
key_sad.lock is held there so SAVLIST_WRITER_FOREACH is enough.
Protect IFADDR_READER_FOREACH and obtained ifa with psz/psref
Protect IFADDR_READER_FOREACH and obtained ifa with psz/psref (more)
Fix and make consistent of usages of psz/psref in ifconf variants
Remove unnecessary goto because there is no cleanup code to share (NFC)
Tweak a condition; we don't need to care ifacount to be negative
Fix a race condition of in6_ifinit
in6_ifinit checks the number of IPv6 addresses on a given interface and
if it's zero (i.e., an IPv6 address being assigned to the interface
is the first one), call if_addr_init. However, the actual assignment of
the address (ifa_insert) is out of in6_ifinit. The check and the
assignment must be done atomically.
Fix it by holding in6_ifaddr_lock during in6_ifinit and ifa_insert.
And also add missing pserialize to IFADDR_READER_FOREACH.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Wed Nov 22 07:40:45 2017 UTC (7 years ago) by ozaki-r
Branches: MAIN
CVS tags: tls-maxphys-base-20171202
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +49 -13 lines
Protect IFADDR_READER_FOREACH and obtained ifa with psz/psref

Revision 1.92: 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.91: preferred, colored
Changes since revision 1.91: +2 -3 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.91: download - view: text, markup, annotated - select for diffs
Mon Oct 23 09:31:18 2017 UTC (7 years, 1 month ago) by msaitoh
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +12 -3 lines
 If if_initialize() failed in the attach function, free resources and return.

Revision 1.59.4.9: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:53:12 2017 UTC (7 years, 3 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.59.4.8: preferred, colored; branchpoint 1.59: preferred, colored; next MAIN 1.60: preferred, colored
Changes since revision 1.59.4.8: +29 -21 lines
Sync with HEAD

Revision 1.90: download - view: text, markup, annotated - select for diffs
Fri May 19 08:53:51 2017 UTC (7 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: netbsd-8
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +3 -3 lines
Allow CARP to call the link_state_change handler immediately

If the handler is delayed because of the indirection call via softint,
some operations are executed in reverse and may cause unexpected
behaviors. For example, due to the issue a GARP packet wasn't sent on
a transition from the BACKUP state to the MASTER state; this happened
because IN_IFF_DETACHED flag wasn't cleared on arpannounce, which
had been cleared in the link_state_change handler.

This fixes an issue reported by sborrill@ on tech-net:
  http://mail-index.netbsd.org/tech-net/2017/03/14/msg006283.html

Revision 1.87.2.1: download - view: text, markup, annotated - select for diffs
Fri May 19 00:22:58 2017 UTC (7 years, 6 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.87: preferred, colored; next MAIN 1.88: preferred, colored
Changes since revision 1.87: +9 -7 lines
Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)

Revision 1.89: download - view: text, markup, annotated - select for diffs
Fri May 12 17:53:54 2017 UTC (7 years, 6 months ago) by ryo
Branches: MAIN
CVS tags: prg-localcount2-base3
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +3 -3 lines
replace in_fmtaddr() by IN_PRINT(), and delete function in_fmtaddr()

Revision 1.59.2.5: download - view: text, markup, annotated - select for diffs
Fri May 12 10:48:11 2017 UTC (7 years, 6 months ago) by sborrill
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE
Diff to: previous 1.59.2.4: preferred, colored; branchpoint 1.59: preferred, colored; next MAIN 1.60: preferred, colored
Changes since revision 1.59.2.4: +8 -6 lines
Pull up the following revisions(s) (requested by roy in ticket #1420):
	sys/netinet/ip_carp.c:	revision 1.88

carp should call if_link_state_change instead of affecting
if_link_state directly.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Fri May 12 09:22:01 2017 UTC (7 years, 6 months ago) by roy
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +8 -6 lines
carp should call if_link_state_change instead of affecting
if_link_state directly.

Revision 1.74.2.6: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:29 2017 UTC (7 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.74.2.5: preferred, colored; branchpoint 1.74: preferred, colored; next MAIN 1.75: preferred, colored
Changes since revision 1.74.2.5: +7 -3 lines
Sync with HEAD

Revision 1.81.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.81: preferred, colored; next MAIN 1.82: preferred, colored
Changes since revision 1.81: +66 -34 lines
Sync with HEAD

Revision 1.87: download - view: text, markup, annotated - select for diffs
Wed Apr 19 03:23:06 2017 UTC (7 years, 7 months ago) by ozaki-r
Branches: MAIN
CVS tags: prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, bouyer-socketcan-base1
Branch point for: prg-localcount2
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +7 -3 lines
Fix build without INET6

Revision 1.74.2.5: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:50 2017 UTC (7 years, 8 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.74.2.4: preferred, colored; branchpoint 1.74: preferred, colored
Changes since revision 1.74.2.4: +62 -34 lines
Sync with HEAD

Revision 1.86: download - view: text, markup, annotated - select for diffs
Tue Mar 14 09:03:08 2017 UTC (7 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20170320, jdolecek-ncq-base, jdolecek-ncq
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +4 -4 lines
Use if_acquire and if_release instead of using psref API directly

- Provide if_release for consistency to if_acquire
- Use if_acquire and if_release for ifp iterations
- Make ifnet_psref_class static

Revision 1.85: download - view: text, markup, annotated - select for diffs
Mon Feb 27 08:26:53 2017 UTC (7 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +15 -13 lines
Make CARP on IPv6 work

It passes ATF tests but no more, no less.

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

Revision 1.84: download - view: text, markup, annotated - select for diffs
Thu Feb 2 02:52:10 2017 UTC (7 years, 10 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20170204
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +45 -20 lines
Defer some pr_input to workqueue

pr_input is currently called in softint. Some pr_input such as ICMP, ICMPv6
and CARP can add/delete/update IP addresses and routing table entries. For
example, icmp6_redirect_input updates an a routing table entry and
nd6_ra_input may delete an IP address.

Basically such operations shouldn't be done in softint. That aside, we have
a reason to avoid the situation; psz/psref waits cannot be used in softint,
however they are required to work in such pr_input in the MP-safe world.

The change implements the workqueue pr_input framework called wqinput which
provides a means to defer pr_input of a protocol to workqueue easily.
Currently icmp_input, icmp6_input, carp_proto_input and carp6_proto_input
are deferred to workqueue by the framework.

Proposed and discussed on tech-kern and tech-net

Revision 1.83: download - view: text, markup, annotated - select for diffs
Mon Jan 16 15:44:47 2017 UTC (7 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +3 -3 lines
ip6_sprintf -> IN6_PRINT so that we pass the size.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Mon Jan 16 07:33:36 2017 UTC (7 years, 10 months ago) by ryo
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +6 -5 lines
Make ip6_sprintf(), in_fmtaddr(), lla_snprintf() and icmp6_redirect_diag() mpsafe.

Reviewed by ozaki-r@

Revision 1.74.2.4: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:51 2017 UTC (7 years, 11 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.74.2.3: preferred, colored; branchpoint 1.74: preferred, colored
Changes since revision 1.74.2.3: +12 -28 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.81: download - view: text, markup, annotated - select for diffs
Wed Dec 28 07:26:25 2016 UTC (7 years, 11 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20170107, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +10 -26 lines
Use ether_ifattach in carp_clone_create instead of C&P code

carp_clone_destroy calls ether_ifdetach so not calling ether_ifattach is
inconsistent. If we add something pair of initialization and destruction
to ether_ifattach and ether_ifdetach (e.g., mutex_init/mutex_destroy),
ether_ifdetach of carp_clone_destroy won't work. So use ether_ifattach.

In order to do so, make ether_ifattach accept the 2nd argument (lla) as
NULL to allow carp to initialize its link level address by itself.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Mon Dec 12 03:55:57 2016 UTC (7 years, 11 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +4 -4 lines
Make the routing table and rtcaches MP-safe

See the following descriptions for details.

Proposed on tech-kern and tech-net


Overview
--------

We protect the routing table with a rwock and protect
rtcaches with another rwlock. Each rtentry is protected
from being freed or updated via reference counting and psref.

Global rwlocks
--------------

There are two rwlocks; one for the routing table (rt_lock) and
the other for rtcaches (rtcache_lock). rtcache_lock covers
all existing rtcaches; there may have room for optimizations
(future work).

The locking order is rtcache_lock first and rt_lock is next.

rtentry references
------------------

References to an rtentry is managed with reference counting
and psref. Either of the two mechanisms is used depending on
where a rtentry is obtained. Reference counting is used when
we obtain a rtentry from the routing table directly via
rtalloc1 and rtrequest{,1} while psref is used when we obtain
a rtentry from a rtcache via rtcache_* APIs. In both cases,
a caller can sleep/block with holding an obtained rtentry.

The reasons why we use two different mechanisms are (i) only
using reference counting hurts the performance due to atomic
instructions (rtcache case) (ii) ease of implementation;
applying psref to APIs such rtaloc1 and rtrequest{,1} requires
additional works (adding a local variable and an argument).

We will finally migrate to use only psref but we can do it
when we have a lockless routing table alternative.

Reference counting for rtentry
------------------------------

rt_refcnt now doesn't count permanent references such as for
rt_timers and rtcaches, instead it is used only for temporal
references when obtaining a rtentry via rtalloc1 and rtrequest{,1}.
We can do so because destroying a rtentry always involves
removing references of rt_timers and rtcaches to the rtentry
and we don't need to track such references. This also makes
it easy to wait for readers to release references on deleting
or updating a rtentry, i.e., we can simply wait until the
reference counter is 0 or 1. (If there are permanent references
the counter can be arbitrary.)

rt_ref increments a reference counter of a rtentry and rt_unref
decrements it. rt_ref is called inside APIs (rtalloc1 and
rtrequest{,1} so users don't need to care about it while
users must call rt_unref to an obtained rtentry after using it.

rtfree is removed and we use rt_unref and rt_free instead.
rt_unref now just decrements the counter of a given rtentry
and rt_free just tries to destroy a given rtentry.

See the next section for destructions of rtentries by rt_free.

Destructions of rtentries
-------------------------

We destroy a rtentry only when we call rtrequst{,1}(RTM_DELETE);
the original implementation can destroy in any rtfree where it's
the last reference. If we use reference counting or psref, it's
easy to understand if the place that a rtentry is destroyed is
fixed.

rt_free waits for references to a given rtentry to be released
before actually destroying the rtentry. rt_free uses a condition
variable (cv_wait) (and psref_target_destroy for psref) to wait.

Unfortunately rtrequst{,1}(RTM_DELETE) can be called in softint
that we cannot use cv_wait. In that case, we have to defer the
destruction to a workqueue.

rtentry#rt_cv, rtentry#rt_psref and global variables
(see rt_free_global) are added to conduct the procedure.

Updates of rtentries
--------------------

One difficulty to use refcnt/psref instead of rwlock for rtentry
is updates of rtentries. We need an additional mechanism to
prevent readers from seeing inconsistency of a rtentry being
updated.

We introduce RTF_UPDATING flag to rtentries that are updating.
While the flag is set to a rtentry, users cannot acquire the
rtentry. By doing so, we avoid users to see inconsistent
rtentries.

There are two options when a user tries to acquire a rtentry
with the RTF_UPDATING flag; if a user runs in softint context
the user fails to acquire a rtentry (NULL is returned).
Otherwise a user waits until the update completes by waiting
on cv.

The procedure of a updater is simpler to destruction of
a rtentry. Wait on cv (and psref) and after all readers left,
proceed with the update.

Global variables (see rt_update_global) are added to conduct
the procedure.

Currently we apply the mechanism to only RTM_CHANGE in
rtsock.c. We would have to apply other codes. See
"Known issues" section.

psref for rtentry
-----------------

When we obtain a rtentry from a rtcache via rtcache_* APIs,
psref is used to reference to the rtentry.

rtcache_ref acquires a reference to a rtentry with psref
and rtcache_unref releases the reference after using it.
rtcache_ref is called inside rtcache_* APIs and users don't
need to take care of it while users must call rtcache_unref
to release the reference.

struct psref and int bound that is needed for psref is
embedded into struct route. By doing so we don't need to
add local variables and additional argument to APIs.

However this adds another constraint to psref other than
reference counting one's; holding a reference of an rtentry
via a rtcache is allowed by just one caller at the same time.
So we must not acquire a rtentry via a rtcache twice and
avoid a recursive use of a rtcache. And also a rtcache must
be arranged to be used by a LWP/softint at the same time
somehow. For IP forwarding case, we have per-CPU rtcaches
used in softint so the constraint is guaranteed. For a h
rtcache of a PCB case, the constraint is guaranteed by the
solock of each PCB. Any other cases (pf, ipf, stf and ipsec)
are currently guaranteed by only the existence of the global
locks (softnet_lock and/or KERNEL_LOCK). If we've found the
cases that we cannot guarantee the constraint, we would need
to introduce other rtcache APIs that use simple reference
counting.

psref of rtcache is created with IPL_SOFTNET and so rtcache
shouldn't used at an IPL higher than IPL_SOFTNET.

Note that rtcache_free is used to invalidate a given rtcache.
We don't need another care by my change; just keep them as
they are.

Performance impact
------------------

When NET_MPSAFE is disabled the performance drop is 3% while
when it's enabled the drop is increased to 11%. The difference
comes from that currently we don't take any global locks and
don't use psref if NET_MPSAFE is disabled.

We can optimize the performance of the case of NET_MPSAFE
on by reducing lookups of rtcache that uses psref;
currently we do two lookups but we should be able to trim
one of two. This is a future work.

Known issues
------------

There are two known issues to be solved; one is that
a caller of rtrequest(RTM_ADD) may change rtentry (see rtinit).
We need to prevent new references during the update. Or
we may be able to remove the code (perhaps, need more
investigations).

The other is rtredirect that updates a rtentry. We need
to apply our update mechanism, however it's not easy because
rtredirect is called in softint and we cannot apply our
mechanism simply. One solution is to defer rtredirect to
a workqueue but it requires some code restructuring.

Revision 1.59.4.7: download - view: text, markup, annotated - select for diffs
Mon Dec 5 10:55:28 2016 UTC (8 years ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.59.4.6: preferred, colored; branchpoint 1.59: preferred, colored
Changes since revision 1.59.4.6: +3 -5 lines
Sync with HEAD

Revision 1.74.2.3: download - view: text, markup, annotated - select for diffs
Fri Nov 4 14:49:21 2016 UTC (8 years, 1 month ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.74.2.2: preferred, colored; branchpoint 1.74: preferred, colored
Changes since revision 1.74.2.2: +3 -5 lines
Sync with HEAD

Revision 1.79: download - view: text, markup, annotated - select for diffs
Tue Oct 11 13:39:34 2016 UTC (8 years, 1 month ago) by roy
Branches: MAIN
CVS tags: pgoyette-localcount-20161104, nick-nhusb-base-20161204
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +2 -3 lines
Remove unused variable.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Tue Oct 11 12:32:30 2016 UTC (8 years, 1 month ago) by roy
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +3 -4 lines
Mark arprequest static and introduce arpannounce so that gratuitous
ARP requests are only send from valid addresses.

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

Revision 1.47.4.5: download - view: text, markup, annotated - select for diffs
Sun Aug 28 10:49:45 2016 UTC (8 years, 3 months ago) by bouyer
Branches: netbsd-6
Diff to: previous 1.47.4.4: preferred, colored; branchpoint 1.47: preferred, colored; next MAIN 1.48: preferred, colored
Changes since revision 1.47.4.4: +6 -4 lines
Pull up following revision(s) (requested by is in ticket #1393):
	sys/netinet/ip_carp.c: revision 1.75
Workaround for PR 47013 by bouyer@. Only works for mixed IPv4/IPv6
environemnts, not for pure-IPv6 yet. A real fix is still needed.

Revision 1.47.4.4: download - view: text, markup, annotated - select for diffs
Sat Aug 27 14:39:10 2016 UTC (8 years, 3 months ago) by bouyer
Branches: netbsd-6
Diff to: previous 1.47.4.3: preferred, colored; branchpoint 1.47: preferred, colored
Changes since revision 1.47.4.3: +24 -3 lines
Pull up following revision(s) (requested by is in ticket #1394):
	sys/netinet/ip_carp.c: revision 1.76
Print the IPv6 or IPv4 source addresses of packets with wrong hash, to
help debugging.

Revision 1.59.2.4: download - view: text, markup, annotated - select for diffs
Sat Aug 27 04:29:41 2016 UTC (8 years, 3 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, 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
Diff to: previous 1.59.2.3: preferred, colored; branchpoint 1.59: preferred, colored
Changes since revision 1.59.2.3: +24 -3 lines
Pull up following revision(s) (requested by is in ticket #1209):
	sys/netinet/ip_carp.c: revision 1.76
Print the IPv6 or IPv4 source addresses of packets with wrong hash, to
help debugging.

Revision 1.59.2.3: download - view: text, markup, annotated - select for diffs
Sat Aug 27 04:25:50 2016 UTC (8 years, 3 months ago) by snj
Branches: netbsd-7
Diff to: previous 1.59.2.2: preferred, colored; branchpoint 1.59: preferred, colored
Changes since revision 1.59.2.2: +6 -4 lines
Pull up following revision(s) (requested by is in ticket #1208):
	sys/netinet/ip_carp.c: revision 1.75
Workaround for PR 47013 by bouyer@. Only works for mixed IPv4/IPv6
environemnts, not for pure-IPv6 yet. A real fix is still needed.

Revision 1.74.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 6 00:19:10 2016 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.74.2.1: preferred, colored; branchpoint 1.74: preferred, colored
Changes since revision 1.74.2.1: +22 -3 lines
Sync with HEAD

Revision 1.77: download - view: text, markup, annotated - select for diffs
Mon Aug 1 03:15:30 2016 UTC (8 years, 4 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-20160806, nick-nhusb-base-20161004, localcount-20160914
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +22 -3 lines
Apply pserialize and psref to struct ifaddr and its variants

This change makes struct ifaddr and its variants (in_ifaddr and in6_ifaddr)
MP-safe by using pserialize and psref. At this moment, pserialize_perform
and psref_target_destroy are disabled because (1) we don't need them
because of softnet_lock (2) they cause a deadlock because of softnet_lock.
So we'll enable them when we remove softnet_lock in the future.

Revision 1.74.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 26 03:24:23 2016 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +28 -5 lines
Sync with HEAD

Revision 1.76: download - view: text, markup, annotated - select for diffs
Sat Jul 23 13:37:10 2016 UTC (8 years, 4 months ago) by is
Branches: MAIN
CVS tags: pgoyette-localcount-20160726
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +24 -3 lines
Print the IPv6 or IPv4 source addresses of packets with wrong hash, to
help debugging.

Revision 1.59.2.2: download - view: text, markup, annotated - select for diffs
Sat Jul 23 13:33:32 2016 UTC (8 years, 4 months ago) by is
Branches: netbsd-7
Diff to: previous 1.59.2.1: preferred, colored; branchpoint 1.59: preferred, colored
Changes since revision 1.59.2.1: +1 -22 lines
backout last change (wrong branch).

Revision 1.59.2.1: download - view: text, markup, annotated - select for diffs
Sat Jul 23 13:24:40 2016 UTC (8 years, 4 months ago) by is
Branches: netbsd-7
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +24 -3 lines
Log the IPv4/IPv6 source of incorrect hash packets, too. Needed for
meaningful debugging.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Sat Jul 23 12:19:07 2016 UTC (8 years, 4 months ago) by is
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +6 -4 lines
Workaround for PR 47013 by bouyer@. Only works for mixed IPv4/IPv6
environemnts, not for pure-IPv6 yet. A real fix is still needed.

Revision 1.59.4.5: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:22 2016 UTC (8 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.59.4.4: preferred, colored; branchpoint 1.59: preferred, colored
Changes since revision 1.59.4.4: +40 -39 lines
Sync with HEAD

Revision 1.74: download - view: text, markup, annotated - select for diffs
Thu Jul 7 09:32:02 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
CVS tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +10 -10 lines
Switch the address list of intefaces to pslist(9)

As usual, we leave the old list to avoid breaking kvm(3) users.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Wed Jul 6 08:42:34 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -5 lines
Switch the IPv4 address list to pslist(9)

Note that we leave the old list just in case; it seems there are some
kvm(3) users accessing the list. We can remove it later if we confirmed
nobody does actually.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Mon Jul 4 06:48:14 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +3 -3 lines
Use pslist(9) for the global in6_ifaddr list

psz and psref will be applied in another commit.

No functional change intended.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Tue Jun 21 03:28:27 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +6 -6 lines
Replace ifp of ip_moptions and ip6_moptions with if_index

The motivation is the same as the mbuf's rcvif case; avoid having a pointer
of an ifnet object in ip_moptions and ip6_moptions, which is not MP-safe.

ip_moptions and ip6_moptions can be stored in a PCB for inet or inet6
that's life time is different from ifnet one and so an ifnet object can be
disappeared anytime we get it via them. Thus we need to look up an ifnet
object by if_index every time for safe.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Mon Jun 20 08:08:13 2016 UTC (8 years, 5 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +3 -3 lines
fix: i386/ALL build failure

Revision 1.69: download - view: text, markup, annotated - select for diffs
Mon Jun 20 06:46:38 2016 UTC (8 years, 5 months ago) by knakahara
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +3 -3 lines
apply if_output_lock() to L3 callers which call ifp->if_output() of L2(or L3 tunneling).

Revision 1.68: download - view: text, markup, annotated - select for diffs
Thu Jun 16 02:38:40 2016 UTC (8 years, 5 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +4 -5 lines
Use curlwp_bind and curlwp_bindx instead of open-coding LP_BOUND

Revision 1.67: 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.66: preferred, colored
Changes since revision 1.66: +19 -15 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.66: 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.65: preferred, colored
Changes since revision 1.65: +6 -6 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.59.4.4: 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.59.4.3: preferred, colored; branchpoint 1.59: preferred, colored
Changes since revision 1.59.4.3: +17 -4 lines
Sync with HEAD

Revision 1.65: download - view: text, markup, annotated - select for diffs
Thu May 12 02:24:17 2016 UTC (8 years, 6 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20160529
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +16 -3 lines
Protect ifnet list with psz and psref

The change ensures that ifnet objects in the ifnet list aren't freed during
list iterations by using pserialize(9) and psref(9).

Note that the change adds a pslist(9) for ifnet but doesn't remove the
original ifnet list (ifnet_list) to avoid breaking kvm(3) users. We
shouldn't use the original list in the kernel anymore.

Revision 1.64: 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.63: preferred, colored
Changes since revision 1.63: +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.59.4.3: 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.59.4.2: preferred, colored; branchpoint 1.59: preferred, colored
Changes since revision 1.59.4.2: +7 -7 lines
Sync with HEAD

Revision 1.63: download - view: text, markup, annotated - select for diffs
Mon Apr 4 07:37:07 2016 UTC (8 years, 8 months ago) by ozaki-r
Branches: MAIN
CVS tags: nick-nhusb-base-20160422
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +7 -7 lines
Separate nexthop caches from the routing table

By this change, nexthop caches (IP-MAC address pair) are not stored
in the routing table anymore. Instead nexthop caches are stored in
each network interface; we already have lltable/llentry data structure
for this purpose. This change also obsoletes the concept of cloning/cloned
routes. Cloned routes no longer exist while cloning routes still exist
with renamed to connected routes.

Noticeable changes are:
- Nexthop caches aren't listed in route show/netstat -r
  - sysctl(NET_RT_DUMP) doesn't return them
  - If RTF_LLDATA is specified, it returns nexthop caches
- Several definitions of routing flags and messages are removed
  - RTF_CLONING, RTF_XRESOLVE, RTF_LLINFO, RTF_CLONED and RTM_RESOLVE
- RTF_CONNECTED is added
  - It has the same value of RTF_CLONING for backward compatibility
- route's -xresolve, -[no]cloned and -llinfo options are removed
  - -[no]cloning remains because it seems there are users
  - -[no]connected is introduced and recommended
    to be used instead of -[no]cloning
- route show/netstat -r drops some flags
  - 'L' and 'c' are not seen anymore
  - 'C' now indicates a connected route
- Gateway value of a route of an interface address is now not
  a L2 address but "link#N" like a connected (cloning) route
- Proxy ARP: "arp -s ... pub" doesn't create a route

You can know details of behavior changes by seeing diffs under tests/.

Proposed on tech-net and tech-kern:
  http://mail-index.netbsd.org/tech-net/2016/03/11/msg005701.html

Revision 1.59.4.2: download - view: text, markup, annotated - select for diffs
Tue Sep 22 12:06:11 2015 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.59.4.1: preferred, colored; branchpoint 1.59: preferred, colored
Changes since revision 1.59.4.1: +6 -3 lines
Sync with HEAD

Revision 1.62: download - view: text, markup, annotated - select for diffs
Mon Aug 24 22:21:26 2015 UTC (9 years, 3 months ago) by pooka
Branches: MAIN
CVS tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +4 -2 lines
sprinkle _KERNEL_OPT

Revision 1.61: 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.60: preferred, colored
Changes since revision 1.60: +4 -3 lines
include "ioconf.h" to get the 'void <driver>attach(int count);' prototype.

Revision 1.59.4.1: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:23 2015 UTC (9 years, 8 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +4 -4 lines
Sync with HEAD

Revision 1.60: download - view: text, markup, annotated - select for diffs
Thu Feb 26 09:54:46 2015 UTC (9 years, 9 months ago) by roy
Branches: MAIN
CVS tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +4 -4 lines
Introduce the routing flag RTF_LOCAL to track local address routes.
Add functions rt_ifa_addlocal() and rt_ifa_remlocal() to add and remove
local routes for the address and announce the new address and route
to the routing socket.

Add in_ifaddlocal() and in_ifremlocal() to use these functions.
Rename in6_if{add,rem}loop() to in6_if{add,rem}local() and use these
functions.

rtinit() no longer announces the address, just the network route for the
address. As such, calls to rt_newaddrmsg() have been removed from
in_addprefix() and in_scrubprefix().

This solves the problem of potentially more than one announcement, or no
announcement at all for the address in certain situations.

Revision 1.50.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:04:35 2014 UTC (10 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +128 -84 lines
Rebase to HEAD as of a few days ago.

Revision 1.53.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:56:25 2014 UTC (10 years, 4 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.53: preferred, colored; next MAIN 1.54: preferred, colored
Changes since revision 1.53: +96 -77 lines
Rebase.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Thu Jul 31 02:37:25 2014 UTC (10 years, 4 months ago) by ozaki-r
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, nick-nhusb-base, netbsd-7-base, 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: nick-nhusb, netbsd-7
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +3 -3 lines
Make carp_suppress_preempt global back

It is still accessed by if_pfsync.c.

This unbreaks the build of i386 kernel.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Thu Jul 31 00:56:23 2014 UTC (10 years, 4 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +75 -70 lines
Make local functions/variables static

No functional change.

Revision 1.47.4.1.4.1: download - view: text, markup, annotated - select for diffs
Wed Jun 18 09:35:40 2014 UTC (10 years, 5 months ago) by msaitoh
Branches: netbsd-6-0
CVS tags: netbsd-6-0-6-RELEASE
Diff to: previous 1.47.4.1: preferred, colored; next MAIN 1.47.4.2: preferred, colored
Changes since revision 1.47.4.1: +20 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #1067):
	sys/dist/ipf/netinet/ip_fil_netbsd.c	1.9 via patch
	sys/net/if_ethersubr.c			1.197 via patch
	sys/net/if_loop.c			1.77 via patch
	sys/net/if_vlan.c			1.70 via patch
	sys/netinet/if_arp.c			1.158
	sys/netinet/ip_carp.c			1.54 via patch
	sys/netinet6/ip6_flow.c			1.23 via patch
	sys/netinet6/nd6.c			1.150 via patch
	sys/rump/librump/rumpkern/klock.c	1.4

Make sure *(if_output)() is called with KERNEL_LOCK held to avoid mbuf leak.
See http://mail-index.netbsd.org/tech-net/2014/04/09/msg004511.html
for details. For netinet6, the problem report, fix and test were done
by njoly@ on current-users@

Revision 1.47.4.1.6.1: download - view: text, markup, annotated - select for diffs
Wed Jun 18 09:34:27 2014 UTC (10 years, 5 months ago) by msaitoh
Branches: netbsd-6-1
CVS tags: netbsd-6-1-5-RELEASE
Diff to: previous 1.47.4.1: preferred, colored; next MAIN 1.47.4.2: preferred, colored
Changes since revision 1.47.4.1: +20 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #1067):
	sys/dist/ipf/netinet/ip_fil_netbsd.c	1.9 via patch
	sys/net/if_ethersubr.c			1.197 via patch
	sys/net/if_loop.c			1.77 via patch
	sys/net/if_vlan.c			1.70 via patch
	sys/netinet/if_arp.c			1.158
	sys/netinet/ip_carp.c			1.54 via patch
	sys/netinet6/ip6_flow.c			1.23 via patch
	sys/netinet6/nd6.c			1.150 via patch
	sys/rump/librump/rumpkern/klock.c	1.4

Make sure *(if_output)() is called with KERNEL_LOCK held to avoid mbuf leak.
See http://mail-index.netbsd.org/tech-net/2014/04/09/msg004511.html
for details. For netinet6, the problem report, fix and test were done
by njoly@ on current-users@

Revision 1.57: download - view: text, markup, annotated - select for diffs
Fri Jun 6 01:02:47 2014 UTC (10 years, 6 months ago) by rmind
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +4 -4 lines
- Eliminate RTFREE() macro in favour of rtfree() function.
- Make rtcache() function static.

Revision 1.47.4.3: download - view: text, markup, annotated - select for diffs
Tue Jun 3 15:34:00 2014 UTC (10 years, 6 months ago) by msaitoh
Branches: netbsd-6
Diff to: previous 1.47.4.2: preferred, colored; branchpoint 1.47: preferred, colored
Changes since revision 1.47.4.2: +20 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #1067):
	sys/dist/ipf/netinet/ip_fil_netbsd.c	1.9 via patch
	sys/net/if_ethersubr.c			1.197 via patch
	sys/net/if_loop.c			1.77 via patch
	sys/net/if_vlan.c			1.70 via patch
	sys/netinet/if_arp.c			1.158
	sys/netinet/ip_carp.c			1.54 via patch
	sys/netinet6/ip6_flow.c			1.23 via patch
	sys/netinet6/nd6.c			1.150 via patch
	sys/rump/librump/rumpkern/klock.c	1.4

Make sure *(if_output)() is called with KERNEL_LOCK held to avoid mbuf leak.
See http://mail-index.netbsd.org/tech-net/2014/04/09/msg004511.html
for details. For netinet6, the problem report, fix and test were done
by njoly@ on current-users@

Revision 1.56: download - view: text, markup, annotated - select for diffs
Thu May 29 23:02:48 2014 UTC (10 years, 6 months ago) by rmind
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +3 -5 lines
Make IGMP and multicast group management code MP-safe.  Use a read-write
lock to protect the hash table of multicast address records; also, make it
private and eliminate some macros.  In the long term, the lookup path ought
to be optimised.

Revision 1.46.2.3: 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.46.2.2: preferred, colored; branchpoint 1.46: preferred, colored; next MAIN 1.47: preferred, colored
Changes since revision 1.46.2.2: +34 -9 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.50.4.2: download - view: text, markup, annotated - select for diffs
Sun May 18 17:46:13 2014 UTC (10 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.50.4.1: preferred, colored; branchpoint 1.50: preferred, colored; next MAIN 1.51: preferred, colored
Changes since revision 1.50.4.1: +52 -11 lines
sync with head

Revision 1.55: download - view: text, markup, annotated - select for diffs
Sat May 17 20:44:24 2014 UTC (10 years, 6 months ago) by rmind
Branches: MAIN
CVS tags: rmind-smpnet-nbase, rmind-smpnet-base
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +3 -3 lines
- Move IFNET_*() macros under #ifdef _KERNEL.
- Replace TAILQ_FOREACH on ifnet with IFNET_FOREACH().

Revision 1.54: download - view: text, markup, annotated - select for diffs
Tue May 13 19:36:16 2014 UTC (10 years, 6 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +20 -4 lines
Make sure *(if_output)() is called with KERNEL_LOCK held.
Add some KASSERT for this.
See http://mail-index.netbsd.org/tech-net/2014/04/09/msg004511.html
for details.

Revision 1.47.4.2: download - view: text, markup, annotated - select for diffs
Fri Apr 11 08:52:14 2014 UTC (10 years, 7 months ago) by msaitoh
Branches: netbsd-6
Diff to: previous 1.47.4.1: preferred, colored; branchpoint 1.47: preferred, colored
Changes since revision 1.47.4.1: +33 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #1043):
	sys/netinet/ip_carp.c: revision 1.53
Proper MBUFTRACE handling. Without it, ec_tx_mowner, ec_rx_mowner and
ifp->if_mowner would be used uninitialised.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Fri Apr 4 12:53:04 2014 UTC (10 years, 8 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-pagecache-base9
Branch point for: tls-earlyentropy
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +33 -2 lines
Proper MBUFTRACE handling. Without it, ec_tx_mowner, ec_rx_mowner and
ifp->if_mowner would be used uninitialised.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Tue Feb 25 18:30:12 2014 UTC (10 years, 9 months ago) by pooka
Branches: MAIN
CVS tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -7 lines
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

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

Revision 1.51: download - view: text, markup, annotated - select for diffs
Fri Oct 18 19:48:36 2013 UTC (11 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -4 lines
remove unused variable

Revision 1.50.4.1: download - view: text, markup, annotated - select for diffs
Wed Jul 17 03:16:31 2013 UTC (11 years, 4 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +3 -3 lines
Checkpoint work in progress:
- Move PCB structures under __INPCB_PRIVATE, adjust most of the callers
  and thus make IPv4 PCB structures mostly opaque.  Any volunteers for
  merging in6pcb with inpcb (see rpaulo-netinet-merge-pcb branch)?
- Move various global vars to the modules where they belong, make them static.
- Some preliminary work for IPv4 PCB locking scheme.
- Make raw IP code mostly MP-safe.  Simplify some of it.
- Rework "fast" IP forwarding (ipflow) code to be mostly MP-safe.  It should
  run from a software interrupt, rather than hard.
- Rework tun(4) pseudo interface to be MP-safe.
- Work towards making some other interfaces more strict.

Revision 1.46.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:22:46 2012 UTC (12 years, 1 month ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.46.2.1: preferred, colored; branchpoint 1.46: preferred, colored
Changes since revision 1.46.2.1: +15 -2 lines
sync with head

Revision 1.50: download - view: text, markup, annotated - select for diffs
Mon Aug 20 16:01:37 2012 UTC (12 years, 3 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +3 -3 lines
make this compile.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon Aug 20 14:14:32 2012 UTC (12 years, 3 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +15 -2 lines
Support checksum offloading in carp(4) if the underlying device suports it,
as proposed on tech-net@ on 2 Aug 2012.

Revision 1.46.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:40 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +4 -11 lines
sync with head

Revision 1.47.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.47: preferred, colored; next MAIN 1.48: preferred, colored
Changes since revision 1.47: +2 -8 lines
sync to latest -current.

Revision 1.47.4.1: download - view: text, markup, annotated - select for diffs
Mon Apr 2 18:25:35 2012 UTC (12 years, 8 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, 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, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: netbsd-6-1, netbsd-6-0
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -8 lines
Pull up following revision(s) (requested by bouyer in ticket #145):
	sys/netinet/ip_carp.c: revision 1.48
Do not sleep in callout context, this will hang the clock soft interrupt.
Should fix PR kern/46217.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Tue Mar 27 17:48:17 2012 UTC (12 years, 8 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-pagecache-base5, yamt-pagecache-base4, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base10
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -8 lines
Do not sleep in callout context, this will hang the clock soft interrupt.
Should fix PR kern/46217.

Revision 1.47: 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, 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: netbsd-6, jmcneill-usbmp
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +4 -5 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.46: download - view: text, markup, annotated - select for diffs
Wed Oct 19 01:52:22 2011 UTC (13 years, 1 month ago) by dyoung
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +5 -15 lines
Use if_addr_init() and if_mcast_op() instead of ifp->if_ioctl().

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun Jul 17 20:54:53 2011 UTC (13 years, 4 months ago) by joerg
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -4 lines
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.

Revision 1.40.4.2: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:55:57 2011 UTC (13 years, 9 months ago) by rmind
Branches: rmind-uvmplock
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: +10 -4 lines
sync with head

Revision 1.25.2.7: download - view: text, markup, annotated - select for diffs
Sat Oct 9 03:32:38 2010 UTC (14 years, 2 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.25.2.6: preferred, colored; branchpoint 1.25: preferred, colored; next MAIN 1.26: preferred, colored
Changes since revision 1.25.2.6: +8 -4 lines
sync with head

Revision 1.40.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 17 06:47:46 2010 UTC (14 years, 3 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.40.2.1: preferred, colored; branchpoint 1.40: preferred, colored; next MAIN 1.41: preferred, colored
Changes since revision 1.40.2.1: +8 -2 lines
Sync with HEAD.

Revision 1.25.2.6: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:54:56 2010 UTC (14 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.25.2.5: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.2.5: +6 -5 lines
sync with head.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Wed Aug 11 11:06:42 2010 UTC (14 years, 4 months ago) by pooka
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +4 -4 lines
ahem, min -> max in previous

Revision 1.43: download - view: text, markup, annotated - select for diffs
Wed Aug 11 09:36:44 2010 UTC (14 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +8 -4 lines
Use kpause() instead of DELAY() and sleep a minimum of 1 tick.
This is possible now since softints have a thread context.  It's
also not a very frequent code path.  Addresses ABI issue with delay
(kern/40505).

I'm not entire sure what this delay is meant to accomplish, though.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Tue Aug 10 21:46:12 2010 UTC (14 years, 4 months ago) by pooka
Branches: MAIN
CVS tags: yamt-nfs-mp-base10
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +4 -2 lines
Include opt_inet since this checks INET/INET6

Revision 1.40.4.1: download - view: text, markup, annotated - select for diffs
Sun May 30 05:18:02 2010 UTC (14 years, 6 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +4 -5 lines
sync with head

Revision 1.40.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:44:20 2010 UTC (14 years, 7 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +4 -5 lines
Sync with HEAD.

Revision 1.26.14.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:28:22 2010 UTC (14 years, 7 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26: +9 -2 lines
sync to netbsd-5

Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Apr 5 07:22:50 2010 UTC (14 years, 8 months ago) by joerg
Branches: MAIN
CVS tags: uebayasi-xip-base1
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +4 -5 lines
Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.

Revision 1.25.2.5: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:28 2010 UTC (14 years, 9 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.25.2.4: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.2.4: +15 -12 lines
sync with head

Revision 1.40: download - view: text, markup, annotated - select for diffs
Tue Jan 19 22:08:17 2010 UTC (14 years, 10 months ago) by pooka
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip, rmind-uvmplock
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +4 -11 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.39: download - view: text, markup, annotated - select for diffs
Wed Sep 16 15:23:05 2009 UTC (15 years, 2 months ago) by pooka
Branches: MAIN
CVS tags: matt-premerge-20091211, jym-xensuspend-nbase
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +13 -3 lines
Replace a large number of link set based sysctl node creations with
calls from subsystem constructors.  Benefits both future kernel
modules and rump.

no change to sysctl nodes on i386/MONOLITHIC & build tested i386/ALL

Revision 1.30.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 23 23:32:48 2009 UTC (15 years, 4 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.30.2.1: preferred, colored; branchpoint 1.30: preferred, colored; next MAIN 1.31: preferred, colored
Changes since revision 1.30.2.1: +9 -2 lines
Sync with HEAD.

Revision 1.25.2.4: download - view: text, markup, annotated - select for diffs
Sat Jun 20 07:20:34 2009 UTC (15 years, 5 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.25.2.3: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.2.3: +9 -2 lines
sync with head

Revision 1.26.10.2: download - view: text, markup, annotated - select for diffs
Tue Jun 9 17:31:46 2009 UTC (15 years, 6 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, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.26.10.1: preferred, colored; branchpoint 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26.10.1: +6 -6 lines
Pull up following revision(s) (requested by taca in ticket #796):
	sys/netinet/ip_carp.c: revision 1.38
Make ip_carp.c compile, fixing usage of CARP_LOG().

Revision 1.38: download - view: text, markup, annotated - select for diffs
Sun Jun 7 06:11:18 2009 UTC (15 years, 6 months ago) by taca
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +6 -6 lines
Make ip_carp.c compile, fixing usage of CARP_LOG().

Revision 1.26.10.1: download - view: text, markup, annotated - select for diffs
Fri Jun 5 18:24:01 2009 UTC (15 years, 6 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +9 -2 lines
Pull up following revision(s) (requested by christos in ticket #785):
	sys/netinet/ip_carp.c: revision 1.37
PR/38260: Brian Seklecki: Improve carp logging.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Wed May 27 21:32:31 2009 UTC (15 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +9 -2 lines
PR/38260: Brian Seklecki: Improve carp logging.

Revision 1.25.2.3: download - view: text, markup, annotated - select for diffs
Sat May 16 10:41:50 2009 UTC (15 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.25.2.2: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.2.2: +4 -4 lines
sync with head

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

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

Revision 1.36: download - view: text, markup, annotated - select for diffs
Tue May 12 22:01:20 2009 UTC (15 years, 6 months ago) by elad
Branches: MAIN
CVS tags: yamt-nfs-mp-base4, jym-xensuspend-base
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +3 -3 lines
Fix previous, || -> &&.

Pointed out by cube@, thanks!

Revision 1.35: download - view: text, markup, annotated - select for diffs
Tue May 12 21:48:42 2009 UTC (15 years, 6 months ago) by elad
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +4 -4 lines
Fix inverted permissions check.

Revision 1.25.2.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:14:17 2009 UTC (15 years, 7 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.25.2.1: preferred, colored; branchpoint 1.25: preferred, colored
Changes since revision 1.25.2.1: +49 -50 lines
sync with head.

Revision 1.26.8.2: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:37:22 2009 UTC (15 years, 7 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.26.8.1: preferred, colored; branchpoint 1.26: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26.8.1: +25 -25 lines
Sync with HEAD.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sat Apr 18 14:58:05 2009 UTC (15 years, 7 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +12 -12 lines
Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch

Revision 1.33: download - view: text, markup, annotated - select for diffs
Wed Mar 18 17:06:52 2009 UTC (15 years, 8 months ago) by cegger
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +12 -12 lines
bcopy -> memcpy

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Mar 18 16:00:22 2009 UTC (15 years, 8 months ago) by cegger
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +13 -13 lines
bzero -> memset

Revision 1.31: download - view: text, markup, annotated - select for diffs
Wed Mar 18 15:14:31 2009 UTC (15 years, 8 months ago) by cegger
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +4 -4 lines
bcmp -> memcmp

Revision 1.26.8.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:20:13 2009 UTC (15 years, 10 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +26 -27 lines
Sync with HEAD.

Revision 1.22.6.3: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:32 2009 UTC (15 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.22.6.2: preferred, colored; branchpoint 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22.6.2: +24 -25 lines
Sync with HEAD.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Sun Jan 11 02:45:54 2009 UTC (15 years, 10 months ago) by christos
Branches: MAIN
CVS tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +5 -5 lines
merge christos-time_t

Revision 1.23.2.4: download - view: text, markup, annotated - select for diffs
Sat Dec 27 23:14:25 2008 UTC (15 years, 11 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.23.2.3: preferred, colored; branchpoint 1.23: preferred, colored; next MAIN 1.24: preferred, colored
Changes since revision 1.23.2.3: +12 -15 lines
merge with head.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Dec 19 18:49:39 2008 UTC (15 years, 11 months ago) by cegger
Branches: MAIN
CVS tags: christos-time_t-nbase, christos-time_t-base
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +3 -4 lines
use M_ZERO on malloc() and remove subsequent bzero().

Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed Dec 17 20:51:37 2008 UTC (15 years, 11 months ago) by cegger
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +11 -13 lines
kill MALLOC and FREE macros.

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

Revision 1.23.2.3: download - view: text, markup, annotated - select for diffs
Sun Nov 9 23:57:24 2008 UTC (16 years, 1 month ago) by christos
Branches: christos-time_t
Diff to: previous 1.23.2.2: preferred, colored; branchpoint 1.23: preferred, colored
Changes since revision 1.23.2.2: +13 -11 lines
merge with head.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Fri Nov 7 00:20:18 2008 UTC (16 years, 1 month ago) by dyoung
Branches: MAIN
CVS tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +13 -11 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.23.2.2: download - view: text, markup, annotated - select for diffs
Sat Nov 1 21:22:28 2008 UTC (16 years, 1 month ago) by christos
Branches: christos-time_t
Diff to: previous 1.23.2.1: preferred, colored; branchpoint 1.23: preferred, colored
Changes since revision 1.23.2.1: +37 -24 lines
Sync with head.

Revision 1.22.6.2: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:24:24 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.22.6.1: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.6.1: +35 -22 lines
Sync with HEAD.

Revision 1.24.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:35:28 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.24: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24: +5 -35 lines
sync with head.

Revision 1.25.2.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:25:41 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -8 lines
sync with head.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sun May 4 07:22:14 2008 UTC (16 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, hpcarm-cleanup-nbase, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5, matt-nb5-mips64, haad-dm
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -8 lines
Simplify the interface to netstat_sysctl() and allocate space for
the collated counters using kmem_alloc().

PR kern/38577

Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Apr 23 05:26:50 2008 UTC (16 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-nfs-mp-base
Branch point for: yamt-nfs-mp
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +9 -34 lines
Use <net/net_stats.h> / netstat_sysctl().

Revision 1.24: download - view: text, markup, annotated - select for diffs
Tue Apr 15 06:03:28 2008 UTC (16 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +67 -24 lines
Make CARP status per-cpu.

Revision 1.22.6.1: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:43:08 2008 UTC (16 years, 8 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +10 -4 lines
Sync with HEAD.

Revision 1.23.2.1: download - view: text, markup, annotated - select for diffs
Sat Mar 29 20:47:02 2008 UTC (16 years, 8 months ago) by christos
Branches: christos-time_t
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +5 -5 lines
Welcome to the time_t=long long dev_t=uint64_t branch.

Revision 1.22.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 24 07:16:24 2008 UTC (16 years, 8 months ago) by keiichi
Branches: keiichi-mipv6
Diff to: previous 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22: +10 -4 lines
sync with head.

Revision 1.15.2.3: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:05:06 2008 UTC (16 years, 8 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.15.2.2: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15.2.2: +10 -4 lines
sync with HEAD

Revision 1.4.4.9: download - view: text, markup, annotated - select for diffs
Mon Mar 17 09:15:41 2008 UTC (16 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.4.4.8: preferred, colored; branchpoint 1.4: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.4.8: +10 -4 lines
sync with head.

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sat Mar 15 16:44:03 2008 UTC (16 years, 8 months ago) by ws
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Branch point for: christos-time_t
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +10 -4 lines
Set scope on IPv6 multicast address to give carp a chance to work for IPv6, too.
From FreeBSD.

Revision 1.4.4.8: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:47:15 2008 UTC (16 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.4.4.7: preferred, colored; branchpoint 1.4: preferred, colored
Changes since revision 1.4.4.7: +6 -4 lines
sync with head

Revision 1.15.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:57:26 2008 UTC (16 years, 11 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.15.2.1: preferred, colored
Changes since revision 1.15.2.1: +14 -12 lines
sync with HEAD

Revision 1.19.4.2: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:57:20 2008 UTC (16 years, 11 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.19.4.1: preferred, colored; branchpoint 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19.4.1: +2 -3 lines
Sync with HEAD

Revision 1.18.2.2: download - view: text, markup, annotated - select for diffs
Thu Dec 27 00:46:29 2007 UTC (16 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.18.2.1: preferred, colored; branchpoint 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18.2.1: +6 -4 lines
Sync with HEAD.

Revision 1.18.4.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 21:39:52 2007 UTC (16 years, 11 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.18.4.1: preferred, colored; branchpoint 1.18: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18.4.1: +6 -4 lines
Sync with head.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Fri Dec 21 02:07:55 2007 UTC (16 years, 11 months ago) by matt
Branches: MAIN
CVS tags: vmlocking2-base3, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-base, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Branch point for: mjf-devfs2, keiichi-mipv6
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -3 lines
Add fix for ip_id information leakage.  Since the leakage information is
primarily used with TCP SYN and RST packets and such packets are less than
the smallest sized packet that an IP stack is allowed to fragment, we simply
set ip_id to 0 for all packets 68 bytes or less.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Dec 20 21:08:22 2007 UTC (16 years, 11 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -4 lines
Constify struct ifnet->if_sadl and every use throughout the tree.
Add if_set_sadl() that both sets the link-layer address length and
replaces the current link-layer address with a new one, and use it
throughout the tree.

Revision 1.19.4.1: download - view: text, markup, annotated - select for diffs
Thu Dec 13 21:56:56 2007 UTC (16 years, 11 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +4 -1 lines
Sync with HEAD

Revision 1.19.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 11 15:45:39 2007 UTC (17 years ago) by yamt
Branches: yamt-kmem
Diff to: previous 1.19: preferred, colored; next MAIN 1.20: preferred, colored
Changes since revision 1.19: +4 -1 lines
sync with head.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Dec 11 12:29:11 2007 UTC (17 years ago) by lukem
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, cube-autoconf-base, cube-autoconf
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +4 -1 lines
use __KERNEL_RCSID()

Revision 1.14.4.4: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:38:37 2007 UTC (17 years ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.14.4.3: preferred, colored; branchpoint 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14.4.3: +9 -9 lines
Sync with HEAD.

Revision 1.18.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:21:12 2007 UTC (17 years ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +9 -9 lines
Sync with HEAD.

Revision 1.18.4.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 17:57:56 2007 UTC (17 years ago) by ad
Branches: vmlocking2
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +9 -9 lines
Sync with head.

Revision 1.4.4.7: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:34:29 2007 UTC (17 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.4.4.6: preferred, colored; branchpoint 1.4: preferred, colored
Changes since revision 1.4.4.6: +9 -9 lines
sync with head

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue Dec 4 10:33:11 2007 UTC (17 years ago) by dyoung
Branches: MAIN
CVS tags: yamt-kmem-base, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base
Branch point for: yamt-kmem, bouyer-xeni386
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +9 -9 lines
Use IFADDR_FOREACH().

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:33:48 2007 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +27 -22 lines
sync with HEAD

Revision 1.4.4.6: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:36:08 2007 UTC (17 years, 1 month ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.4.4.5: preferred, colored; branchpoint 1.4: preferred, colored
Changes since revision 1.4.4.5: +11 -9 lines
sync with head.

Revision 1.14.4.3: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:49:05 2007 UTC (17 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.14.4.2: preferred, colored; branchpoint 1.14: preferred, colored
Changes since revision 1.14.4.2: +2 -2 lines
Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.17.4.1: download - view: text, markup, annotated - select for diffs
Thu Oct 25 22:40:08 2007 UTC (17 years, 1 month ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +2 -2 lines
Sync with HEAD.

Revision 1.12.2.4: download - view: text, markup, annotated - select for diffs
Tue Oct 23 20:17:19 2007 UTC (17 years, 1 month ago) by ad
Branches: vmlocking
Diff to: previous 1.12.2.3: preferred, colored; branchpoint 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12.2.3: +2 -2 lines
Sync with head.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri Oct 19 12:16:46 2007 UTC (17 years, 1 month ago) by ad
Branches: MAIN
CVS tags: vmlocking2-base1, vmlocking-nbase, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: vmlocking2, mjf-devfs
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -2 lines
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.12.2.3: download - view: text, markup, annotated - select for diffs
Tue Oct 9 13:44:49 2007 UTC (17 years, 2 months ago) by ad
Branches: vmlocking
Diff to: previous 1.12.2.2: preferred, colored; branchpoint 1.12: preferred, colored
Changes since revision 1.12.2.2: +27 -22 lines
Sync with head.

Revision 1.14.4.2: download - view: text, markup, annotated - select for diffs
Tue Oct 2 18:29:19 2007 UTC (17 years, 2 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.14.4.1: preferred, colored; branchpoint 1.14: preferred, colored
Changes since revision 1.14.4.1: +10 -8 lines
Sync with HEAD.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Sep 19 05:25:33 2007 UTC (17 years, 2 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, vmlocking-base
Branch point for: bouyer-xenamd64
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +10 -8 lines
Constify sockaddr argument to ether_multiaddr().  Change struct
ifreq * arguments to ether_addmulti() and ether_delmulti() to const
struct sockaddr *, since ether_{add,del}multi() only ever read the
sockaddr ifreq member, ifr_addr.  Update uses in carp(4) and in
vlan(4).

Revision 1.14.4.1: download - view: text, markup, annotated - select for diffs
Mon Sep 3 16:49:03 2007 UTC (17 years, 3 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +18 -15 lines
Sync with HEAD.

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

Revision 1.13.2.2: download - view: text, markup, annotated - select for diffs
Mon Sep 3 10:23:44 2007 UTC (17 years, 3 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.13.2.1: preferred, colored; branchpoint 1.13: preferred, colored; next MAIN 1.14: preferred, colored
Changes since revision 1.13.2.1: +18 -15 lines
Sync with HEAD.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Thu Aug 30 02:17:37 2007 UTC (17 years, 3 months ago) by dyoung
Branches: MAIN
CVS tags: nick-csl-alignment-base5
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +17 -14 lines
Use malloc(9) for sockaddrs instead of pool(9), and remove dom_sa_pool
and dom_sa_len members from struct domain.  Pools of fixed-size
objects are too rigid for sockaddr_dls, whose size can vary over
a wide range.

Return sockaddr_dl to its "historical" size.  Now that I'm using
malloc(9) instead of pool(9) to allocate sockaddr_dl, I can create
a sockaddr_dl of any size in the kernel, so expanding sockaddr_dl
is useless.

Avoid using sizeof(struct sockaddr_dl) in the kernel.

Introduce sockaddr_dl_alloc() for allocating & initializing an
arbitrary sockaddr_dl on the heap.

Add an argument, the sockaddr length, to sockaddr_alloc(),
sockaddr_copy(), and sockaddr_dl_setaddr().

Constify: LLADDR() -> CLLADDR().

Where the kernel overwrites LLADDR(), use sockaddr_dl_setaddr(),
instead.  Used properly, sockaddr_dl_setaddr() will not overrun
the end of the sockaddr.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Aug 26 22:59:10 2007 UTC (17 years, 3 months ago) by dyoung
Branches: MAIN
Branch point for: matt-armv6
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -2 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.12.2.2: download - view: text, markup, annotated - select for diffs
Mon Aug 20 21:27:59 2007 UTC (17 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.12.2.1: preferred, colored; branchpoint 1.12: preferred, colored
Changes since revision 1.12.2.1: +18 -14 lines
Sync with HEAD.

Revision 1.13.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:49:44 2007 UTC (17 years, 3 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +18 -14 lines
Sync with HEAD.

Revision 1.14.6.2: download - view: text, markup, annotated - select for diffs
Thu Jul 19 20:48:55 2007 UTC (17 years, 4 months ago) by dyoung
Branches: matt-mips64
Diff to: previous 1.14.6.1: preferred, colored; branchpoint 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14.6.1: +2278 -0 lines
Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

        Introduce rt_walktree() for walking the routing table and
        applying a function to each rtentry.  Replace most
        rn_walktree() calls with it.

        Use rt_getkey()/rt_setkey() to get/set a route's destination.
        Keep a pointer to the sockaddr key in the rtentry, so that
        rtentry users do not have to grovel in the radix_node for
        the key.

        Add a RTM_GET method to rtrequest.  Use that instead of
        radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

        Constify.  KNF.  Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
        et cetera.  Use NULL instead of 0 for null pointers.  Use
        __arraycount().  Reduce gratuitous parenthesization.

        Stop using variadic arguments for rip6_output(), it is
        unnecessary.

        Remove the unnecessary rtentry member rt_genmask and the
        code to maintain it, since nothing actually used it.

        Make rt_maskedcopy() easier to read by using meaningful variable
        names.

        Extract a subroutine intern_netmask() for looking up a netmask in
        the masks table.

        Start converting backslash-ridden IPv6 macros in
        sys/netinet6/in6_var.h into inline subroutines that one
        can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.

Revision 1.14.6.1
Thu Jul 19 20:48:54 2007 UTC (17 years, 4 months ago) by dyoung
Branches: matt-mips64
FILE REMOVED
Changes since revision 1.14: +0 -2278 lines
file ip_carp.c was added on branch matt-mips64 on 2007-07-19 20:48:55 +0000

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Jul 19 20:48:54 2007 UTC (17 years, 4 months ago) by dyoung
Branches: MAIN
CVS tags: matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, jmcneill-pm
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +18 -14 lines
Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

        Introduce rt_walktree() for walking the routing table and
        applying a function to each rtentry.  Replace most
        rn_walktree() calls with it.

        Use rt_getkey()/rt_setkey() to get/set a route's destination.
        Keep a pointer to the sockaddr key in the rtentry, so that
        rtentry users do not have to grovel in the radix_node for
        the key.

        Add a RTM_GET method to rtrequest.  Use that instead of
        radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

        Constify.  KNF.  Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
        et cetera.  Use NULL instead of 0 for null pointers.  Use
        __arraycount().  Reduce gratuitous parenthesization.

        Stop using variadic arguments for rip6_output(), it is
        unnecessary.

        Remove the unnecessary rtentry member rt_genmask and the
        code to maintain it, since nothing actually used it.

        Make rt_maskedcopy() easier to read by using meaningful variable
        names.

        Extract a subroutine intern_netmask() for looking up a netmask in
        the masks table.

        Start converting backslash-ridden IPv6 macros in
        sys/netinet6/in6_var.h into inline subroutines that one
        can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.

Revision 1.12.4.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:11:22 2007 UTC (17 years, 5 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.12: preferred, colored; next MAIN 1.13: preferred, colored
Changes since revision 1.12: +9 -4 lines
Sync with head.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Jul 9 21:11:11 2007 UTC (17 years, 5 months ago) by ad
Branches: MAIN
CVS tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +9 -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.12.2.1: download - view: text, markup, annotated - select for diffs
Sun Jul 1 21:50:49 2007 UTC (17 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +9 -4 lines
Adapt to callout API change.

Revision 1.10.4.2: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:59:37 2007 UTC (17 years, 9 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.10.4.1: preferred, colored; branchpoint 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10.4.1: +7 -7 lines
Sync with HEAD.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:03:20 2007 UTC (17 years, 9 months ago) by christos
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +7 -7 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

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

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

Revision 1.11: download - view: text, markup, annotated - select for diffs
Sat Feb 17 22:34:11 2007 UTC (17 years, 9 months ago) by dyoung
Branches: MAIN
CVS tags: ad-audiomp-base, ad-audiomp
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -2 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.4.4.3: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:50:33 2006 UTC (17 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.4.4.2: preferred, colored; branchpoint 1.4: preferred, colored
Changes since revision 1.4.4.2: +14 -31 lines
sync with head.

Revision 1.5.8.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:19:10 2006 UTC (18 years ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.5.8.1: preferred, colored; branchpoint 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5.8.1: +14 -8 lines
sync with head.

Revision 1.5.4.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:39:36 2006 UTC (18 years ago) by ad
Branches: newlock2
Diff to: previous 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5: +13 -30 lines
Sync with head.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Thu Nov 16 01:33:45 2006 UTC (18 years ago) by christos
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, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Branch point for: yamt-idlelwp
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +4 -4 lines
__unused removal on arguments; approved by core.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Oct 30 00:58:21 2006 UTC (18 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +3 -3 lines
Fix typo (hi Elad)

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Oct 25 18:11:22 2006 UTC (18 years, 1 month ago) by elad
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +11 -5 lines
Kill some KAUTH_GENERIC_ISSUSER.

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

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Oct 20 19:13:02 2006 UTC (18 years, 1 month ago) by liamjfoy
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +1 -25 lines
Remove some dead code - From OpenBSD Rev. 1.129

Revision 1.6: download - view: text, markup, annotated - select for diffs
Thu Oct 12 01:32:38 2006 UTC (18 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +5 -4 lines
- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.5.6.2: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:58:47 2006 UTC (18 years, 3 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.5.6.1: preferred, colored; branchpoint 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5.6.1: +2286 -0 lines
sync with head

Revision 1.1.4.4: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:46:33 2006 UTC (18 years, 4 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.1.4.3: preferred, colored; branchpoint 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1.4.3: +6 -6 lines
sync with head

Revision 1.5.6.1
Sun Jul 23 22:06:13 2006 UTC (18 years, 4 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
FILE REMOVED
Changes since revision 1.5: +0 -2286 lines
file ip_carp.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:58:47 +0000

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Jul 23 22:06:13 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, rpaulo-netinet-merge-pcb, newlock2
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +6 -6 lines
Use the LWP cached credentials where sane.

Revision 1.1.4.3: download - view: text, markup, annotated - select for diffs
Mon Jun 26 12:53:57 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.1.4.2: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.4.2: +45 -50 lines
sync with head.

Revision 1.4.4.2: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:11:01 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.4.4.1: preferred, colored; branchpoint 1.4: preferred, colored
Changes since revision 1.4.4.1: +2286 -0 lines
sync with head.

Revision 1.1.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 19 04:09:48 2006 UTC (18 years, 5 months ago) by chap
Branches: chap-midi
Diff to: previous 1.1: preferred, colored; next MAIN 1.2: preferred, colored
Changes since revision 1.1: +45 -50 lines
Sync with head.

Revision 1.4.4.1
Tue Jun 13 15:43:04 2006 UTC (18 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
FILE REMOVED
Changes since revision 1.4: +0 -2286 lines
file ip_carp.c was added on branch yamt-lazymbuf on 2006-06-21 15:11:01 +0000

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Jun 13 15:43:04 2006 UTC (18 years, 5 months ago) by riz
Branches: MAIN
CVS tags: yamt-pdpolicy-base6, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base
Branch point for: yamt-lazymbuf
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +1 -48 lines
Remove implementation of tvtohz() - since the timecounters branch
was merged, this is now in sys/kern/kern_clock.c .

Revision 1.3.2.2: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:38:46 2006 UTC (18 years, 6 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.3.2.1: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.2.1: +2333 -0 lines
Sync with head.

Revision 1.3.2.1
Thu May 25 15:22:05 2006 UTC (18 years, 6 months ago) by kardel
Branches: simonb-timecounters
FILE REMOVED
Changes since revision 1.3: +0 -2333 lines
file ip_carp.c was added on branch simonb-timecounters on 2006-06-01 22:38:46 +0000

Revision 1.3: download - view: text, markup, annotated - select for diffs
Thu May 25 15:22:05 2006 UTC (18 years, 6 months ago) by liamjfoy
Branches: MAIN
CVS tags: simonb-timecounters-base
Branch point for: simonb-timecounters
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -3 lines
remove a little white space

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

Revision 1.2.2.1
Wed May 24 13:39:37 2006 UTC (18 years, 6 months ago) by tron
Branches: peter-altq
FILE REMOVED
Changes since revision 1.2: +0 -2333 lines
file ip_carp.c was added on branch peter-altq on 2006-05-24 15:50:44 +0000

Revision 1.2: download - view: text, markup, annotated - select for diffs
Wed May 24 13:39:37 2006 UTC (18 years, 6 months ago) by liamjfoy
Branches: MAIN
Branch point for: peter-altq
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +43 -1 lines
Add a check for our own advertisements. This is due to non-simplex
interfaces which received the packets they have just sent.

From: OpenBSD (rev. 1.124)
ok: christos@

Revision 1.1.4.2: download - view: text, markup, annotated - select for diffs
Wed May 24 10:59:03 2006 UTC (18 years, 6 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.1.4.1: preferred, colored; branchpoint 1.1: preferred, colored
Changes since revision 1.1.4.1: +2291 -0 lines
sync with head.

Revision 1.1.4.1
Thu May 18 09:05:51 2006 UTC (18 years, 6 months ago) by yamt
Branches: yamt-pdpolicy
FILE REMOVED
Changes since revision 1.1: +0 -2291 lines
file ip_carp.c was added on branch yamt-pdpolicy on 2006-05-24 10:59:03 +0000

Revision 1.1: 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
Branch point for: yamt-pdpolicy, chap-midi
Integrate Common Address Redundancy Procotol (CARP) from OpenBSD

'pseudo-device	carp'

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

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>