From owner-freebsd-net Fri Mar 22 17:19:46 2002 Delivered-To: freebsd-net@freebsd.org Received: from verniernetworks.com (dns.verniernetworks.com [65.192.41.225]) by hub.freebsd.org (Postfix) with ESMTP id 2D98B37B400 for ; Fri, 22 Mar 2002 17:19:43 -0800 (PST) Received: from getafix.verniernetworks.com (getafix.verniernetworks.com [192.168.10.172]) by verniernetworks.com (8.11.6/8.11.0) with ESMTP id g2N1J7q17555; Fri, 22 Mar 2002 17:19:07 -0800 (PST) (envelope-from dinesh@getafix.verniernetworks.com) Received: from localhost (dinesh@localhost) by getafix.verniernetworks.com (8.11.6/8.11.6) with ESMTP id g2N1VUd60166; Fri, 22 Mar 2002 17:31:30 -0800 (PST) (envelope-from dinesh@getafix.verniernetworks.com) Date: Fri, 22 Mar 2002 17:31:30 -0800 (PST) From: Dinesh Nambisan To: freebsd-net@freebsd.org Cc: julian@elischer.org Subject: Socket buffer size limitation Message-ID: <20020322172352.R60156-100000@getafix.verniernetworks.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello, I have a situation where I'm trying to set the send and receive buffer sizes on a socket to large values like 1 MB or so (dont ask why :-), simple reason being we need it); and setsockopt for setting the buffer sizes seems to fail with ENOBUFS. On looking at the code in uipc_socket.c where it handles the SO_SNDBUF & SO_RCVBUF options, and the code in uipc_socket2.c where it actually tries to reserve space (in sbreserve function_, the issue seems to be a limit imposed by the code to approx 227K or so [ sb_max(=256) * MCLBYTES / (MSIZE + MCLBYTES) ; which works out to approx 227 K on my platform] Was wondering if anyone could explain as to why this limit is there ? Thanks in advance, Dinesh Nambisan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message