#
f8cb308b |
| 19-Nov-2022 |
yamt <yamt@NetBSD.org> |
Make arp have its own mowner
This helped me to debug mbuf leaks in arp. (if_arp.c rev. 1.298)
|
#
e158be47 |
| 14-Sep-2020 |
roy <roy@NetBSD.org> |
nd: Name l3addr union of llentry and use in-place of nd_addr.
Probably makes more sense and makes nd.h less messy.
|
#
927f1f5a |
| 18-Jul-2019 |
ozaki-r <ozaki-r@NetBSD.org> |
Show pointers of llentries on trace logs of LLE_REF_TRACE
|
#
377bbfc9 |
| 12-Jul-2018 |
ozaki-r <ozaki-r@NetBSD.org> |
Don't use aprint_* functions for logging unrelated to autoconf(9)
|
#
bd4e68b7 |
| 19-Apr-2018 |
christos <christos@NetBSD.org> |
s/static inline/static __inline/g for consistency.
|
#
189cfbc9 |
| 06-Mar-2018 |
ozaki-r <ozaki-r@NetBSD.org> |
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_llentr
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.
show more ...
|
#
b60bf79e |
| 10-Nov-2017 |
ozaki-r <ozaki-r@NetBSD.org> |
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 comple
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.
show more ...
|
#
d771f652 |
| 23-Jun-2017 |
ozaki-r <ozaki-r@NetBSD.org> |
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
|
#
0162254b |
| 22-Jun-2017 |
ozaki-r <ozaki-r@NetBSD.org> |
Purge all related L2 caches on removing a route
The change addresses situations similar to PR 51179.
|
#
2b1f964f |
| 21-Dec-2016 |
ozaki-r <ozaki-r@NetBSD.org> |
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 time
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...
show more ...
|
#
2c3eb313 |
| 04-Apr-2016 |
ozaki-r <ozaki-r@NetBSD.org> |
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 int
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
show more ...
|
#
280329d0 |
| 16-Feb-2016 |
ozaki-r <ozaki-r@NetBSD.org> |
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 har
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.
show more ...
|
#
fc09b378 |
| 17-Dec-2015 |
ozaki-r <ozaki-r@NetBSD.org> |
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., l
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.
show more ...
|
#
be29d8c9 |
| 25-Nov-2015 |
ozaki-r <ozaki-r@NetBSD.org> |
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
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.
show more ...
|
#
62650fdc |
| 05-Nov-2015 |
ozaki-r <ozaki-r@NetBSD.org> |
Improve lock traces and add reference traces
|
#
51d14aac |
| 09-Oct-2015 |
ozaki-r <ozaki-r@NetBSD.org> |
Fix LLE_TRY_UPGRADE when GATEWAY
It's expected to return a value.
|
#
a3a0087c |
| 30-Sep-2015 |
ozaki-r <ozaki-r@NetBSD.org> |
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.
T
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...
show more ...
|
#
5b6acd3b |
| 31-Aug-2015 |
ozaki-r <ozaki-r@NetBSD.org> |
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 inter
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.
show more ...
|
#
76b6a560 |
| 31-Aug-2015 |
ozaki-r <ozaki-r@NetBSD.org> |
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 implem
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.
show more ...
|