netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: jamal <hadi@cyberus.ca>
Cc: Ben Greear <greearb@candelatech.com>,
	"'netdev@oss.sgi.com'" <netdev@oss.sgi.com>
Subject: Re: Interconnect virtual device?
Date: Wed, 2 Mar 2005 23:55:58 +0100	[thread overview]
Message-ID: <20050302225558.GS31837@postel.suug.ch> (raw)
In-Reply-To: <1109800554.1091.213.camel@jzny.localdomain>

> b) My preference is to push this gentleman's PF_RING
> (http://www.ntop.org/ntop.html) netdevice into the kernel. He has
> replicated unfortunately a lot of the stuff already done by MMAPED
> packet socket - but i think we can forgive him since solution a) would
> require hacking packet socket.
> 
> Reinjection of packets still needs working for that device - just as
> much as a few cleanups here and there. The problem is the guy is not
> very responsive - I have a lot of notes on his stuff if you are willing
> to chase him around.
> You can then get redirection to this device for free (for either
> incoming or outgoing packets); something like:
> 
> tc filter add dev eth0 .... \
> match ip src 10.0.0.1/32 \
> action mirred egress redirect dev ring0

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 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.
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.

  parent reply	other threads:[~2005-03-02 22:55 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 [this message]
2005-03-03  0:35         ` jamal
2005-03-14 22:53           ` Max Krasnyansky

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=20050302225558.GS31837@postel.suug.ch \
    --to=tgraf@suug.ch \
    --cc=greearb@candelatech.com \
    --cc=hadi@cyberus.ca \
    --cc=netdev@oss.sgi.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).