Hi! > This is what is written in kernel source (net/core/sock.c): > > sk->sk_sndbuf = max_t(u32, val * 2, SOCK_MIN_SNDBUF); > ... > /* > * We double it on the way in to account for > * "struct sk_buff" etc. overhead. Applications > * assume that the SO_RCVBUF setting they make will > * allow that much actual data to be received on that > * socket. > * > * Applications are unaware that "struct sk_buff" and > * other overheads allocate from the receive buffer > * during socket buffer allocation. > * > * And after considering the possible alternatives, > * returning the value we actually used in getsockopt > * is the most desirable behavior. > */ > > sk->sk_rcvbuf = max_t(u32, val * 2, SOCK_MIN_RCVBUF); > > I'm not sure why it is not just 'val', because it chooses the maximum > value in any case and we have defined minimum.
Ok. The patch is fine then. -- Cyril Hrubis chru...@suse.cz ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list