Netdev List
 help / color / mirror / Atom feed
From: "Rémi Denis-Courmont" <remi@remlab.net>
To: Chris Ross <chris@compilednetworks.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: user-to-kernel shared memory with net_device
Date: Tue, 20 Oct 2009 08:47:56 +0200	[thread overview]
Message-ID: <3dc384f905c5638e888cf070440c987f@chewa.net> (raw)
In-Reply-To: <17cd85320910191428p4ca8bc9lc865babb18f29b1d@mail.gmail.com>


On Mon, 19 Oct 2009 16:28:42 -0500, Chris Ross <chris@compilednetworks.com>
wrote:
> All of the mmap examples I can find seem to be for character devices.
> Do I need a character device that implements mmap and proxies access
> to the net_device's stats, or is there a way to mmap directly to a
> net_device structure? Also, is this the excepted method when a
> userspace process needs to read large tables from a driver?

You cannot use mmap() directly on a network device as there are no file
descriptors to network devices. In principle, you can still initiate a
memory mapping using a network device ioctl(), but this is probably not
such a great idea.

-- 
Rémi Denis-Courmont


      reply	other threads:[~2009-10-20  6:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-19 21:28 user-to-kernel shared memory with net_device Chris Ross
2009-10-20  6:47 ` Rémi Denis-Courmont [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=3dc384f905c5638e888cf070440c987f@chewa.net \
    --to=remi@remlab.net \
    --cc=chris@compilednetworks.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