NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/45352: pty(4)/tty(4) have a 1024 bytes transfer limit



The following reply was made to PR kern/45352; it has been noted by GNATS.

From: Matthew Mondor <mm_lists%pulsar-zone.net@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/45352: pty(4)/tty(4) have a 1024 bytes transfer limit
Date: Sun, 25 Sep 2011 16:59:59 -0400

 On Sun, 25 Sep 2011 11:33:02 -0400
 christos%zoulas.com@localhost (Christos Zoulas) wrote:
 
 > |  However, there still seems to be a problem with the ioctl(2), as that
 > |  one doesn't seem to have an effect, somehow:
 > |  
 > |          opt = (int)buffer_size;
 > |          if (ioctl(fd, TIOCSQSIZE, &opt) == -1)
 > |                  err(EXIT_FAILURE, "Couldn't set tty(4) buffer size");
 > |  
 > |  There is no error but the reads are still reaching the sysctl-set limit
 > |  despite trying to set a larger buffer (that's of course still between
 > |  1024 and 65536).
 > 
 > I made your test program do the setting on both the master and the
 > slave and that seems to work.
 
 I was previously using the ioctl on the pty side only; when using it on
 both the pty and tty as you suggest, I confirm it works fine; I updated
 my repository's version of the test consequently.
 
 > |  Also, would there be a problem with setting the tty buffer size to 4096
 > |  by default, rather than 1024?  This would then match the default Linux
 > |  limit, and allow tools like rp-ppoe with common MTU sizes to work
 > |  properly as-is as well.
 > 
 > I don't think that it is a big deal, since it can be set via sysctl.
 > We can surely change it.
 
 I think that for the sole reason of lesser surprise, it'd be a good
 thing... or alternatively, one more commented exemple in the
 distribution-provided sysctl.conf could be provided, perhaps?
 
 > Thanks for the test program which made testing easy!
 
 And thanks again for working on fixing this long-standing issue :)
 
 If I'm motivated enough I might try to adapt the fixes to netbsd-5,
 because that's what I really use.  There exist many changes between
 netbsd-5 and -current in the pty/tty code, however.  Because I have no
 idea if I'll do it yet, feel free to close this PR if you consider it's
 in order.
 
 I here append relevant possible commits for reference:
 
 http://mail-index.NetBSD.org/source-changes/2011/09/23/msg027475.html
 http://mail-index.NetBSD.org/source-changes/2011/09/23/msg027482.html
 http://mail-index.NetBSD.org/source-changes/2011/09/24/msg027483.html
 http://mail-index.NetBSD.org/source-changes/2011/09/24/msg027484.html
 http://mail-index.NetBSD.org/source-changes/2011/09/24/msg027485.html
 http://mail-index.NetBSD.org/source-changes/2011/09/24/msg027486.html
 http://mail-index.NetBSD.org/source-changes/2011/09/24/msg027497.html
 http://mail-index.NetBSD.org/source-changes/2011/09/24/msg027498.html
 http://mail-index.NetBSD.org/source-changes/2011/09/24/msg027511.html
 http://mail-index.NetBSD.org/source-changes/2011/09/24/msg027516.html
 -- 
 Matt
 


Home | Main Index | Thread Index | Old Index