netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: shannon.nelson@intel.com, dan.j.williams@intel.com
Cc: netdev@vger.kernel.org
Subject: Dealing with limited resources and DMA Engine copies
Date: Wed, 13 Feb 2008 20:38:15 -0600	[thread overview]
Message-ID: <20080214023815.GA5414@lixom.net> (raw)

Hi,

My DMA Engine has a limited resource: It's got a descriptor ring, so
it's not always possible to add a new descriptor to it (i.e. it might be
full). While allocating a huge ring will help, eventually I'm sure I
will hit a case where it'll overflow.

I thought this was going to be taken care of automatically by the fact
that you return your max(?) number of descriptors in the channel
allocation function, but it looks like that value is discarded in
dma_client_chan_alloc().

So, I just got a couple of spurious:
dma_cookie < 0
dma_cookie < 0

...on the console and the connection terminated. Looks like that came
from tcp_recvmsg(). Ouch.

How about falling back to the cpu-based copy in case of failure? Or would
you prefer that I sleep locally in my driver and wait on a descriptor
slot to open up?


-Olof

             reply	other threads:[~2008-02-14  2:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-14  2:38 Olof Johansson [this message]
     [not found] <f12847240802200440u3542c2a0vaf82312435ddafe9@mail.gmail.com>
2008-02-20 13:01 ` Dealing with limited resources and DMA Engine copies Sosnowski, Maciej

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=20080214023815.GA5414@lixom.net \
    --to=olof@lixom.net \
    --cc=dan.j.williams@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=shannon.nelson@intel.com \
    /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 NNTP newsgroup(s).