The NetBSD Project

CVS log for src/sys/net/if_llatbl.h

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.19 / (download) - annotate - [select for diffs], Sat Nov 19 08:00:51 2022 UTC (15 months ago) by yamt
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Changes since 1.18: +5 -1 lines
Diff to previous 1.18 (colored)

Make arp have its own mowner

This helped me to debug mbuf leaks in arp.
(if_arp.c rev. 1.298)

Revision 1.18 / (download) - annotate - [select for diffs], Mon Sep 14 15:09:57 2020 UTC (3 years, 5 months ago) by roy
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

nd: Name l3addr union of llentry and use in-place of nd_addr.

Probably makes more sense and makes nd.h less messy.

Revision 1.15.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:15 2020 UTC (3 years, 10 months ago) by martin
Branch: phil-wifi
Changes since 1.15.2.1: +10 -9 lines
Diff to previous 1.15.2.1 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.17 / (download) - annotate - [select for diffs], Thu Jul 18 06:47:10 2019 UTC (4 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, netbsd-9-base, 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, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.16: +10 -9 lines
Diff to previous 1.16 (colored)

Show pointers of llentries on trace logs of LLE_REF_TRACE

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

Sync with HEAD

Revision 1.13.4.3 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:10 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.13.4.2: +4 -3 lines
Diff to previous 1.13.4.2 (colored) to branchpoint 1.13 (colored) next main 1.14 (colored)

Sync with HEAD

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jul 12 02:26:04 2018 UTC (5 years, 7 months ago) by ozaki-r
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, isaki-audio2-base, isaki-audio2
Changes since 1.15: +4 -3 lines
Diff to previous 1.15 (colored)

Don't use aprint_* functions for logging unrelated to autoconf(9)

Revision 1.13.4.2 / (download) - annotate - [select for diffs], Sun Apr 22 07:20:27 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.13.4.1: +2 -2 lines
Diff to previous 1.13.4.1 (colored) to branchpoint 1.13 (colored)

Sync with HEAD

Revision 1.15 / (download) - annotate - [select for diffs], Thu Apr 19 21:20:43 2018 UTC (5 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422
Branch point for: phil-wifi
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

s/static inline/static __inline/g for consistency.

Revision 1.13.4.1 / (download) - annotate - [select for diffs], Thu Mar 15 09:12:06 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.13: +4 -1 lines
Diff to previous 1.13 (colored)

Synch with HEAD

Revision 1.10.8.3 / (download) - annotate - [select for diffs], Tue Mar 13 13:27:10 2018 UTC (5 years, 11 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.10.8.2: +4 -1 lines
Diff to previous 1.10.8.2 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #622):
	sys/netinet/if_arp.c: revision 1.270
	sys/net/if_llatbl.c: revision 1.24 (patch)
	sys/net/if_llatbl.c: revision 1.25
	sys/net/if_llatbl.c: revision 1.26
	sys/net/route.c: revision 1.204
	sys/netinet6/in6.c: revision 1.261
	sys/netinet6/in6.c: revision 1.262 (patch)
	sys/netinet6/in6.c: revision 1.263
	sys/netinet/in.c: revision 1.216
	sys/netinet6/in6.c: revision 1.264
	sys/netinet6/nd6.c: revision 1.246 (patch)
	sys/netinet/if_arp.c: revision 1.269
	sys/net/if_llatbl.h: revision 1.14
	sys/netinet6/in6.c: revision 1.259
	sys/netinet/in.c: revision 1.220
	sys/netinet/in.c: revision 1.221 (patch)
	sys/netinet/in.c: revision 1.222
	sys/netinet/in.c: revision 1.223

Suppress noisy debugging outputs
Even if DEBUG they are too noisy under load.

Tweak sanity checks

Scheduling a timer of static entries is wrong.

Add assertions

We must not destroy llentries holding mbufs.

Fix reference leaks of llentry
callout_reset and callout_halt can cancel a pending callout without telling us.
Detect a cancel and remove a reference by using callout_pending and
callout_stop (it's a bit tricy though, we can detect it).
While here, we can remove remaining abuses of mutex_owned for softnet_lock.

Fix memory leaks on arp -d and ndp -d for static entries
We have to delete entries on in_lltable_delete and in6_lltable_delete
unconditionally.  Note that we don't need to worry about LLE_IFADDR because
there is no such entries now.

Use pool(9) for llentry allocations
llentry is easy to be leaked and pool suits for it because pool is usable to
detect leaks.

Also sweep unnecessary wrappers for llentry, in_llentry and in6_llentry.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Mar 6 07:27:55 2018 UTC (5 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Changes since 1.13: +4 -1 lines
Diff to previous 1.13 (colored)

Use pool(9) for llentry allocations

llentry is easy to be leaked and pool suits for it because pool is usable to
detect leaks.

Also sweep unnecessary wrappers for llentry, in_llentry and in6_llentry.

Revision 1.13.2.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:02 2017 UTC (6 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.13.2.1: +318 -0 lines
Diff to previous 1.13.2.1 (colored) to branchpoint 1.13 (colored) next main 1.14 (colored)

update from HEAD

Revision 1.10.8.2 / (download) - annotate - [select for diffs], Fri Nov 17 20:24:05 2017 UTC (6 years, 3 months ago) by snj
Branch: netbsd-8
Changes since 1.10.8.1: +5 -4 lines
Diff to previous 1.10.8.1 (colored) to branchpoint 1.10 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #353):
	sys/net/if_llatbl.c: 1.22
	sys/net/if_llatbl.h: 1.13
	sys/netinet/if_arp.c: 1.254
	sys/netinet/in.c: 1.208-1.209
	sys/netinet6/in6.c: 1.249-1.250
	sys/netinet6/nd6.c: 1.237
Remove redundant KASSERTMSG
The function is static, has just one caller and the caller does the same check.
--
Fix a deadlock between a route update and lltable
It happens because rtalloc1 is called from lltable with holding
IF_AFDATA_WLOCK.
If a route update is in action, rtalloc1 would wait for its completion with
holding IF_AFDATA_WLOCK. At the same moment, a softint (e.g., arpintr) may try
to take IF_AFDATA_WLOCK and get stuck on it. Unfortunately the stuck softint
prevents the route update from progressing because the route update calls
psref_target_destroy that needs the softint to complete.
A resource allocation graph of the senario looks like this:
    route update =(psref_target_destroy)=> softint => IF_AFDATA_WLOCK
    =(rt_update_wait)=> route update
Fix the deadlock by pulling rtalloc1 out of the lltable codes inside
IF_AFDATA_WLOCK.
Note that the deadlock happens only if NET_MPSAFE is enabled.

Revision 1.13.2.1, Fri Nov 10 07:24:28 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.13: +0 -318 lines
FILE REMOVED

file if_llatbl.h was added on branch tls-maxphys on 2017-12-03 11:39:02 +0000

Revision 1.13 / (download) - annotate - [select for diffs], Fri Nov 10 07:24:28 2017 UTC (6 years, 3 months ago) by ozaki-r
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, pgoyette-compat-base
Branch point for: tls-maxphys, pgoyette-compat
Changes since 1.12: +5 -4 lines
Diff to previous 1.12 (colored)

Fix a deadlock between a route update and lltable

It happens because rtalloc1 is called from lltable with holding
IF_AFDATA_WLOCK.

If a route update is in action, rtalloc1 would wait for its completion with
holding IF_AFDATA_WLOCK. At the same moment, a softint (e.g., arpintr) may try
to take IF_AFDATA_WLOCK and get stuck on it. Unfortunately the stuck softint
prevents the route update from progressing because the route update calls
psref_target_destroy that needs the softint to complete.

A resource allocation graph of the senario looks like this:
    route update =(psref_target_destroy)=> softint => IF_AFDATA_WLOCK
    =(rt_update_wait)=> route update

Fix the deadlock by pulling rtalloc1 out of the lltable codes inside
IF_AFDATA_WLOCK.

Note that the deadlock happens only if NET_MPSAFE is enabled.

Revision 1.2.2.7 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:11 2017 UTC (6 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.2.2.6: +4 -4 lines
Diff to previous 1.2.2.6 (colored) to branchpoint 1.2 (colored) next main 1.3 (colored)

Sync with HEAD

Revision 1.10.8.1 / (download) - annotate - [select for diffs], Fri Jul 7 13:57:26 2017 UTC (6 years, 7 months ago) by martin
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.10: +4 -4 lines
Diff to previous 1.10 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #107):
	usr.sbin/arp/arp.c: revision 1.56
	sys/net/rtsock.c: revision 1.218
	sys/net/if_llatbl.c: revision 1.20
	usr.sbin/arp/arp.c: revision 1.57
	sys/net/rtsock.c: revision 1.219
	sys/net/if_llatbl.c: revision 1.21
	usr.sbin/arp/arp.c: revision 1.58
	tests/net/net_common.sh: revision 1.19
	sys/netinet6/nd6.h: revision 1.84
	sys/netinet6/nd6.h: revision 1.85
	tests/net/arp/t_arp.sh: revision 1.23
	sys/netinet6/in6.c: revision 1.246
	tests/net/arp/t_arp.sh: revision 1.24
	sys/netinet6/in6.c: revision 1.247
	tests/net/arp/t_arp.sh: revision 1.25
	sys/netinet6/in6.c: revision 1.248
	tests/net/arp/t_arp.sh: revision 1.26
	usr.sbin/ndp/ndp.c: revision 1.49
	tests/net/arp/t_arp.sh: revision 1.27
	tests/net/ndp/t_ndp.sh: revision 1.20
	tests/net/arp/t_arp.sh: revision 1.28
	tests/net/ndp/t_ndp.sh: revision 1.21
	tests/net/arp/t_arp.sh: revision 1.29
	tests/net/ndp/t_ndp.sh: revision 1.22
	tests/net/ndp/t_ndp.sh: revision 1.23
	tests/net/route/t_flags6.sh: revision 1.13
	tests/net/ndp/t_ndp.sh: revision 1.24
	tests/net/route/t_flags6.sh: revision 1.14
	tests/net/ndp/t_ndp.sh: revision 1.25
	tests/net/route/t_flags6.sh: revision 1.15
	tests/net/ndp/t_ndp.sh: revision 1.26
	sbin/route/rtutil.c: revision 1.9
	tests/net/ndp/t_ndp.sh: revision 1.27
	tests/net/ndp/t_ndp.sh: revision 1.28
	tests/net/net/t_ipv6address.sh: revision 1.14
	tests/net/ndp/t_ra.sh: revision 1.28
	tests/net/ndp/t_ndp.sh: revision 1.29
	sys/net/route.h: revision 1.113
	tests/net/ndp/t_ra.sh: revision 1.29
	sys/net/rtsock.c: revision 1.220
	sys/net/rtsock.c: revision 1.221
	sys/net/rtsock.c: revision 1.222
	sys/net/rtsock.c: revision 1.223
	tests/net/route/t_route.sh: revision 1.13
	sys/net/rtsock.c: revision 1.224
	sys/net/route.c: revision 1.196
	sys/net/if_llatbl.c: revision 1.19
	sys/net/route.c: revision 1.197
	sbin/route/route.c: revision 1.156
	tests/net/route/t_flags.sh: revision 1.16
	tests/net/route/t_flags.sh: revision 1.17
	usr.sbin/ndp/ndp.c: revision 1.50
	tests/net/route/t_flags.sh: revision 1.18
	sys/netinet/in.c: revision 1.204
	tests/net/route/t_flags.sh: revision 1.19
	sys/netinet/in.c: revision 1.205
	tests/net/arp/t_arp.sh: revision 1.30
	tests/net/arp/t_arp.sh: revision 1.31
	sys/net/if_llatbl.h: revision 1.11
	tests/net/arp/t_arp.sh: revision 1.32
	sys/net/if_llatbl.h: revision 1.12
	tests/net/arp/t_arp.sh: revision 1.33
	sys/netinet6/nd6.c: revision 1.233
	sys/netinet6/nd6.c: revision 1.234
	sys/netinet/if_arp.c: revision 1.251
	sys/netinet6/nd6.c: revision 1.235
	sys/netinet/if_arp.c: revision 1.252
	sbin/route/route.8: revision 1.57
	sys/net/rtsock.c: revision 1.214
	sys/net/rtsock.c: revision 1.215
	sys/net/rtsock.c: revision 1.216
	sys/net/rtsock.c: revision 1.217
whitespace police
Simplify
We can assume that rt_ifp is always non-NULL.
Sending a routing message (RTM_ADD) on adding an llentry
A message used to be sent on adding a cloned route. Restore the
behavior for backward compatibility.
Requested by ryo@
Drop RTF_CONNECTED from a result of RTM_GET for ARP/NDP entries
ARP/NDP entries aren't connected routes.
Reported by ryo@
Support -c <count> option for route monitor
route command exits if it receives <count> routing messages where
<count> is a value specified by -c.
The option is useful to get only particular message(s) in a test script.
Test routing messages emitted on operations of ARP/NDP entries
Do netstat -a for an appropriate protocol
Add missing declarations for cleanup
Set net.inet.arp.keep only if it's required
Don't create a permanent L2 cache entry on adding an address to an interface
It was created to copy FreeBSD, however actually the cache isn't
necessary. Remove it to simplify the code and reduce the cost to
maintain it (e.g., keep a consistency with a corresponding local
route).
Fix typo
Fix in_lltable_match_prefix
The function has not been used but will be used soon.
Remove unused function (nd6_rem_ifa_lle)
Allow in6_lltable_free_entry to be called without holding the afdata lock of ifp as well as in_lltable_free_entry
This behavior is a bit odd and should be fixed in the future...
Purge ARP/NDP entries on an interface when the interface is down
Fix PR kern/51179
Purge all related L2 caches on removing a route
The change addresses situations similar to PR 51179.
Purge L2 caches on changing an interface of a route
The change addresses situations similar to PR 51179.
Test implicit removals of ARP/NDP entries
One test case reproudces PR 51179.
Fix build of kernels without both INET and INET6
Tweak lltable_sysctl_dumparp
- Rename lltable_sysctl_dumparp to lltable_sysctl_dump
  because it's not only for ARP
- Enable it not only for INET but also for INET6
Fix usage of routing messages on arp -d and ndp -d
It didn't work as we expected; we should set RTA_GATEWAY not
RTA_IFP on RTM_GET to return an if_index and the kernel should
use it on RTM_DELETE.
Improve backward compatibility of (fake) routing messages on adding an ARP/NDP entry
A message originally included only DST and GATEWAY. Restore it.
Fix ifdef; care about a case w/ INET6 and w/o INET
Drop RTF_UP from a routing message of a deleted ARP/NDP entry
Check existence of ARP/NDP entries
Checking ARP/NDP entries is valid rather than checking routes.
Fix wrong comment
Drop RTF_LLINFO flag (now it's RTF_LLDATA) from local routes
They don't have llinfo anymore. And also the change fixes unexpected
behavior of ARP proxy.
Restore ARP/NDP entries to route show and netstat -r
Requested by dyoung@ some time ago
Enable to remove multiple ARP/NDP entries for one destination
The kernel can have multiple ARP/NDP entries which have an indentical
destination on different interfaces. This is normal and can be
reproduce easily by ping -I or ping6 -S. We should be able to remove
such entries.
arp -d <ip> and ndp -d <ip> are changed to fetch all ARP/NDP entries
and remove matched entries. So we can remove multiple entries
described above. This fetch all and selective removal behavior is
the same as arp <ip> and ndp <ip>; they also do fetch all entries
and show only matched entries.
Related to PR 51179
Check if ARP/NDP entries are purged when a related route is deleted

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jun 23 05:46:10 2017 UTC (6 years, 8 months ago) by ozaki-r
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

Tweak lltable_sysctl_dumparp

- Rename lltable_sysctl_dumparp to lltable_sysctl_dump
  because it's not only for ARP
- Enable it not only for INET but also for INET6

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jun 22 09:56:48 2017 UTC (6 years, 8 months ago) by ozaki-r
Branch: MAIN
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

Purge all related L2 caches on removing a route

The change addresses situations similar to PR 51179.

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

Sync with HEAD

Revision 1.9.2.1 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:50 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.10 / (download) - annotate - [select for diffs], Wed Dec 21 08:47:02 2016 UTC (7 years, 2 months ago) by ozaki-r
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, nick-nhusb-base-20170204, netbsd-8-base, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (colored)

Fix deadlock between llentry timers and destruction of llentry

llentry timer (of nd6) holds both llentry's lock and softnet_lock.
A caller also holds them and calls callout_halt to wait for the
timer to quit. However we can pass only one lock to callout_halt,
so passing either of them can cause a deadlock. Fix it by avoid
calling callout_halt without holding llentry's lock.

BTW in the first place we cannot pass llentry's lock to callout_halt
because it's a rwlock...

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

Sync with HEAD

Revision 1.9 / (download) - annotate - [select for diffs], Mon Apr 4 07:37:07 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.8: +8 -6 lines
Diff to previous 1.8 (colored)

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.2.2.4 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:32 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.2.2.3: +1 -34 lines
Diff to previous 1.2.2.3 (colored) to branchpoint 1.2 (colored)

Sync with HEAD

Revision 1.8 / (download) - annotate - [select for diffs], Tue Feb 16 01:31:26 2016 UTC (8 years ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319
Changes since 1.7: +1 -34 lines
Diff to previous 1.7 (colored)

Remove workaround for GATEWAY

The workaround was introduced because lltable/llentry uses rwlock
but it may be executed in hardware interrupt due to fast forward.
Now we don't run fast forward in hardware interrupt anymore, so
we can remove the workaround.

Revision 1.2.2.3 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:07 2015 UTC (8 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.2.2.2: +76 -9 lines
Diff to previous 1.2.2.2 (colored) to branchpoint 1.2 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.7 / (download) - annotate - [select for diffs], Thu Dec 17 02:38:33 2015 UTC (8 years, 2 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226
Changes since 1.6: +6 -3 lines
Diff to previous 1.6 (colored)

Fix memory leak of llentry#la_opaque

llentry#la_opaque which is for token ring is allocated in arp.c
and freed in arp.c when freeing llentry. However, llentry can be
freed from other places, e.g., lltable_free. In such cases,
la_opaque is never freed.

To fix that, add a new callback (lle_ll_free) to llentry and
register a destruction function of la_opque to it. On freeing a
llentry, we can surely free la_opque via the callback.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Nov 25 06:21:26 2015 UTC (8 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.5: +14 -1 lines
Diff to previous 1.5 (colored)

Use lltable/llentry for NDP

lltable and llentry were introduced to replace ARP cache data structure
for further restructuring of the routing table: L2 nexthop cache
separation. This change replaces the NDP cache data structure
(llinfo_nd6) with them as well as ARP.

One noticeable change is for neighbor cache GC mechanism that was
introduced to prevent IPv6 DoS attacks. net.inet6.ip6.neighborgcthresh
was the max number of caches that we store in the system. After
introducing lltable/llentry, the value is changed to be per-interface
basis because lltable/llentry stores neighbor caches in each interface
separately. And the change brings one degradation; the old GC mechanism
dropped exceeded packets based on LRU while the new implementation drops
packets in order from the beginning of lltable (a hash table + linked
lists). It would be improved in the future.

Added functions in in6.c come from FreeBSD (as of r286629) and are
tweaked for NetBSD.

Proposed on tech-kern and tech-net.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Nov 5 06:50:51 2015 UTC (8 years, 3 months ago) by ozaki-r
Branch: MAIN
Changes since 1.4: +24 -11 lines
Diff to previous 1.4 (colored)

Improve lock traces and add reference traces

Revision 1.4 / (download) - annotate - [select for diffs], Fri Oct 9 01:50:09 2015 UTC (8 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

Fix LLE_TRY_UPGRADE when GATEWAY

It's expected to return a value.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Sep 30 07:12:32 2015 UTC (8 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.2: +39 -1 lines
Diff to previous 1.2 (colored)

Make GATEWAY (fastforward) work again

With GATEWAY (fastforward), the whole forwarding processing runs in
hardware interrupt context. So we cannot use rwlock for lltable and
llentry in that case.

This change replaces rwlock with mutex(IPL_NET) for lltable and llentry
when GATEWAY is enabled. We need to tweak locking only around rtree
in lltable_free. Other than that, what we need to do is to change macros
for locks.

I hope fastforward runs in softint some day in the future...

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

Sync with HEAD

Revision 1.2.2.1, Mon Aug 31 08:05:20 2015 UTC (8 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.2: +0 -280 lines
FILE REMOVED

file if_llatbl.h was added on branch nick-nhusb on 2015-09-22 12:06:10 +0000

Revision 1.2 / (download) - annotate - [select for diffs], Mon Aug 31 08:05:20 2015 UTC (8 years, 5 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Branch point for: nick-nhusb
Changes since 1.1: +25 -6 lines
Diff to previous 1.1 (colored)

Replace ARP cache (llinfo) with lltable/llentry

Highlights of the change are:
- Use llentry instead of llinfo to manage ARP caches
  - ARP specific data are stored in the hashed list
    of an interface instead of the global list (llinfo_arp)
- Fine-grain locking on llentry
- arptimer (callout) per ARP cache
  - the global timer callout with the big locks can be
    removed (though softnet_lock is still required for now)
- net.inet.arp.prune is now obsoleted
  - it was the interval of the global timer callout
- net.inet.arp.refresh is now obsoleted
  - it was a parameter that prevents expiration of active caches
  - Removed to simplify the timer logic, but we may be able to
    restore the feature if really needed

Proposed on tech-kern and tech-net.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Aug 31 07:56:58 2015 UTC (8 years, 5 months ago) by ozaki-r
Branch: MAIN

Import lltable/llentry from FreeBSD

lltable/llentry is new L2 nexthop cache data structures that
store caches in each interface (struct ifnet). It is imported
to replace the current ARP cache implementation that uses the
global list with the big kernel lock, and provide fine-grain
locking for cache operations. It is also planned to replace
NDP caches.

The code is based on FreeBSD's lltable/llentry as of r286629
and tweaked for NetBSD.

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




CVSweb <webmaster@jp.NetBSD.org>