This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Ethernet driver /MPC860 FADS


| 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]