www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/04/29/03:32:02

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 <corinna-cygwin AT cygwin DOT com>
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
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 <sys/mman.h>
> +# 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019