* On the transfer of data from the uart.c driver to the tty layer...
@ 2006-09-05 14:56 Alejandro C
2006-09-06 0:45 ` Benjamin Herrenschmidt
2006-09-06 2:28 ` Dan Malek
0 siblings, 2 replies; 3+ messages in thread
From: Alejandro C @ 2006-09-05 14:56 UTC (permalink / raw)
To: linuxppc-dev
Hi all,
I'm working on a the uart.c driver to add support for SCCs in HDLC mode. The
application I'm going to run on top will be sending Ethernet packets
encapsulated in the data field of an HDLC frame. The idea was to make the
buffer big enough so that a whole Eth. packet (max 1518 octects) could fit
in just one buffer. I let the CPM interrupt on a frame basis and the problem
I've come across is that the receive buffer in the struct tty_struct, where
the tty layer collects the data from the driver
(tty_struct.tty_flip_buffer.char_buf), is only 1024 bytes
(2*TTY_FLIPBUF_SIZE). The easiest at this stage would be to make those
buffers larger, but I don't know what sort of impact this might have... Any
tips?
Any ideas on how to solve it in another fashion?
Help will be highly appreciated.
Regards,
Alejandro
_________________________________________________________________
Acepta el reto MSN Premium: Correos más divertidos con fotos y textos
increíbles en MSN Premium. Descárgalo y pruébalo 2 meses gratis.
http://join.msn.com?XAPID=1697&DI=1055&HL=Footer_mailsenviados_correosmasdivertidos
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: On the transfer of data from the uart.c driver to the tty layer...
2006-09-05 14:56 On the transfer of data from the uart.c driver to the tty layer Alejandro C
@ 2006-09-06 0:45 ` Benjamin Herrenschmidt
2006-09-06 2:28 ` Dan Malek
1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2006-09-06 0:45 UTC (permalink / raw)
To: Alejandro C; +Cc: linuxppc-dev
On Tue, 2006-09-05 at 14:56 +0000, Alejandro C wrote:
> Hi all,
>
> I'm working on a the uart.c driver to add support for SCCs in HDLC mode. The
> application I'm going to run on top will be sending Ethernet packets
> encapsulated in the data field of an HDLC frame. The idea was to make the
> buffer big enough so that a whole Eth. packet (max 1518 octects) could fit
> in just one buffer. I let the CPM interrupt on a frame basis and the problem
> I've come across is that the receive buffer in the struct tty_struct, where
> the tty layer collects the data from the driver
> (tty_struct.tty_flip_buffer.char_buf), is only 1024 bytes
> (2*TTY_FLIPBUF_SIZE). The easiest at this stage would be to make those
> buffers larger, but I don't know what sort of impact this might have... Any
> tips?
> Any ideas on how to solve it in another fashion?
>
> Help will be highly appreciated.
You should ask on the linux-kernel mailing list, possibly CC'ing Alan
Cox who seem to have put his hands a lot in the TTY code lately.
Ben.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: On the transfer of data from the uart.c driver to the tty layer...
2006-09-05 14:56 On the transfer of data from the uart.c driver to the tty layer Alejandro C
2006-09-06 0:45 ` Benjamin Herrenschmidt
@ 2006-09-06 2:28 ` Dan Malek
1 sibling, 0 replies; 3+ messages in thread
From: Dan Malek @ 2006-09-06 2:28 UTC (permalink / raw)
To: Alejandro C; +Cc: linuxppc-dev
On Sep 5, 2006, at 10:56 AM, Alejandro C wrote:
> I'm working on a the uart.c driver to add support for SCCs in HDLC
> mode.
Write a driver that does HDLC, please don't "update"
(complicate) the existing uart.c driver by adding
these features. The uart.c is a UART driver, not
an SCC driver to be modified to your wishes.
Add another, configurable driver to do this.
> I've come across is that the receive buffer in the struct
> tty_struct, where
> the tty layer collects the data from the driver
> (tty_struct.tty_flip_buffer.char_buf), is only 1024 bytes
Write a driver specific to your requirements that
has the proper sized buffers and management.
> (2*TTY_FLIPBUF_SIZE). The easiest at this stage would be to make those
> buffers larger, but I don't know what sort of impact this might
> have... Any
> tips?
Yes, don't do this. Those buffers are allocated from
a fairly small pool specific to the needs of the uart
driver. Making these larger may quickly cause the
CPM drivers to run out of space.
> Any ideas on how to solve it in another fashion?
Write a driver specific to your requirements with the
proper buffer management for these sizes.
Thanks.
-- Dan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-09-06 2:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-05 14:56 On the transfer of data from the uart.c driver to the tty layer Alejandro C
2006-09-06 0:45 ` Benjamin Herrenschmidt
2006-09-06 2:28 ` Dan Malek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).