From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 26 17:08:29 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 93B8B16A417; Tue, 26 Sep 2006 17:08:29 +0000 (UTC) (envelope-from maksim.yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E41A43DB7; Tue, 26 Sep 2006 17:07:53 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id 6F9723BE6D; Tue, 26 Sep 2006 12:07:52 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 22281-01-16; Tue, 26 Sep 2006 12:07:52 -0500 (CDT) Received: from [10.12.163.251] (unknown [10.12.163.251]) by mailgate1b.savvis.net (Postfix) with ESMTP id BFBBE3BE50; Tue, 26 Sep 2006 12:07:51 -0500 (CDT) Message-ID: <45195E64.1010302@savvis.net> Date: Tue, 26 Sep 2006 10:07:48 -0700 From: Maksim Yevmenkin User-Agent: Thunderbird 1.5.0.5 (X11/20060906) MIME-Version: 1.0 To: Borja Marcos References: <7591D6A9-27EE-4ADE-AF09-84F8636ADD98@sarenet.es> <45180525.3060309@savvis.net> In-Reply-To: <45180525.3060309@savvis.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at savvis.net Cc: hackers@freebsd.org Subject: Re: network stack problem in sparc64? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Sep 2006 17:08:29 -0000 Maksim Yevmenkin wrote: > Borja Marcos wrote: >> Hello, >> >> I saw this some time ago but always forgot to report it. >> >> I'm running a pair of machines with FreeBSD/sparc64 (various versions, >> one of them is running -STABLE now), and I've seen a problem with the >> network stack. >> >> Looking at buffer and window sizes, >> >> earendil# sysctl net.inet.tcp|fgrep space >> net.inet.tcp.sendspace: 0 >> net.inet.tcp.recvspace: 0 >> >> earendil# sysctl net.inet.udp >> net.inet.udp.checksum: 1 >> net.inet.udp.maxdgram: 0 >> net.inet.udp.recvspace: 0 >> >> When I try to modify them, it doesn't work at all. For example, trying >> to run nfcapd/nfsen in a sparc64 box, I get an error for a >> setsockopt() call >> >> earendil# /usr/local/etc/rc.d/nfsen start >> Starting nfsenStarting nfcpad: upstream1setsockopt(SO_RCVBUF,200000): >> Invalid argument >> Terminated due to errors. >> nfcapd exec error: exit: 255, signal: 0, coredump: 0 >> >> >> For x86 machines the values are correctly reported and they work as >> expected. >> >> I have been poking Google for this but I haven't seen any mention of >> this. > > hmmm... how about this (untested) patch? > > --- tcp_usrreq.c.orig Fri Nov 4 12:26:14 2005 > +++ tcp_usrreq.c Mon Sep 25 09:31:42 2006 > @@ -1161,10 +1161,10 @@ > * sizes, respectively. These are obsolescent (this information should > * be set by the route). > */ > -u_long tcp_sendspace = 1024*32; > +int tcp_sendspace = 1024*32; > SYSCTL_INT(_net_inet_tcp, TCPCTL_SENDSPACE, sendspace, CTLFLAG_RW, > &tcp_sendspace , 0, "Maximum outgoing TCP datagram size"); > -u_long tcp_recvspace = 1024*64; > +int tcp_recvspace = 1024*64; > SYSCTL_INT(_net_inet_tcp, TCPCTL_RECVSPACE, recvspace, CTLFLAG_RW, > &tcp_recvspace , 0, "Maximum incoming TCP datagram size"); > > --- udp_usrreq.c.orig Wed Sep 13 11:19:26 2006 > +++ udp_usrreq.c Mon Sep 25 09:32:00 2006 > @@ -923,12 +923,12 @@ > return (error); > } > > -u_long udp_sendspace = 9216; /* really max datagram size */ > +int udp_sendspace = 9216; /* really max datagram size */ > /* 40 1K datagrams */ > SYSCTL_INT(_net_inet_udp, UDPCTL_MAXDGRAM, maxdgram, CTLFLAG_RW, > &udp_sendspace, 0, "Maximum outgoing UDP datagram size"); > > -u_long udp_recvspace = 40 * (1024 + > +int udp_recvspace = 40 * (1024 + > #ifdef INET6 > sizeof(struct sockaddr_in6) > #else actually, it was fixed in -current long time ago, === Revision 1.128 / (download) - annotate - [select for diffs], Wed Dec 14 22:27:48 2005 UTC (9 months, 1 week ago) by mux Branch: MAIN Changes since 1.127: +2 -2 lines Diff to previous 1.127 (colored) Fix a bunch of SYSCTL_INT() that should have been SYSCTL_ULONG() to match the type of the variable they are exporting. Spotted by: Thomas Hurst MFC after: 3 days === i guess mfc did not happen in 3 days. thanks, max > > thanks, > max > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"