public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Samuel Tardieu <sam@inf.enst.fr>
To: Claus Jarnik <jarnik@esk.fhg.de>
Cc: ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] Ethernet driver /MPC860 FADS
Date: Mon, 20 Dec 1999 02:23:00 -0000	[thread overview]
Message-ID: <1999-12-20-11-22-52+trackit+sam@inf.enst.fr> (raw)
In-Reply-To: <385E01EF.727F5845@esk.fhg.de>

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

      reply	other threads:[~1999-12-20  2:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-12-20  2:16 Claus Jarnik
1999-12-20  2:23 ` Samuel Tardieu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1999-12-20-11-22-52+trackit+sam@inf.enst.fr \
    --to=sam@inf.enst.fr \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=jarnik@esk.fhg.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).