All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v2 0/4] net: bridge / ip optimizations for virtual net backends
@ 2014-02-15  2:59 Luis R. Rodriguez
  2014-02-15  2:59 ` [RFC v2 1/4] bridge: enable interfaces to opt out from becoming the root bridge Luis R. Rodriguez
                   ` (8 more replies)
  0 siblings, 9 replies; 157+ messages in thread
From: Luis R. Rodriguez @ 2014-02-15  2:59 UTC (permalink / raw)
  To: netdev; +Cc: xen-devel, kvm, linux-kernel, Luis R. Rodriguez

From: "Luis R. Rodriguez" <mcgrof@suse.com>

This v2 series changes the approach from my original virtualization
multicast patch series [0] by abandoning completely the multicast
issues and instead generalizing an approach for virtualization
backends. There are two things in common with virtualization
backends:

  0) they should not become the root bridge
  1) they don't need ipv4 / ipv6 interfaces

Both qemu's usage of TAP interfaces and xen-netback's driver
avoid getting their interfaces added to the root bridge by
using a high MAC address. Lets just generalize the solution
by making this a flag.

The skipping of IPv4 / IPv6 interfaces is an optimization
I observed possible while studying the xen-netback in a
shared physical bridge environment. I haven't been able
to test the NAT environment so I appreciate it if someone
can test these patches for that case if I don't get to it
eventually.

The same flags can be embraced by TAP interfaces when needed,
I tested this as a temporary patch as follows:

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 44c4db8..19b967e 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -940,6 +940,7 @@ static void tun_net_init(struct net_device *dev)
 		ether_setup(dev);
 		dev->priv_flags &= ~IFF_TX_SKB_SHARING;
 		dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
+		dev->priv_flags |= IFF_BRIDGE_NON_ROOT | IFF_SKIP_IP;
 
 		eth_hw_addr_random(dev);
 

a proper followup would be to specify the flags during open() or any
way prior, just to register_netdevice(). Before that is done we'd
need to evaluate all qemu use cases of the TAP interfaces both
for the xen HVM case (which tests fine for me) and for KVM's
use cases on both shared physical and in the NAT case. That is,
test the above patch and this series for all KVM / xen use cases.

[0] http://marc.info/?l=linux-netdev&m=139207142110536&w=2

Luis R. Rodriguez (4):
  bridge: enable interfaces to opt out from becoming the root bridge
  net: enables interface option to skip IP
  xen-netback: use a random MAC address
  xen-netback: skip IPv4 and IPv6 interfaces

 drivers/net/xen-netback/interface.c | 14 +++++---------
 include/uapi/linux/if.h             |  2 ++
 net/bridge/br_if.c                  |  2 ++
 net/bridge/br_private.h             |  1 +
 net/bridge/br_stp_if.c              |  2 ++
 net/ipv4/devinet.c                  |  3 +++
 net/ipv6/addrconf.c                 |  6 ++++++
 7 files changed, 21 insertions(+), 9 deletions(-)

-- 
1.8.5.2


^ permalink raw reply related	[flat|nested] 157+ messages in thread
* [RFC v2 0/4] net: bridge / ip optimizations for virtual net backends
@ 2014-02-15  2:59 Luis R. Rodriguez
  0 siblings, 0 replies; 157+ messages in thread
From: Luis R. Rodriguez @ 2014-02-15  2:59 UTC (permalink / raw)
  To: netdev; +Cc: xen-devel, Luis R. Rodriguez, linux-kernel, kvm

From: "Luis R. Rodriguez" <mcgrof@suse.com>

This v2 series changes the approach from my original virtualization
multicast patch series [0] by abandoning completely the multicast
issues and instead generalizing an approach for virtualization
backends. There are two things in common with virtualization
backends:

  0) they should not become the root bridge
  1) they don't need ipv4 / ipv6 interfaces

Both qemu's usage of TAP interfaces and xen-netback's driver
avoid getting their interfaces added to the root bridge by
using a high MAC address. Lets just generalize the solution
by making this a flag.

The skipping of IPv4 / IPv6 interfaces is an optimization
I observed possible while studying the xen-netback in a
shared physical bridge environment. I haven't been able
to test the NAT environment so I appreciate it if someone
can test these patches for that case if I don't get to it
eventually.

