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, 18 Sep 2011 07:23:08 -0400
On Mon, 12 Sep 2011 07:25:02 +0000 (UTC)
Matthew Mondor <mm_lists%pulsar-zone.net@localhost> wrote:
> Yesterday night I looked at porting it to netbsd-5 but the code seemed
> quite different (netbsd-5 getting old?), so it'll probably be less
> trouble to build a -current kernel to try it on. I should be able to
> do this before the weekend.
I had the opportunity to build a -current kernel with the applied patch
and to do some tests.
Unfortunately, a 1024 limit still exists. I first tried my unmodified
code with the new sysctl set at 4096, with an MTU of 3000. To make
sure that it wasn't a limitation of PPP, I also did tests using dd,
while ktraceing the process. It indeed still shows reads of 1024 bytes
at a time.
I then also tried using the new ioctl(2) rather than the sysctl knob,
and noticed that the request macro names seemed inversed. So using the
TIOCGQSIZE one instead of the TIOCSQSIZE one, there was no EINVAL, but
still again the tests with dd showed a 1024 bytes limit.
The following example shows an attempt to read 3168 bytes.
dd pushes a 3168 bytes block, but 1024 bytes are read:
1368 1 tty-udp CALL read(3,0xbb903000,0xc60)
1368 1 tty-udp GIO fd 3 read 1024 bytes
000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
***
3f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
1368 1 tty-udp RET read 1024/0x400
Thanks again,
--
Matt
Home |
Main Index |
Thread Index |
Old Index