All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch net] macvlan: add NETIF_F_NETNS_LOCAL flag
@ 2014-02-11  1:36 Cong Wang
  2014-02-11  1:45 ` Hannes Frederic Sowa
  2014-02-11  4:14 ` Eric Dumazet
  0 siblings, 2 replies; 12+ messages in thread
From: Cong Wang @ 2014-02-11  1:36 UTC (permalink / raw)
  To: netdev; +Cc: Patrick McHardy, David S. Miller, Cong Wang, Cong Wang

From: Cong Wang <cwang@twopensource.com>

BZ: https://bugzilla.kernel.org/show_bug.cgi?id=66691

There is no point to allow moving a macvlan device to
another namespace while the lower device is still in
this namespace. tunnels already set this flag.

Cc: Patrick McHardy <kaber@trash.net>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

---
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 8433de4..9bc3b13 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -539,7 +539,7 @@ static int macvlan_init(struct net_device *dev)
 	dev->state		= (dev->state & ~MACVLAN_STATE_MASK) |
 				  (lowerdev->state & MACVLAN_STATE_MASK);
 	dev->features 		= lowerdev->features & MACVLAN_FEATURES;
-	dev->features		|= NETIF_F_LLTX;
+	dev->features		|= NETIF_F_LLTX | NETIF_F_NETNS_LOCAL;
 	dev->gso_max_size	= lowerdev->gso_max_size;
 	dev->iflink		= lowerdev->ifindex;
 	dev->hard_header_len	= lowerdev->hard_header_len;
@@ -699,7 +699,7 @@ static netdev_features_t macvlan_fix_features(struct net_device *dev,
 	features = netdev_increment_features(vlan->lowerdev->features,
 					     features,
 					     mask);
-	features |= NETIF_F_LLTX;
+	features |= NETIF_F_LLTX | NETIF_F_NETNS_LOCAL;
 
 	return features;
 }

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

end of thread, other threads:[~2014-02-12 10:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-11  1:36 [Patch net] macvlan: add NETIF_F_NETNS_LOCAL flag Cong Wang
2014-02-11  1:45 ` Hannes Frederic Sowa
2014-02-11  2:25   ` Cong Wang
2014-02-11  2:40     ` Hannes Frederic Sowa
2014-02-11  4:15       ` Eric Dumazet
2014-02-11  4:41         ` Cong Wang
2014-02-11  5:21           ` Eric Dumazet
2014-02-11  5:37             ` Eric Dumazet
2014-02-11  5:38               ` Eric Dumazet
2014-02-12 10:03                 ` Nicolas Dichtel
2014-02-12  9:47         ` Nicolas Dichtel
2014-02-11  4:14 ` Eric Dumazet

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.