From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30149 invoked by alias); 13 Jun 2007 13:21:40 -0000 Received: (qmail 30140 invoked by uid 22791); 13 Jun 2007 13:21:39 -0000 X-Spam-Check-By: sourceware.org Received: from d5152C2DE.access.telenet.be (HELO lx-dmz.televic.com) (81.82.194.222) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 13 Jun 2007 13:21:33 +0000 Received: (qmail 26146 invoked from network); 13 Jun 2007 13:21:31 -0000 Received: from nt-email.televic.com (10.0.0.9) by 10.1.8.1 with SMTP; 13 Jun 2007 13:21:31 -0000 Received: from [10.0.56.4] ([10.0.56.4]) by nt-email.TELEVIC.COM with Microsoft SMTPSVC(6.0.3790.1830); Wed, 13 Jun 2007 15:21:23 +0200 Message-ID: <466FEF53.1060909@televic.com> Date: Wed, 13 Jun 2007 14:24:00 -0000 From: =?ISO-8859-1?Q?J=FCrgen_Lambrecht?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.13) Gecko/20060414 MIME-Version: 1.0 To: Andrew Lunn CC: Juergen Lambrecht , ecos-discuss@ecos.sourceware.org References: <466EC08A.8090704@televic.com> <20070612160753.GP26816@lunn.ch> <466EF583.2090003@telenet.be> <20070612215839.GX26816@lunn.ch> In-Reply-To: <20070612215839.GX26816@lunn.ch> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] max IP packet size = 9216 B. Why? X-SW-Source: 2007-06/txt/msg00142.txt.bz2 Thanks Andrew! This solves it. So the maximum supported IP packet size for an UDP socket is a configuration option. But you must be a TCP/IP networking expert to know about the option.. For anybody's information: to send/receive maximum sized UDP packets you have to setsockopt() SO_SNDBUF & SO_RCVBUF. The maximum IP packet size is 65535 B, so the maximum UDP payload is 65507 B. So it has no use to set SO_SNDBUF (for an UDP socket) higher than that value (65507 B). Mark that SO_RCVBUF must be set to 65539 B to be able to receive the 65535 B IP packets (using UDP)! For the ping test, ecos is configured OK for 65535 B IP-ping packets I still have to test TCP, but TCP should adapt its buffers automatically. Andrew Lunn wrote: >>sendto returns the error code 322 or EMSGSIZE "Message too long". >>I forgot to tell that's because the high water level of the send socket >>(o->so_snd.sb_hiwat) is 9216 B (=0x2400) (in file >>bsd_tcpip/current/src/sys/kern/uipc_socket.c:523). >> >>I will try to increase the socket's high water level (after I have found >>where it is set ;-). The high water level is set in bsd_tcpip/current/src/sys/netinet/udp_usrreq.c line 769. Changing it here solves my problem. > > > I think you can set it with setsockopt(). The option names are Indeed! But I though you would then change so->so_snd.sb_mbmax in stead of so->so_snd.sb_hiwat. With those options, I indeed changed the high water level. So the ecos patch above is wrong. > SO_SNDBUF & SO_RCVBUF. However, there might be a system check to > ensure they are not too large. How can you know wat the allowed maximum is? I guess that is the value of so->so_snd.sb_mbmax that was set default to 73728 (as I saw with the debugger). That maximum is probably related to the options CYGPKG_NET_MEM_USAGE, ... You can of course check the return value of setsockopt(). Thank you again, Juergen > > Andrew > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss