netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] vbus: venet macvlan support
@ 2009-11-10 22:27 Patrick Mullaney
  2009-11-10 22:27 ` [PATCH 1/4] macvlan: derived from Arnd Bergmann's patch for macvtap Patrick Mullaney
                   ` (4 more replies)
  0 siblings, 5 replies; 28+ messages in thread
From: Patrick Mullaney @ 2009-11-10 22:27 UTC (permalink / raw)
  To: alacrityvm-devel; +Cc: linux-kernel, kaber, arnd, bridge, evb, netdev

(Applies to alacrityvm.git/master:34534534)

This patchset implements a vbus venet device with a
macvlan backend.

These patches allow an alacrityvm guest to send and receive
directly over a macvlan, avoiding the bridge entirely.
This driver inherits all of the benefits of the work done
to date on vbus/venet driver(SAR offloading, zero-copy
in the guest->host path, configurable tx-complete mitigation,
interrupt coalescing at the vbus level).  Some of the work to
re-factor and share the common code between venet-tap and
venet-macvlan was done prior because it should be generally
useful to anyone wanting to implement a venet type of device.

Once the driver is built and installed, you may use it
just like you would a venet-tap device. In order to
instantiate a venet-macvlan, there are just two differences
from the procedure to instantiating a venet-tap. In order
to create the venet-macvlan device, just:

echo venet-macvlan > /config/vbus/devices/<device-name>/type

and

echo "lower-devicename" > /sys/vbus/devices/<device-name>/ll_ifname

where lower-devicename is something like eth0, eth1, eth2 etc.

The second step associates the lower-devicename, usually
a physical device, with the venet-macvlan device being created.
This step must be perform prior to enabling the venet-macvlan
device.

After that, a guest can make use of the venet-macvlan in
exactly the same manner as a venet-tap. In fact, the guest
actually sees venet-tap and venet-macvlan as identical
types of the devices on the vbus.

Using the venet-macvlan driver will reduce some overhead by
eliminating the linux bridge from the send and receive
paths. For a lightly loaded network segment and system,
we have measured this to be aproximately 1-3 us per side
depending on what hardware is involved.

Since this driver layered over the macvlan driver, it will
have that same limitations as the macvlan driver. For example,
forwarding between macvlan devices on the same host is not
supported. This driver targeted toward VEPA environments as
described by the 'Edge Virtual Bridging' working group.

---

Patrick Mullaney (4):
      venet-macvlan: add new driver to connect a venet to a macvlan netdevice
      venetdev: support common venet netdev routines
      macvlan: allow in-kernel modules to create and manage macvlan devices
      macvlan:  derived from Arnd Bergmann's patch for macvtap


 drivers/net/macvlan.c                   |  105 +++--
 drivers/net/vbus-enet.c                 |    8 
 include/linux/macvlan.h                 |   43 ++
 include/linux/venet.h                   |    5 
 kernel/vbus/devices/venet/Kconfig       |   11 +
 kernel/vbus/devices/venet/Makefile      |   10 -
 kernel/vbus/devices/venet/device.c      |   53 ++-
 kernel/vbus/devices/venet/macvlan.c     |  598 +++++++++++++++++++++++++++++++
 kernel/vbus/devices/venet/venetdevice.h |   12 +
 9 files changed, 785 insertions(+), 60 deletions(-)
 create mode 100644 include/linux/macvlan.h
 create mode 100644 kernel/vbus/devices/venet/macvlan.c

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: [PATCH 3/3] macvlan: allow in-kernel modules to create and manage macvlan devices
@ 2009-12-03 20:40 Patrick Mullaney
  0 siblings, 0 replies; 28+ messages in thread
From: Patrick Mullaney @ 2009-12-03 20:40 UTC (permalink / raw)
  To: arnd; +Cc: bridge, alacrityvm-devel, kaber, linux-kernel, netdev

On Fri, 2009-11-27 at 23:14 +0100, Arnd Bergmann wrote:
> On Friday 13 November 2009, Patrick Mullaney wrote:
> > 
> > The macvlan driver didn't allow for creation/deletion of devices
> > by other in-kernel modules. This patch provides common routines
> > for both in-kernel and netlink based management. This patch
> > also enables macvlan device support for gro for lower level
> > devices that support gro.
> 
> I wonder if doing this way round is a good idea, why don't
> you just use netlink to set up the endpoint device like
> the current macvlan and macvtap do? I think doing it consistently
> for all backends would be a significant advantage.

