From: Evgeniy Polyakov <zbr@ioremap.net>
To: Johann Baudy <johaahn@gmail.com>
Cc: "Lovich, Vitali" <vlovich@qualcomm.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] Packet socket: mmapped IO: PACKET_TX_RING
Date: Wed, 12 Nov 2008 16:58:28 +0300 [thread overview]
Message-ID: <20081112135828.GA30946@ioremap.net> (raw)
In-Reply-To: <7e0dd21a0811120543k6907de3aw6b0c3de49b2ea5d2@mail.gmail.com>
Hi.
On Wed, Nov 12, 2008 at 02:43:07PM +0100, Johann Baudy (johaahn@gmail.com) wrote:
> Thanks a lot for this list :)
> So for example, is using of skb->mark to store a buffer index a good solution ?
> Or do you prefer another solution?
Qdisk uses various classification models, and for example dsmark uses
skb->mark in particular. Most of others use priority field. tc_verd is
used to store classification verdict.
> > At the first place I do not understand, why do you want to change the
> > skb, since you can mmap whatever area you need and provide those pages
> > into skb, which at free time will drop the reference counter. Skb lives
> > in socket queue, so until it is empty you can sleep not allowing mapped
> > buffer to shrink.
> We need to get the tpacket_hdr associated to data in skb in order to
> inform user that buffer is now available (This is done through status
> field, which is not sent over the network). What do you mean with
> "provide those pages", through frags? If yes, is it ok when frags are
> linearized?
Hmm, for example splice() is supposed to do the same what you have, but
because of udp_send*() limitations it can't. Splice does not care if
data was overwritten during transfer, i.e. when ->sendpage() returns all
code assumes that data has been successfully transmitted, so userspace
can overwrite mapped area or file content, and this new data will
actually be transmitted. I believe you can use the same model and do not
care about userspace notifications after execution returned to the
userspace from the 'sending call'.
--
Evgeniy Polyakov
next prev parent reply other threads:[~2008-11-12 13:58 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-31 10:58 [PATCH] Packet socket: mmapped IO: PACKET_TX_RING Johann Baudy
2008-10-31 17:07 ` Lovich, Vitali
2008-10-31 18:24 ` Lovich, Vitali
2008-11-04 22:45 ` Johann Baudy
2008-11-06 0:47 ` Lovich, Vitali
2008-11-06 8:03 ` Evgeniy Polyakov
2008-11-06 18:49 ` Lovich, Vitali
2008-11-06 19:40 ` Evgeniy Polyakov
2008-11-06 19:53 ` Lovich, Vitali
2008-11-07 16:36 ` Johann Baudy
2008-11-07 17:19 ` Lovich, Vitali
2008-11-10 20:29 ` Lovich, Vitali
2008-11-11 0:29 ` Lovich, Vitali
[not found] ` <7e0dd21a0811110656yff651afp8ff0f9928b79f545@mail.gmail.com>
2008-11-11 14:59 ` Johann Baudy
2008-11-11 19:05 ` Lovich, Vitali
2008-11-11 12:10 ` Johann Baudy
2008-11-11 17:44 ` Lovich, Vitali
2008-11-11 18:08 ` Johann Baudy
2008-11-11 18:19 ` Lovich, Vitali
2008-11-11 18:59 ` Johann Baudy
2008-11-11 19:10 ` Lovich, Vitali
2008-11-12 12:09 ` Johann Baudy
2008-11-12 17:12 ` Lovich, Vitali
2008-11-11 11:43 ` Johann Baudy
2008-11-11 17:38 ` Lovich, Vitali
2008-11-11 17:50 ` Johann Baudy
2008-11-11 18:14 ` Lovich, Vitali
2008-11-11 18:50 ` Evgeniy Polyakov
2008-11-11 19:19 ` Johann Baudy
2008-11-11 19:29 ` Evgeniy Polyakov
2008-11-12 13:43 ` Johann Baudy
2008-11-12 13:58 ` Evgeniy Polyakov [this message]
2008-11-12 17:07 ` Lovich, Vitali
2008-11-12 17:41 ` Evgeniy Polyakov
2008-11-12 17:59 ` Lovich, Vitali
2008-11-12 18:11 ` Evgeniy Polyakov
2008-11-12 19:05 ` Lovich, Vitali
2008-11-12 19:14 ` Evgeniy Polyakov
2008-11-12 21:23 ` Lovich, Vitali
2008-11-12 21:46 ` Evgeniy Polyakov
2008-11-12 22:33 ` Lovich, Vitali
2008-11-18 18:49 ` Johann Baudy
2008-11-18 19:10 ` Evgeniy Polyakov
2008-11-18 19:46 ` Lovich, Vitali
2008-11-07 17:28 ` Evgeniy Polyakov
2008-11-07 20:22 ` David Miller
2008-10-31 20:28 ` Evgeniy Polyakov
2008-11-04 22:33 ` Johann Baudy
2008-11-05 1:50 ` Lovich, Vitali
-- strict thread matches above, loose matches on Subject: below --
2008-11-12 13:19 Johann Baudy
2008-11-05 15:16 Johann Baudy
2008-11-05 17:49 ` Lovich, Vitali
2008-11-05 10:55 Johann Baudy
2008-11-05 11:02 ` Patrick McHardy
2008-11-05 17:32 ` Lovich, Vitali
2008-10-30 13:00 Johann Baudy
2008-10-30 18:21 ` Lovich, Vitali
2008-10-27 9:33 Johann Baudy
2008-10-28 22:44 ` David Miller
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=20081112135828.GA30946@ioremap.net \
--to=zbr@ioremap.net \
--cc=johaahn@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vlovich@qualcomm.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).