The same flags can be embraced by TAP interfaces when needed,
I tested this as a temporary patch as follows:

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 44c4db8..19b967e 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -940,6 +940,7 @@ static void tun_net_init(struct net_device *dev)
 		ether_setup(dev);
 		dev->priv_flags &= ~IFF_TX_SKB_SHARING;
 		dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
+		dev->priv_flags |= IFF_BRIDGE_NON_ROOT | IFF_SKIP_IP;
 
 		eth_hw_addr_random(dev);
 

a proper followup would be to specify the flags during open() or any
way prior, just to register_netdevice(). Before that is done we'd
need to evaluate all qemu use cases of the TAP interfaces both
for the xen HVM case (which tests fine for me) and for KVM's
use cases on both shared physical and in the NAT case. That is,
test the above patch and this series for all KVM / xen use cases.

[0] http://marc.info/?l=linux-netdev&m=139207142110536&w=2

Luis R. Rodriguez (4):
  bridge: enable interfaces to opt out from becoming the root bridge
  net: enables interface option to skip IP
  xen-netback: use a random MAC address
  xen-netback: skip IPv4 and IPv6 interfaces

 drivers/net/xen-netback/interface.c | 14 +++++---------
 include/uapi/linux/if.h             |  2 ++
 net/bridge/br_if.c                  |  2 ++
 net/bridge/br_private.h             |  1 +
 net/bridge/br_stp_if.c              |  2 ++
 net/ipv4/devinet.c                  |  3 +++
 net/ipv6/addrconf.c                 |  6 ++++++
 7 files changed, 21 insertions(+), 9 deletions(-)

-- 
1.8.5.2

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

end of thread, other threads:[~2014-02-26  1:29 UTC | newest]

