All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Ed Swierk <eswierk@aristanetworks.com>
Cc: Sridhar Samudrala <sri@us.ibm.com>, netdev@vger.kernel.org
Subject: Re: [PATCH 0/3 v4] macvtap driver
Date: Thu, 11 Feb 2010 08:12:54 +0100	[thread overview]
Message-ID: <201002110812.54224.arnd@arndb.de> (raw)
In-Reply-To: <9ae48b021002101642w752bbc93vbdcd71151dfb8cb7@mail.gmail.com>

On Thursday 11 February 2010 01:42:04 Ed Swierk wrote:
> On Wed, Feb 10, 2010 at 6:50 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> > I think we also need to ensure the device doesn't go away, which
> > was one of the reasons for the rcu_read_lock_bh() earlier.
> 
> This may be veering far off into the weeds, but I'm wondering if you
> considered making macvtap devices behave more like tap devices.
> Specifically, the application would open /dev/net/macvtap and send it
> an ioctl with the name of the macvtap interface, the name of the lower
> interface to attach to, the MAC address, etc; this would cause the
> macvtap interface to spring into existence. The macvtap interface
> would go away when the application exits or closes the file.

No, I never considered this. In fact, this behavior of tun/tap
is what makes that driver have really complex lifetime rules (more
so than macvtap) and causes all sorts of problems if you want to
manage unprivileged users accessing different outgoing interfaces.

> The tricky part here would be noticing when the lower interface goes
> away, and (ideally) reattaching when an interface with the same name
> reappears.

The first part is not so hard, the second part I'd rather not do.
 
> I think the advantage of this approach is that it better fits the way
> applications like qemu and libvirt use tap interfaces. Unlike the
> current approach, however, this wouldn't allow creating a macvtap
> interface and keep it around independently of the application using
> it. Is it desirable to support this use case?

I think it's very useful that you can set up static interfaces and give
them to a user (or group) that are then able to use these interfaces
without getting any network privileges beyond that.

Another reason for having one chardev per interface is to support
multiple open files for the same interface. I want to use that as
an easy way to support multi-queue NICs.

	Arnd

  reply	other threads:[~2010-02-11  7:13 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27 10:04 [Bridge] [PATCH 0/3 v3] macvtap driver Arnd Bergmann
2010-01-27 10:04 ` Arnd Bergmann
2010-01-27 10:05 ` [Bridge] [PATCH 1/3] net: maintain namespace isolation between vlan and real device Arnd Bergmann
2010-01-27 10:05   ` Arnd Bergmann
2010-01-29  5:33   ` [Bridge] " David Miller
2010-01-29  5:33     ` David Miller
2010-01-29 10:12     ` [Bridge] " Arnd Bergmann
2010-01-29 10:12       ` Arnd Bergmann
2010-01-27 10:06 ` [Bridge] [PATCH 2/3] net/macvlan: allow multiple driver backends Arnd Bergmann
2010-01-27 10:06   ` Arnd Bergmann
2010-01-27 21:09 ` [Bridge] [PATCH 3/3] net: macvtap driver Arnd Bergmann
2010-01-27 21:09   ` Arnd Bergmann
2010-01-28 17:34   ` [Bridge] " Michael S. Tsirkin
2010-01-28 17:34     ` Michael S. Tsirkin
2010-01-28 20:18     ` [Bridge] " Arnd Bergmann
2010-01-28 20:18       ` Arnd Bergmann
2010-01-29 11:21       ` [Bridge] " Michael S. Tsirkin
2010-01-29 11:21         ` Michael S. Tsirkin
2010-01-29 19:49         ` [Bridge] " Arnd Bergmann
2010-01-29 19:49           ` Arnd Bergmann
2010-01-27 21:59 ` [Bridge] [PATCH 0/3 v3] " Arnd Bergmann
2010-01-27 21:59   ` Arnd Bergmann
2010-01-30 22:22 ` [Bridge] [PATCH 0/3 v4] " Arnd Bergmann
2010-01-30 22:22   ` Arnd Bergmann
2010-01-30 22:23   ` [Bridge] [PATCH 1/3] net: maintain namespace isolation between vlan and real device Arnd Bergmann
2010-01-30 22:23     ` Arnd Bergmann
2010-01-30 22:23   ` Arnd Bergmann
2010-01-30 22:23   ` [PATCH 2/3] macvlan: allow multiple driver backends Arnd Bergmann
2010-01-30 22:23   ` [Bridge] " Arnd Bergmann
2010-01-30 22:23     ` Arnd Bergmann
2010-01-30 22:24   ` [PATCH 3/3] net: macvtap driver Arnd Bergmann
2010-01-30 22:24   ` [Bridge] " Arnd Bergmann
2010-01-30 22:24     ` Arnd Bergmann
2010-02-04  4:21   ` [PATCH 0/3 v4] " David Miller
2010-02-04  4:21   ` [Bridge] " David Miller
2010-02-04  4:21     ` David Miller
2010-02-08 17:14     ` Ed Swierk
2010-02-08 18:55       ` Sridhar Samudrala
2010-02-08 23:30         ` Ed Swierk
2010-02-10 14:50           ` Arnd Bergmann
2010-02-11  0:42             ` Ed Swierk
2010-02-11  7:12               ` Arnd Bergmann [this message]
2010-02-09  3:25         ` Ed Swierk
2010-02-10 14:52           ` Arnd Bergmann
2010-02-10 14:48         ` Arnd Bergmann
2010-02-10 18:05           ` Sridhar Samudrala
2010-02-10 18:10             ` Patrick McHardy
2010-02-11 15:45               ` [PATCH] net/macvtap: fix reference counting Arnd Bergmann
2010-02-11 15:55                 ` [PATCH v2] " Arnd Bergmann
2010-02-11 21:09                   ` Sridhar Samudrala
2010-02-16  5:53                     ` David Miller
2010-02-18 15:44                       ` Arnd Bergmann
2010-02-18 15:45                         ` [PATCH 1/3] macvtap: rework object lifetime rules Arnd Bergmann
2010-02-18 20:09                           ` Sridhar Samudrala
2010-02-18 22:11                           ` David Miller
2010-02-18 15:46                         ` [PATCH 2/3] net/macvtap: add vhost support Arnd Bergmann
2010-02-18 20:10                           ` Sridhar Samudrala
2010-02-18 22:11                           ` David Miller
2010-02-18 15:48                         ` [PATCH 3/3] macvtap: add GSO/csum offload support Arnd Bergmann
2010-02-18 20:38                           ` Sridhar Samudrala
2010-02-18 22:11                           ` David Miller
2010-02-12 20:58                   ` [PATCH v2] net/macvtap: fix reference counting Ed Swierk
2010-01-30 22:22 ` [PATCH 0/3 v4] macvtap driver Arnd Bergmann

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=201002110812.54224.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=eswierk@aristanetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=sri@us.ibm.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 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.