sorry for the late response - I'm thinking about re-implementing
this along the lines that you are talking about. Especially in light
of your new configuration options. The reason(probably short sighted)
for the previous approach was that the creation step was already being
handled in our venet driver(but it doesn't have to be).

Thanks for the suggestion.
Patrick

> 
> 	Arnd <><


^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: [PATCH 3/3] macvlan: allow in-kernel modules to create and manage macvlan devices
@ 2009-12-03 20:45 Patrick Mullaney
  2009-12-03 21:28 ` Arnd Bergmann
  0 siblings, 1 reply; 28+ messages in thread
From: Patrick Mullaney @ 2009-12-03 20:45 UTC (permalink / raw)
  To: arnd; +Cc: bridge, alacrityvm-devel, kaber, linux-kernel, netdev


I hope I didn't confuse things by posting:

netdevice: provide common routine for macvlan and vlan operstate
management

again. I offered to send that out patched against net-next-2.6 last
week and I just got back to following up. I'm fine with you rolling
them into your series too.

Thanks.

On Fri, 2009-11-27 at 23:19 +0100, Arnd Bergmann wrote:
> On Friday 13 November 2009, Patrick Mullaney wrote:
> > @@ -318,7 +318,7 @@ static struct lock_class_key macvlan_netdev_addr_lock_key;
> >  #define MACVLAN_FEATURES \
> >         (NETIF_F_SG | NETIF_F_ALL_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \
> >          NETIF_F_GSO | NETIF_F_TSO | NETIF_F_UFO | NETIF_F_GSO_ROBUST | \
> > -        NETIF_F_TSO_ECN | NETIF_F_TSO6)
> > +        NETIF_F_TSO_ECN | NETIF_F_TSO6 | NETIF_F_GRO)
> >  
> >  #define MACVLAN_STATE_MASK \
> >         ((1<<__LINK_STATE_NOCARRIER) | (1<<__LINK_STATE_DORMANT))
> 
> This hunk looks like it should be a separate patch, because we will
> want to have this independently of the rest. I have taken it into
> a series I'm preparing for a new posting of macvtap based on the
> current net-next tree with my bridge mode changes. I also have
> your patch 1 (the fixed version) and 2 in there. It's currently
> work in progress, but if you are interested, take a look at [1].
> 
> 	Arnd <><
> 
> [1] http://git.kernel.org/?p=linux/kernel/git/arnd/playground.git;a=shortlog;h=refs/heads/macvlan

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2009-12-03 21:30 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-10 22:27 [PATCH 0/4] vbus: venet macvlan support Patrick Mullaney
2009-11-10 22:27 ` [PATCH 1/4] macvlan: derived from Arnd Bergmann's patch for macvtap Patrick Mullaney
2009-11-10 22:27 ` [PATCH 2/4] macvlan: allow in-kernel modules to create and manage macvlan devices Patrick Mullaney
2009-11-11 15:29   ` Patrick McHardy
2009-11-12 18:05     ` [PATCH] netdevice: provide common routine for macvlan and vlan operstate management Patrick Mullaney
2009-11-12 18:21       ` Patrick McHardy
2009-11-13 19:55     ` [PATCH 0/3] macvlan: support for guest vm direct rx/tx Patrick Mullaney
2009-11-13 19:55       ` [PATCH 1/3] netdevice: provide common routine for macvlan and vlan operstate management Patrick Mullaney
2009-11-27 13:09         ` Arnd Bergmann
2009-11-13 19:55       ` [PATCH 2/3] macvlan: derived from Arnd Bergmann's patch for macvtap Patrick Mullaney
2009-11-13 19:55       ` [PATCH 3/3] macvlan: allow in-kernel modules to create and manage macvlan devices Patrick Mullaney
2009-11-27 22:14         ` Arnd Bergmann
2009-11-27 22:19         ` Arnd Bergmann
2009-11-13 21:27       ` [PATCH 0/3] macvlan: support for guest vm direct rx/tx Stephen Hemminger
2009-11-27 23:43         ` Arnd Bergmann
2009-11-28  0:19           ` David Miller
2009-11-28  5:38             ` Stephen Hemminger
2009-11-28  6:58               ` David Miller
2009-11-10 22:28 ` [PATCH 3/4] venetdev: support common venet netdev routines Patrick Mullaney
2009-11-10 22:28 ` [PATCH 4/4] venet-macvlan: add new driver to connect a venet to a macvlan netdevice Patrick Mullaney
2009-11-11 15:36   ` Patrick McHardy
2009-11-12 15:44 ` [PATCH 0/4] vbus: venet macvlan support Gregory Haskins
2009-11-12 15:53   ` Patrick McHardy
2009-11-12 15:54     ` Gregory Haskins
2009-11-12 15:59       ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2009-12-03 20:40 [PATCH 3/3] macvlan: allow in-kernel modules to create and manage macvlan devices Patrick Mullaney
2009-12-03 20:45 Patrick Mullaney
2009-12-03 21:28 ` Arnd Bergmann

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