netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Jonathan Day <imipak@yahoo.com>
Cc: netdev@vger.kernel.org
Subject: Re: Questions regarding network drivers
Date: Fri, 10 Nov 2006 13:00:06 +0300	[thread overview]
Message-ID: <20061110100004.GA18739@2ka.mipt.ru> (raw)
In-Reply-To: <771883.63085.qm@web31512.mail.mud.yahoo.com>

On Thu, Nov 09, 2006 at 07:06:00PM -0800, Jonathan Day (imipak@yahoo.com) wrote:
> Hi,
> 
> I've got an interesting problem to contend with and
> need some advice from the great wise ones here.
> 
> First of all, is it possible (and/or "reasonable
> practice") when developing a network driver to do
> zero-copy transfers between main memory and the
> network device?

What do you mean?
DMA from NIC memory into CPU memory?

> Secondly, the network device is only designed to work
> with short packets and I really want to keep the
> throughput up. My thought was that if I fired off an
> interrupt then transfer a page of data into an area I
> know is safe, the kernel will have enough time to find
> a new safe area and post the address before the next
> page is ready to send.
> 
> Can anyone suggest why this wouldn't work or, assuming
> it can work, why this would be a Bad Idea?

There should not be any kind of 'kernel will have enough time to do
something', instead you must guarantee that there will not be any kind
of races. You can either prealocate several buffers or allocate them on
demand in interrupts.

> Lastly, assuming my sanity lasts that long, would I be
> correct in assuming that the first step in the process
> of getting the driver peer-reviewed and accepted would
> be to post the patches here?

Actually not, the first step in that process is learning jig dance and
of course providing enough beer and other goodies to network maintainers.

> Thanks for any help,

No problem, but to answer at least on of your question more
information should be provided.

> Jonathan Day

-- 
	Evgeniy Polyakov

  reply	other threads:[~2006-11-10 10:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-10  3:06 Questions regarding network drivers Jonathan Day
2006-11-10 10:00 ` Evgeniy Polyakov [this message]
2006-11-10 17:34   ` Jonathan Day
2006-11-10 17:55     ` Stephen Hemminger
2006-11-11 11:54     ` Evgeniy Polyakov
2006-11-11 23:21       ` Jonathan Day
2006-11-13  9:05         ` Evgeniy Polyakov

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=20061110100004.GA18739@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=imipak@yahoo.com \
    --cc=netdev@vger.kernel.org \
    /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).