From: Max Krasnyansky <maxk@qualcomm.com>
To: hadi@cyberus.ca
Cc: Thomas Graf <tgraf@suug.ch>, Ben Greear <greearb@candelatech.com>,
"'netdev@oss.sgi.com'" <netdev@oss.sgi.com>
Subject: Re: Interconnect virtual device?
Date: Mon, 14 Mar 2005 14:53:05 -0800 [thread overview]
Message-ID: <423615D1.9030901@qualcomm.com> (raw)
In-Reply-To: <1109810103.1090.247.camel@jzny.localdomain>
jamal wrote:
> On Wed, 2005-03-02 at 17:55, Thomas Graf wrote:
>
>>I think we talked about this once already and I do like the idea
>>but the reinjection is at least of the same importance to me. What
>>I'm thinking of basically gets down to two ring buffers both holding
>>mmaped buffers.
>
>
> The ring device already has the recv side direction ring,
> Whats needed is tx side.
>
>
>> The action enqueues skbs to the first ring buffer
>>and userspace dequeues it from there. The skb gets completely lost
>>at this point by having it shot or just cloned if mirroring is requested.
>
>
> This will happen by default i.e the mirred action will take care of
> buffer management and hopefully the ring device will worry about reusing
> those skbs.
>
>>Userspace may reinject the skb again by putting it onto the second
>>ring buffer for a kernel thread to pick up and reinject it at
>>netif_receive_skb. Userspace may do whathever it likes as long as
>>the checksum gets corrected, it may also fragment packets and reinject
>>more than it originally received. Obviously for the redirect to
>>userspace the skb must fullfil quite a lot of requirements only
>>achievable on ingress but it would open up possibilities quite a lot.
>
>
> One thing the PF_RING device needs is some form of metadata that can be
> passed to user space. PF_PACKET with MMAP has a few, but we need to do a
> lot more such as exposing most if not all of the skb metadata.
> Similarly, the direction from user space will contain details of where
> this packet is going to go (ingress vs egress) - PF_PACKET assumes
> egress only at the moment.
btw I'm going to add mmap() interface for the TUN driver (I need it for other
stuff myself). In which case it seems that it should do pretty much the same
thing that you guys are talking about. i.e. mmap(/dev/net/tun), setup mirroring
to tunX, copy frames in/out of tunX.
Max
prev parent reply other threads:[~2005-03-14 22:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-28 5:15 Interconnect virtual device? Ben Greear
2005-02-28 12:06 ` jamal
2005-02-28 17:24 ` Ben Greear
2005-03-02 21:55 ` jamal
2005-03-02 22:34 ` Ben Greear
2005-03-03 0:27 ` jamal
2005-03-02 22:55 ` Thomas Graf
2005-03-03 0:35 ` jamal
2005-03-14 22:53 ` Max Krasnyansky [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=423615D1.9030901@qualcomm.com \
--to=maxk@qualcomm.com \
--cc=greearb@candelatech.com \
--cc=hadi@cyberus.ca \
--cc=netdev@oss.sgi.com \
--cc=tgraf@suug.ch \
/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).