Thread overview: 157+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-15  2:59 [RFC v2 0/4] net: bridge / ip optimizations for virtual net backends Luis R. Rodriguez
2014-02-15  2:59 ` [RFC v2 1/4] bridge: enable interfaces to opt out from becoming the root bridge Luis R. Rodriguez
2014-02-15  2:59 ` Luis R. Rodriguez
2014-02-15  2:59   ` [Bridge] " Luis R. Rodriguez
2014-02-15  2:59   ` Luis R. Rodriguez
2014-02-16 18:56   ` Ben Hutchings
2014-02-16 18:56     ` [Bridge] " Ben Hutchings
2014-02-16 18:56   ` Ben Hutchings
2014-02-16 18:57   ` Stephen Hemminger
2014-02-16 18:57   ` Stephen Hemminger
2014-02-16 18:57     ` [Bridge] " Stephen Hemminger
2014-02-16 18:57     ` Stephen Hemminger
2014-02-18 21:02     ` Luis R. Rodriguez
2014-02-18 21:02     ` Luis R. Rodriguez
2014-02-18 21:02       ` [Bridge] " Luis R. Rodriguez
2014-02-19  9:52       ` [Xen-devel] " Ian Campbell
2014-02-19  9:52         ` [Bridge] " Ian Campbell
2014-02-19  9:52         ` Ian Campbell
2014-02-19 14:35         ` Zoltan Kiss
2014-02-19 14:35         ` [Xen-devel] " Zoltan Kiss
2014-02-19 14:35           ` [Bridge] " Zoltan Kiss
2014-02-19 17:02           ` Luis R. Rodriguez
2014-02-19 17:02           ` [Xen-devel] " Luis R. Rodriguez
2014-02-19 17:02             ` [Bridge] " Luis R. Rodriguez
2014-02-19 17:08             ` Stephen Hemminger
2014-02-19 17:08             ` [Xen-devel] " Stephen Hemminger
2014-02-19 17:08               ` [Bridge] " Stephen Hemminger
2014-02-19 17:08               ` Stephen Hemminger
2014-02-19 17:59               ` Luis R. Rodriguez
2014-02-19 17:59               ` [Xen-devel] " Luis R. Rodriguez
2014-02-19 17:59                 ` [Bridge] " Luis R. Rodriguez
2014-02-19 17:59                 ` Luis R. Rodriguez
2014-02-20 17:19                 ` Stephen Hemminger
2014-02-20 17:19                 ` [Xen-devel] " Stephen Hemminger
2014-02-20 17:19                   ` [Bridge] " Stephen Hemminger
2014-02-20 17:19                   ` Stephen Hemminger
2014-02-20 20:24                   ` Luis R. Rodriguez
2014-02-20 20:24                   ` [Xen-devel] " Luis R. Rodriguez
2014-02-20 20:24                     ` [Bridge] " Luis R. Rodriguez
2014-02-20 20:24                     ` Luis R. Rodriguez
2014-02-21 13:02                     ` Zoltan Kiss
2014-02-21 13:02                     ` [Xen-devel] " Zoltan Kiss
2014-02-21 13:02                       ` [Bridge] " Zoltan Kiss
2014-02-21 16:01                       ` Luis R. Rodriguez
2014-02-21 16:01                       ` [Xen-devel] " Luis R. Rodriguez
2014-02-21 16:01                         ` [Bridge] " Luis R. Rodriguez
2014-02-21 16:01                         ` Luis R. Rodriguez
2014-02-22  1:38                         ` Luis R. Rodriguez
2014-02-22  1:38                           ` [Bridge] " Luis R. Rodriguez
2014-02-22  1:38                           ` Luis R. Rodriguez
2014-02-22  1:38                         ` Luis R. Rodriguez
2014-02-20 13:19             ` Zoltan Kiss
2014-02-20 13:19             ` [Xen-devel] " Zoltan Kiss
2014-02-20 13:19               ` [Bridge] " Zoltan Kiss
2014-02-20 20:01               ` Luis R. Rodriguez
2014-02-20 20:01               ` [Xen-devel] " Luis R. Rodriguez
2014-02-20 20:01                 ` [Bridge] " Luis R. Rodriguez
2014-02-20 20:01                 ` Luis R. Rodriguez
2014-02-21 13:02                 ` Zoltan Kiss
2014-02-21 13:02                   ` [Bridge] " Zoltan Kiss
2014-02-21 15:59                   ` Luis R. Rodriguez
2014-02-21 15:59                   ` [Xen-devel] " Luis R. Rodriguez
2014-02-21 15:59                     ` [Bridge] " Luis R. Rodriguez
2014-02-21 15:59                     ` Luis R. Rodriguez
2014-02-21 13:02                 ` Zoltan Kiss
2014-02-19  9:52       ` Ian Campbell
2014-02-17 17:52   ` Zoltan Kiss
2014-02-17 17:52   ` [Xen-devel] " Zoltan Kiss
2014-02-17 17:52     ` [Bridge] " Zoltan Kiss
2014-02-19 16:45     ` Luis R. Rodriguez
2014-02-19 16:45     ` [Xen-devel] " Luis R. Rodriguez
2014-02-19 16:45       ` [Bridge] " Luis R. Rodriguez
2014-02-19 16:45       ` Luis R. Rodriguez
2014-02-20 14:47       ` Zoltan Kiss
2014-02-20 14:47       ` [Xen-devel] " Zoltan Kiss
2014-02-20 14:47         ` [Bridge] " Zoltan Kiss
2014-02-20 20:28         ` Luis R. Rodriguez
2014-02-20 20:28         ` [Xen-devel] " Luis R. Rodriguez
2014-02-20 20:28           ` [Bridge] " Luis R. Rodriguez
2014-02-20 20:28           ` Luis R. Rodriguez
2014-02-15  2:59 ` [RFC v2 2/4] net: enables interface option to skip IP Luis R. Rodriguez
2014-02-15  2:59   ` Luis R. Rodriguez
2014-02-17 20:23   ` Dan Williams
2014-02-18 21:19     ` Luis R. Rodriguez
2014-02-18 21:42       ` Stephen Hemminger
2014-02-18 21:42       ` Stephen Hemminger
2014-02-19 17:13         ` Luis R. Rodriguez
2014-02-19 17:13         ` Luis R. Rodriguez
2014-02-19 16:45       ` Dan Williams
2014-02-19 16:45       ` Dan Williams
2014-02-19 17:20         ` Luis R. Rodriguez
2014-02-19 19:13           ` Zoltan Kiss
2014-02-19 19:13           ` Zoltan Kiss
2014-02-20 20:39             ` Luis R. Rodriguez
2014-02-21 13:02               ` Zoltan Kiss
2014-02-21 13:02               ` Zoltan Kiss
2014-02-22  1:40                 ` Luis R. Rodriguez
2014-02-22  1:40                 ` Luis R. Rodriguez
2014-02-20 20:39             ` Luis R. Rodriguez
2014-02-20  0:56           ` Dan Williams
2014-02-20  0:56           ` Dan Williams
2014-02-20  0:58             ` Hannes Frederic Sowa
2014-02-20  0:58             ` Hannes Frederic Sowa
2014-02-20  1:02               ` Dan Williams
2014-02-20  1:02               ` Dan Williams
2014-02-20 20:31             ` Luis R. Rodriguez
2014-02-20 20:31             ` Luis R. Rodriguez
2014-02-24 18:22               ` Dan Williams
2014-02-24 20:33                 ` Luis R. Rodriguez
2014-02-24 20:33                 ` Luis R. Rodriguez
2014-02-24 23:04                 ` David Miller
2014-02-24 23:04                 ` David Miller
2014-02-25  0:02                   ` Ben Hutchings
2014-02-25  0:12                     ` David Miller
2014-02-25  0:12                     ` David Miller
2014-02-25  2:01                       ` Ben Hutchings
2014-02-25  2:01                       ` Ben Hutchings
2014-02-25  2:23                         ` Hannes Frederic Sowa
2014-02-25  2:23                         ` Hannes Frederic Sowa
2014-02-25 19:50                       ` Paul Marks
2014-02-25 19:50                       ` Paul Marks
2014-02-25  0:02                   ` Ben Hutchings
2014-02-25 21:07                   ` Dan Williams
2014-02-25 21:07                   ` Dan Williams
2014-02-25 21:18                     ` David Miller
2014-02-25 21:18                     ` David Miller
2014-02-26  1:29                       ` Hannes Frederic Sowa
2014-02-26  1:29                       ` Hannes Frederic Sowa
2014-02-24 18:22               ` Dan Williams
2014-02-19 17:20         ` Luis R. Rodriguez
2014-02-18 21:19     ` Luis R. Rodriguez
2014-02-17 20:23   ` Dan Williams
2014-02-15  2:59 ` [RFC v2 3/4] xen-netback: use a random MAC address Luis R. Rodriguez
2014-02-15  2:59 ` Luis R. Rodriguez
2014-02-17 10:29   ` [Xen-devel] " David Vrabel
2014-02-18 11:22     ` Ian Campbell
2014-02-18 21:30       ` Luis R. Rodriguez
2014-02-18 21:30       ` Luis R. Rodriguez
2014-02-18 11:22     ` Ian Campbell
2014-02-17 10:29   ` David Vrabel
2014-02-15  2:59 ` [RFC v2 4/4] xen-netback: skip IPv4 and IPv6 interfaces Luis R. Rodriguez
2014-02-17 14:36   ` Zoltan Kiss
2014-02-17 14:36   ` [Xen-devel] " Zoltan Kiss
2014-02-18 20:16     ` Luis R. Rodriguez
2014-02-19  9:47       ` Ian Campbell
2014-02-19  9:47       ` Ian Campbell
2014-02-18 20:16     ` Luis R. Rodriguez
2014-02-15  2:59 ` Luis R. Rodriguez
2014-02-17 10:27 ` [Xen-devel] [RFC v2 0/4] net: bridge / ip optimizations for virtual net backends David Vrabel
2014-02-18 19:43   ` Luis R. Rodriguez
2014-02-18 19:43   ` [Xen-devel] " Luis R. Rodriguez
2014-02-19  9:48     ` Ian Campbell
2014-02-19  9:48     ` [Xen-devel] " Ian Campbell
2014-02-19 17:10       ` Luis R. Rodriguez
2014-02-19 17:10       ` [Xen-devel] " Luis R. Rodriguez
2014-02-17 10:27 ` David Vrabel
2014-02-15  2:59 Luis R. Rodriguez

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.