Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Aug 2000 13:24:01 -0700
From:      Jim Pirzyk <Jim.Pirzyk@disney.com>
To:        freebsd-hackers@freebsd.org
Subject:   Fwd: kern.ipc.maxsockbuf setting does not work
Message-ID:  <00082413254801.00439@snoopy.fan.fa.disney.com>

next in thread | raw e-mail | index | archive | help
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 <Jim.Pirzyk@disney.com>


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   Jim.Pirzyk@disney.com -------------------------------------
 _'\<,_   Senior Systems Engineer, Walt Disney Feature Animation 
(*)/ (*)
-------------------------------------------------------

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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00082413254801.00439>