hi,
I do not understand why setting SO_SNDBUF with
res = BUFSIZE;
err = setsockopt(s, SOL_SOCKET, SO_SNDBUF, &res, len);
actually sets the buffer size to 2*BUFSIZE. What is the reason for that?
The corresponding code fragment is in sock.c, int sock_setsockopt(...
213
214 if (val > sysctl_wmem_max)
215 val = sysctl_wmem_max;
216
217 !!!!! sk->sndbuf = max(val*2,2048);
218
219 /*
220 * Wake up sending tasks if we
221 * upped the value.
222 */
223 sk->write_space(sk);
224 break;
... same for SO_RECVBUF
thank you
reto
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:12 EST