#
f35baba8 |
| 05-Feb-2008 |
yamt <yamt@NetBSD.org> |
- start tcp timestamp from 1 instead of 0. - add a comment to explain why: + * We start with 1, because 0 doesn't work with linux, which + * considers timestamp 0 in a SYN packet as a b
- start tcp timestamp from 1 instead of 0. - add a comment to explain why: + * We start with 1, because 0 doesn't work with linux, which + * considers timestamp 0 in a SYN packet as a bug and disables + * timestamps.
show more ...
|
#
2d4e7e58 |
| 14-Jan-2008 |
dyoung <dyoung@NetBSD.org> |
Use rtcache_validate() instead of rtcache_getrt(). Shorten staircase in in_losing().
|
#
7080c9db |
| 20-Dec-2007 |
martin <martin@NetBSD.org> |
A few missing ifdefs to make non-INET6 kernels build again.
|
#
72fa642a |
| 20-Dec-2007 |
dyoung <dyoung@NetBSD.org> |
Poison struct route->ro_rt uses in the kernel by changing the name to _ro_rt. Use rtcache_getrt() to access a route cache's struct rtentry *.
Introduce struct ifnet->if_dl that always points at the
Poison struct route->ro_rt uses in the kernel by changing the name to _ro_rt. Use rtcache_getrt() to access a route cache's struct rtentry *.
Introduce struct ifnet->if_dl that always points at the interface identifier/link-layer address. Make code that treated the first ifaddr on struct ifnet->if_addrlist as the interface address use if_dl, instead.
Remove stale debugging code from net/route.c. Move the rtflush() code into rtcache_clear() and delete rtflush(). Delete rtalloc(), because nothing uses it any more.
Make ND6_HINT an inline, lowercase subroutine, nd6_hint.
I've done my best to convert IP Filter, the ISO stack, and the AppleTalk stack to rtcache_getrt(). They compile, but I have not tested them. I have given the changes to PF, GRE, IPv4 and IPv6 stacks a lot of exercise.
show more ...
|
#
4175f869 |
| 02-Aug-2007 |
rmind <rmind@NetBSD.org> |
TCP socket buffers automatic sizing - ported from FreeBSD. http://mail-index.netbsd.org/tech-net/2007/02/04/0006.html
! Disabled by default, marked as experimental. Testers are very needed. ! Someon
TCP socket buffers automatic sizing - ported from FreeBSD. http://mail-index.netbsd.org/tech-net/2007/02/04/0006.html
! Disabled by default, marked as experimental. Testers are very needed. ! Someone should thoroughly test this, and improve if possible.
Discussed on <tech-net>: http://mail-index.netbsd.org/tech-net/2007/07/12/0002.html Thanks Greg Troxel for comments.
OK by the long silence on <tech-net>.
show more ...
|
#
08e6f222 |
| 19-Jul-2007 |
dyoung <dyoung@NetBSD.org> |
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 funct
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.
show more ...
|
#
88ab7da9 |
| 09-Jul-2007 |
ad <ad@NetBSD.org> |
Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes - select()/poll() improvements - miscellaneous MT safety improvements
|
#
eeff1895 |
| 20-Jun-2007 |
christos <christos@NetBSD.org> |
- per socket keepalive settings - settable connection establishment timeout
|
#
72f0a6df |
| 02-May-2007 |
dyoung <dyoung@NetBSD.org> |
Eliminate address family-specific route caches (struct route, struct route_in6, struct route_iso), replacing all caches with a struct route.
The principle benefit of this change is that all of the p
Eliminate address family-specific route caches (struct route, struct route_in6, struct route_iso), replacing all caches with a struct route.
The principle benefit of this change is that all of the protocol families can benefit from route cache-invalidation, which is necessary for correct routing. Route-cache invalidation fixes an ancient PR, kern/3508, at long last; it fixes various other PRs, also.
Discussions with and ideas from Joerg Sonnenberger influenced this work tremendously. Of course, all design oversights and bugs are mine.
DETAILS
1 I added to each address family a pool of sockaddrs. I have introduced routines for allocating, copying, and duplicating, and freeing sockaddrs:
struct sockaddr *sockaddr_alloc(sa_family_t af, int flags); struct sockaddr *sockaddr_copy(struct sockaddr *dst, const struct sockaddr *src); struct sockaddr *sockaddr_dup(const struct sockaddr *src, int flags); void sockaddr_free(struct sockaddr *sa);
sockaddr_alloc() returns either a sockaddr from the pool belonging to the specified family, or NULL if the pool is exhausted. The returned sockaddr has the right size for that family; sa_family and sa_len fields are initialized to the family and sockaddr length---e.g., sa_family = AF_INET and sa_len = sizeof(struct sockaddr_in). sockaddr_free() puts the given sockaddr back into its family's pool.
sockaddr_dup() and sockaddr_copy() work analogously to strdup() and strcpy(), respectively. sockaddr_copy() KASSERTs that the family of the destination and source sockaddrs are alike.
The 'flags' argumet for sockaddr_alloc() and sockaddr_dup() is passed directly to pool_get(9).
2 I added routines for initializing sockaddrs in each address family, sockaddr_in_init(), sockaddr_in6_init(), sockaddr_iso_init(), etc. They are fairly self-explanatory.
3 structs route_in6 and route_iso are no more. All protocol families use struct route. I have changed the route cache, 'struct route', so that it does not contain storage space for a sockaddr. Instead, struct route points to a sockaddr coming from the pool the sockaddr belongs to. I added a new method to struct route, rtcache_setdst(), for setting the cache destination:
int rtcache_setdst(struct route *, const struct sockaddr *);
rtcache_setdst() returns 0 on success, or ENOMEM if no memory is available to create the sockaddr storage.
It is now possible for rtcache_getdst() to return NULL if, say, rtcache_setdst() failed. I check the return value for NULL everywhere in the kernel.
4 Each routing domain (struct domain) has a list of live route caches, dom_rtcache. rtflushall(sa_family_t af) looks up the domain indicated by 'af', walks the domain's list of route caches and invalidates each one.
show more ...
|
#
59d979c5 |
| 12-Mar-2007 |
ad <ad@NetBSD.org> |
Pass an ipl argument to pool_init/POOL_INIT to be used when initializing the pool's lock.
|
#
53524e44 |
| 04-Mar-2007 |
christos <christos@NetBSD.org> |
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
|
#
5493f188 |
| 17-Feb-2007 |
dyoung <dyoung@NetBSD.org> |
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
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.
show more ...
|
#
e2211411 |
| 10-Feb-2007 |
degroote <degroote@NetBSD.org> |
Commit my SoC work Add ipv6 support for fast_ipsec Note that currently, packet with extensions headers are not correctly supported Change the ipcomp logic
|
#
8836e599 |
| 06-Dec-2006 |
yamt <yamt@NetBSD.org> |
add some more tcp mowners.
|
#
168cd830 |
| 16-Nov-2006 |
christos <christos@NetBSD.org> |
__unused removal on arguments; approved by core.
|
#
81463c93 |
| 19-Oct-2006 |
yamt <yamt@NetBSD.org> |
implement RFC3465 appropriate byte counting. from Kentaro A. Kurahone, with minor adjustments by me. the ack prediction part of the original patch was omitted because it's a separate change. reviewe
implement RFC3465 appropriate byte counting. from Kentaro A. Kurahone, with minor adjustments by me. the ack prediction part of the original patch was omitted because it's a separate change. reviewed by Rui Paulo.
show more ...
|
#
372e6ef3 |
| 17-Oct-2006 |
dogcow <dogcow@NetBSD.org> |
now that we have -Wno-unused-parameter, back out all the tremendously ugly code to gratuitously access said parameters.
|
#
44603cac |
| 13-Oct-2006 |
dogcow <dogcow@NetBSD.org> |
more unused variable fallout.
|
#
4d595fd7 |
| 12-Oct-2006 |
christos <christos@NetBSD.org> |
- sprinkle __unused on function decls. - fix a couple of unused bugs - no more -Wno-unused for i386
|
#
55ddfc9a |
| 10-Oct-2006 |
dogcow <dogcow@NetBSD.org> |
change the MOWNER_INIT define to take two args; fix extant struct mowner decls to use it. Makes options MBUFTRACE compile again and not whinge about missing structure declarations. (Also makes initia
change the MOWNER_INIT define to take two args; fix extant struct mowner decls to use it. Makes options MBUFTRACE compile again and not whinge about missing structure declarations. (Also makes initialization consistent.)
show more ...
|
#
f3330397 |
| 09-Oct-2006 |
rpaulo <rpaulo@NetBSD.org> |
Modular (I tried ;-) TCP congestion control API. Whenever certain conditions happen in the TCP stack, this interface calls the specified callback to handle the situation according to the currently se
Modular (I tried ;-) TCP congestion control API. Whenever certain conditions happen in the TCP stack, this interface calls the specified callback to handle the situation according to the currently selected congestion control algorithm. A new sysctl node was created: net.inet.tcp.congctl.{available,selected} with obvious meanings. The old net.inet.tcp.newreno MIB was removed. The API is discussed in tcp_congctl(9).
In the near future, it will be possible to selected a congestion control algorithm on a per-socket basis.
Discussed on tech-net and reviewed by <yamt>.
show more ...
|
#
38fb8d4a |
| 07-Oct-2006 |
yamt <yamt@NetBSD.org> |
revert tcp_close part of tcp_subr.c rev.1.200 because it's unnecessary. all callers of tcp_close are at splsoftnet already: tcp_close tcp_input ok tcp_disconnect tcp_usrreq ok tcp_usrclosed
revert tcp_close part of tcp_subr.c rev.1.200 because it's unnecessary. all callers of tcp_close are at splsoftnet already: tcp_close tcp_input ok tcp_disconnect tcp_usrreq ok tcp_usrclosed tcp_usrreq ok tcp_disconnect tcp_timer_2msl ok tcp_drop tcp_usrreq tcp_disconnect tcp_timer_rexmt ok tcp_timer_persist ok tcp_timer_keep ok tcp_input syn_cache_get tcp_input
show more ...
|
#
8cc016b4 |
| 05-Oct-2006 |
tls <tls@NetBSD.org> |
Protect calls to pool_put/pool_get that may occur in interrupt context with spl used to protect other allocations and frees, or datastructure element insertion and removal, in adjacent code.
It is a
Protect calls to pool_put/pool_get that may occur in interrupt context with spl used to protect other allocations and frees, or datastructure element insertion and removal, in adjacent code.
It is almost unquestionably the case that some of the spl()/splx() calls added here are superfluous, but it really seems wrong to see:
s=splfoo(); /* frob data structure */ splx(s); pool_put(x);
and if we think we need to protect the first operation, then it is hard to see why we should not think we need to protect the next. "Better safe than sorry".
It is also almost unquestionably the case that I missed some pool gets/puts from interrupt context with my strategy for finding these calls; use of PR_NOWAIT is a strong hint that a pool may be used from interrupt context but many callers in the kernel pass a "can wait/can't wait" flag down such that my searches might not have found them. One notable area that needs to be looked at is pf.
See also:
http://mail-index.netbsd.org/tech-kern/2006/07/19/0003.html http://mail-index.netbsd.org/tech-kern/2006/07/19/0009.html
show more ...
|
#
2fb2ae32 |
| 05-Sep-2006 |
rpaulo <rpaulo@NetBSD.org> |
Import of TCP ECN algorithm for congestion control. Both available for IPv4 and IPv6. Basic implementation test results are available at http://netbsd-soc.sourceforge.net/projects/ecn/testresults.htm
Import of TCP ECN algorithm for congestion control. Both available for IPv4 and IPv6. Basic implementation test results are available at http://netbsd-soc.sourceforge.net/projects/ecn/testresults.html.
Work sponsored by the Google Summer of Code project 2006. Special thanks to Kentaro Kurahone, Allen Briggs and Matt Thomas for their help, comments and support during the project.
show more ...
|
#
ddb5372e |
| 15-Apr-2006 |
christos <christos@NetBSD.org> |
Coverity CID 1149: Add KASSERT before deref.
|