X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 29 Apr 2008 09:31:36 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: inetutils 1.5 / ftpd problem: 426 Data connection: No buffer space available. Message-ID: <20080429073136.GG23852@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <3ee066b40804272035p45746b2bwc5bebd0252d92426 AT mail DOT gmail DOT com> <4815777F DOT 3060005 AT cwilson DOT fastmail DOT fm> <20080428084603 DOT GX23852 AT calimero DOT vinschen DOT de> <48165B28 DOT 4030804 AT cwilson DOT fastmail DOT fm> <4816615E DOT 8060608 AT cwilson DOT fastmail DOT fm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4816615E.8060608@cwilson.fastmail.fm> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Apr 28 19:44, Charles Wilson wrote: > Charles Wilson wrote: > >> Yeah, I'll code that up for 1.5-4. Should I stick with BUFSIZ == 1024, or >> when MMAP use something a little bigger, say 32k? > > Also, uploads to the server seem to be sane (e.g. read() from the server > side). So it's just downloads to the client when HAVE_MMAP. The fix was > pretty easy: > > #ifdef HAVE_MMAP > #include > +# ifdef __CYGWIN__ > + /* On cygwin, network transfers are limited to an absolute > + maximum of 64k, or transfer fails with ENOBUFS. Conservative: */ > +# define LARGE_TRANSFER_LIMIT 32768 > +# endif > #endif In theory that looks fine, I just don't like the comment. This is not Cygwin's fault in the first place and it's not Cygwin returning ENOBUFS when you use too big send calls in the first place. Also, Cygwin does not return ENOBUFS for writes > 64K. The 1.5 versions lets you do what you want and you have to deal with Winsock's behaviour directly. The 1.7 version just sends a maximum of 64K regardless of the incoming buffer size. It doesn't refuse the write completely. Eventually we should do our own write buffer management in Cygwin so you won't have to care. Brian Ford is looking into it, afaik. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/