So I have tracked down the bug to the fact in /sys/kern/uipc_socket2.c
of this code fragment in sbreserver():

     if ((u_quad_t)cc > (u_quad_t)sb_max * MCLBYTES / (MSIZE + MCLBYTES))
          return (0);

So why is the test not just this:

     if ((u_quad_t)cc > (u_quad_t)sb_max)
          return (0);

- JimP

----------  Forwarded Message  ----------
Subject: kern.ipc.maxsockbuf setting does not work
Date: Thu, 24 Aug 2000 10:21:02 -0700
From: Jim Pirzyk <[EMAIL PROTECTED]>


I am running a 4.1-RELEASE i386 system and I am trying to increase the
maxsockbuf size so I set it in /etc/sysctl.conf like this:

kern.ipc.maxsockbuf=524288

And on bootup I see 

kern.ipc.maxsockbuf: 262144 -> 524288

but when I try to use a larger buffer I get:

pirzyk@snoopy:/sys/kern
10>ttcp -r -w512
ttcp-r: buflen=65536, nbuf=2048, align=16384/0, port=5001, sockbufsize=524288  tcp
ttcp-r: socket
ttcp-r: setsockopt: sndbuf: No buffer space available
errno=55

But this should work.  Seems the kernel is keeping the old value of
262144.  Now I can change it in /usr/include/sys/socketvar.h (SB_MAX)
and rebuild the kernel but I do not think this is what was designed.

- JimP

 -- 
--- @(#) $Id: dot.signature,v 1.9 2000/07/10 16:43:05 pirzyk Exp $
    __o   [EMAIL PROTECTED] -------------------------------------
 _'\<,_   Senior Systems Engineer, Walt Disney Feature Animation 
(*)/ (*)
-------------------------------------------------------

-- 
--- @(#) $Id: dot.signature,v 1.9 2000/07/10 16:43:05 pirzyk Exp $
    __o   [EMAIL PROTECTED] -------------------------------------
 _'\<,_   Senior Systems Engineer, Walt Disney Feature Animation 
(*)/ (*)  


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to