Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-8] src



Module Name:    src
Committed By:   snj
Date:           Tue Oct 24 08:55:56 UTC 2017

Modified Files:
        src/distrib/sets/lists/tests [netbsd-8]: mi
        src/sys/net [netbsd-8]: route.c route.h
        src/sys/netatalk [netbsd-8]: at_proto.c
        src/sys/netinet [netbsd-8]: in_proto.c
        src/sys/netinet6 [netbsd-8]: in6_proto.c
        src/sys/netmpls [netbsd-8]: mpls_proto.c
        src/sys/netnatm [netbsd-8]: natm_proto.c
        src/sys/rump/net/lib/libsockin [netbsd-8]: sockin.c
        src/sys/sys [netbsd-8]: domain.h
        src/tests/net/route [netbsd-8]: Makefile
Added Files:
        src/tests/net/route [netbsd-8]: t_rtcache.sh

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #305):
        distrib/sets/lists/tests/mi: revision 1.762
        sys/net/route.c: revision 1.198-1.201
        sys/net/route.h: revision 1.114
        sys/netatalk/at_proto.c: revision 1.22
        sys/netinet/in_proto.c: revision 1.124
        sys/netinet6/in6_proto.c: revision 1.118
        sys/netmpls/mpls_proto.c: revision 1.31
        sys/netnatm/natm_proto.c: revision 1.18
        sys/rump/net/lib/libsockin/sockin.c: revision 1.65
        sys/sys/domain.h: revision 1.33
        tests/net/route/Makefile: revision 1.6
        tests/net/route/t_rtcache.sh: revision 1.1
Add tests of rtcache invalidation
Remove unnecessary NULL check of rt_ifp
It's always non-NULL.
Invalidate rtcache based on a global generation counter
The change introduces a global generation counter that is incremented when any
routes have been added or deleted. When a rtcache caches a rtentry into itself,
it also stores a snapshot of the generation counter. If the snapshot equals to
the global counter, the cache is still valid, otherwise invalidated.
One drawback of the change is that all rtcaches of all protocol families are
invalidated when any routes of any protocol families are added or deleted.
If that matters, we should have separate generation counters based on
protocol families.
This change removes LIST_ENTRY from struct route, which fixes a part of
PR kern/52515.
Remove the global lock for rtcache
Thanks to removal of LIST_ENTRY of struct route, rtcaches are accessed only by
their users. And in existing usages a rtcache is guranteed to be not accessed
simultaneously. So the rtcache framework doesn't need any exclusion controls
in itself.
Synchronize on rtcache_generation with rtlock
It's racy if NET_MPSAFE is enabled.
Pointed out by joerg@


To generate a diff of this commit:
cvs rdiff -u -r1.752.2.4 -r1.752.2.5 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.194.6.2 -r1.194.6.3 src/sys/net/route.c
cvs rdiff -u -r1.112.4.1 -r1.112.4.2 src/sys/net/route.h
cvs rdiff -u -r1.21 -r1.21.10.1 src/sys/netatalk/at_proto.c
cvs rdiff -u -r1.123.4.1 -r1.123.4.2 src/sys/netinet/in_proto.c
cvs rdiff -u -r1.117.4.1 -r1.117.4.2 src/sys/netinet6/in6_proto.c
cvs rdiff -u -r1.30 -r1.30.8.1 src/sys/netmpls/mpls_proto.c
cvs rdiff -u -r1.17 -r1.17.8.1 src/sys/netnatm/natm_proto.c
cvs rdiff -u -r1.64 -r1.64.8.1 src/sys/rump/net/lib/libsockin/sockin.c
cvs rdiff -u -r1.32 -r1.32.10.1 src/sys/sys/domain.h
cvs rdiff -u -r1.5 -r1.5.6.1 src/tests/net/route/Makefile
cvs rdiff -u -r0 -r1.1.2.2 src/tests/net/route/t_rtcache.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index