All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Johann Baudy <johaahn@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: Fwd: Packet mmap: TX RING and zero copy
Date: Fri, 5 Sep 2008 18:19:11 +0400	[thread overview]
Message-ID: <20080905141911.GA16586@2ka.mipt.ru> (raw)
In-Reply-To: <7e0dd21a0809050655n176ec32bo2bf4febe4e0fc363@mail.gmail.com>

Hi Johann.

On Fri, Sep 05, 2008 at 03:55:14PM +0200, Johann Baudy (johaahn@gmail.com) wrote:
> > That's a bug. Likely no one sends file content via udp, so it was not
> > detected...
> 
> Ok, I'll will run a FTRACE of this issue on monday;

No need to run FTRACE, code shuld be audited and probably some debug
prints added to determine, why sendfile() decides to exit early wiht
UDP. I will try to do it if time permits this weekend, although I'm
quite surprised sendfile() does not work with UDP...

> > Well, you can mmap empty file into the RAM, lock it there, DMA data from
> > the sensor to the mmapped area, add headers (just in the mapped area)
> > and then sendfile that file.. Single syscall, zero-copy, standard
> > interfaces :)
> 
> OK but it seems that there is no way to control packet format.
> (beginning of packet and size of packet).
> Each packet must start with a specific header (on my app). This is a
> kind of streaming.

You can always provide a global offset where to put next packet.
You can ajust it to put header before each data frame, and then DMA
frame content according to that offset.

Transmitting packet socket is needed for those, who wants to implement
own low-level protocol unsupported by the kernel, so to transfer data
over UDP or TCP over IP with the highests speeds, one should use
existing methods. This does not of course mean, that anyone _has_ to do
it, it is always very fun to find new ways like your patch.

-- 
	Evgeniy Polyakov

  reply	other threads:[~2008-09-05 14:19 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-02 18:27 Packet mmap: TX RING and zero copy Johann Baudy
2008-09-02 19:46 ` Evgeniy Polyakov
2008-09-03  7:56   ` Johann Baudy
2008-09-03 10:38     ` Johann Baudy
2008-09-03 11:06       ` David Miller
2008-09-03 13:05         ` Johann Baudy
2008-09-03 13:27           ` Evgeniy Polyakov
2008-09-03 14:57             ` Christoph Lameter
2008-09-03 15:00             ` Johann Baudy
2008-09-03 15:13               ` Evgeniy Polyakov
2008-09-03 15:58                 ` Johann Baudy
2008-09-03 16:43                   ` Evgeniy Polyakov
2008-09-03 20:30                     ` Johann Baudy
2008-09-03 22:03                       ` Evgeniy Polyakov
2008-09-04 14:44                         ` Johann Baudy
2008-09-05  7:17                           ` Evgeniy Polyakov
     [not found]                             ` <7e0dd21a0809050216r65b8f08fm1ad0630790a13a54@mail.gmail.com>
2008-09-05  9:17                               ` Fwd: " Johann Baudy
2008-09-05 11:31                                 ` Evgeniy Polyakov
2008-09-05 12:44                                   ` Johann Baudy
2008-09-05 13:16                                     ` Evgeniy Polyakov
2008-09-05 13:29                                       ` Johann Baudy
2008-09-05 13:37                                         ` Evgeniy Polyakov
2008-09-05 13:55                                           ` Johann Baudy
2008-09-05 14:19                                             ` Evgeniy Polyakov [this message]
2008-09-05 14:45                                               ` Johann Baudy
2008-09-05 14:59                                                 ` Evgeniy Polyakov
2008-09-05 15:30                                                   ` Johann Baudy
2008-09-05 15:38                                                     ` Evgeniy Polyakov
2008-09-05 16:01                                                       ` Johann Baudy
2008-09-05 16:34                                                         ` Evgeniy Polyakov
2008-09-08 10:21                                                           ` Johann Baudy
2008-09-08 11:26                                                             ` Evgeniy Polyakov
2008-09-08 13:01                                                               ` Johann Baudy
2008-09-08 15:28                                                                 ` Evgeniy Polyakov
2008-09-08 15:38                                                                   ` Evgeniy Polyakov
2008-09-09 23:11                                                                     ` Johann Baudy
2008-09-10  6:09                                                                       ` Evgeniy Polyakov
2008-09-05 10:28 ` Robert Iakobashvili
2008-09-05 13:06   ` Johann Baudy

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=20080905141911.GA16586@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=johaahn@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.