From: Ben Greear <greearb@candelatech.com>
To: Benjamin LaHaise <bcrl@lhnet.ca>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Patrick McHardy <kaber@trash.net>,
netdev@vger.kernel.org
Subject: Re: RFC: net 00/05: routing based send-to-self implementation
Date: Mon, 30 Nov 2009 12:15:41 -0800 [thread overview]
Message-ID: <4B1427ED.6070808@candelatech.com> (raw)
In-Reply-To: <20091130200430.GS14610@kvack.org>
On 11/30/2009 12:04 PM, Benjamin LaHaise wrote:
> On Mon, Nov 30, 2009 at 11:37:31AM -0800, Ben Greear wrote:
>> This doesn't work if you want to have one application manage lots of
>> interfaces and send traffic between these interfaces. Certainly there are
>> use-cases that can use multiple name-spaces, but it's nice to have the
>> option not to use them as well.
>
> Actually, it's quite doable from within one application. An application
> I recently adapted to make use of multiple network namespaces within a single
> process by way of pthreads and unshare(CLONE_NEWNET). The scheme I used
> is to just open the socket in a new namespace in a thread. Since the
> file descriptor table is still shared, it's easy to send/receive data from
> any other thread, regardless of which virtual network namespace it's in.
> All told, setting up virtual routers with namespaces is pretty easy.
That still sounds more complicated than the proposed routing table changes,
at least for my application. Since I also want to gather stats, set/watch routes,
etc, on each network device, would I have to keep a thread and netlink socket
running in each name-space in order to see the various devices?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2009-11-30 20:15 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 17:55 RFC: net 00/05: routing based send-to-self implementation Patrick McHardy
2009-11-30 17:55 ` net 01/05: fib_rules: rearrange struct fib_rule Patrick McHardy
2009-11-30 17:55 ` net 02/05: fib_rules: rename ifindex/ifname/FRA_IFNAME to iifindex/iifname/FRA_IIFNAME Patrick McHardy
2009-11-30 20:21 ` Jarek Poplawski
2009-11-30 20:23 ` Patrick McHardy
2009-11-30 17:55 ` net 03/05: fib_rules: add oif classification Patrick McHardy
2009-11-30 22:31 ` Jarek Poplawski
2009-12-01 9:32 ` Patrick McHardy
2009-12-01 9:48 ` Jarek Poplawski
2009-11-30 17:55 ` net 04/05: fib_rules: allow to delete local rule Patrick McHardy
2009-12-01 13:23 ` jamal
2009-12-01 17:12 ` Alexey Kuznetsov
2009-12-01 17:38 ` Patrick McHardy
2009-11-30 17:55 ` ipv4 05/05: add sysctl to accept packets with local source addresses Patrick McHardy
2009-11-30 19:32 ` RFC: net 00/05: routing based send-to-self implementation Eric W. Biederman
2009-11-30 19:37 ` Ben Greear
2009-11-30 20:04 ` Benjamin LaHaise
2009-11-30 20:15 ` Patrick McHardy
2009-11-30 20:15 ` Ben Greear [this message]
2009-11-30 20:23 ` Benjamin LaHaise
2009-12-03 6:32 ` 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=4B1427ED.6070808@candelatech.com \
--to=greearb@candelatech.com \
--cc=bcrl@lhnet.ca \
--cc=ebiederm@xmission.com \
--cc=kaber@trash.net \
--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;
as well as URLs for NNTP newsgroup(s).