public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Ethernet driver /MPC860 FADS
@ 1999-12-20  2:16 Claus Jarnik
  1999-12-20  2:23 ` Samuel Tardieu
  0 siblings, 1 reply; 2+ messages in thread
From: Claus Jarnik @ 1999-12-20  2:16 UTC (permalink / raw)
  To: ecos-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2449 bytes --]

Hello,

let me first introduce myself. My name is Claus Jarnik and I'm a student
of the Fachhochschule Munich/University of Applied Sciences.
Actually I do my diploma for the Fraunhofer ESK (research institute).
My business is the development of an ethernet driver under eCos for the
Motorola MPC860 (evaluation board: FADS).

Also I want to write something about eCos (if I get enough information
about the purpose of eCos, known commercial Applications and products Â…)

If you have any interest in my driver (end version is planned to be in
march 2000) I will make the code available to the eCos community.

Right now I might need your help because I got some problems with the
data rate of my driver.
It would be a great help for me if you have any good idea to solve the
problem.

I use the eCos cyg_io_read and cyg_io_write function for
receive/transmit data.
(cyg_io_write(cyg_io_handle_t handle, const void *buf, cyg_uint32 *len)

In these functions I copy the data from/to buf with the desired length
len.
This copying (I use memcpy) costs a lot of performance.

For a simple performance test I transmit 50000 ethernet frames  (1518
bytes) from a Linux PC to the FADS board.

This are my data rates for receiving:

Action                             | average data rate| busy errors
-------------------------------------------------------------------------------------
Receive and check                  | 1.4 Mbit/s       | 49997
(check if every single byte is ok) |                  |
Receive without check              | 2.8 Mbit/s       | 50001
Without memcpy (no copying of data)| 7.1 Mbit/s       |  3400

Remarks: 64 receive buffer (1520 bytes per buffer), one user task, BSY
INT deactivated, non-blocking read modus

The 7.02 Mbit/s rate would be the best theoretical average data rate
with my driver.
The copying of the received data costs nearly 60% of the theoretical
data rate.

Does eCos support pointer handling with a memory pool (only to handle
pointers to data, not copying the data) because the copying of data from
layer to layer will decrease a lot of performance?

I think a pointer handling from layer to layer would be more effective.


Thank you very much


-- 
kind regards

Fraunhofer Einrichtung für 
Systeme der Kommunikationstechnik
mailto:jarnik@esk.fhg.de
Claus Jarnik			Hansastraße 32
				D-80686 München
               			Telefon: +49(0)89/547088-40
		                Telefax: +49(0)89/547088-20

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] Ethernet driver /MPC860 FADS
  1999-12-20  2:16 [ECOS] Ethernet driver /MPC860 FADS Claus Jarnik
@ 1999-12-20  2:23 ` Samuel Tardieu
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Tardieu @ 1999-12-20  2:23 UTC (permalink / raw)
  To: Claus Jarnik; +Cc: ecos-discuss

| I use the eCos cyg_io_read and cyg_io_write function for
| receive/transmit data.
| (cyg_io_write(cyg_io_handle_t handle, const void *buf, cyg_uint32 *len)
| 
| In these functions I copy the data from/to buf with the desired length
| len. This copying (I use memcpy) costs a lot of performance.

Those functions are as close as possible of the read() and write() classical
form. I would suggest that you do not use it for memory mapped devices (such
as the ethernet part of the MPC860) as the data is already available in memory
and you will not be able to prevent the copy. Those functions were designed
originally to read/write from/to a file, with the content loaded on demand,
without needing any extra copy.

So my suggestion is: do not use this if you need to avoid useless copies.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-12-20  2:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-20  2:16 [ECOS] Ethernet driver /MPC860 FADS Claus Jarnik
1999-12-20  2:23 ` Samuel Tardieu

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 read-only IMAP folder(s) and NNTP newsgroup(s).