XEN dom0 networking assumes dev->master is bond device
and it tries to access bond private structure from dev->master ptr
on receive path. This causes panic, Therefore do not set dev->master
for XEN.

Signed-off-by: Pravin B Shelar <pshe...@nicira.com>
Bug #18920
---
 datapath/linux/compat/include/linux/netdevice.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/datapath/linux/compat/include/linux/netdevice.h 
b/datapath/linux/compat/include/linux/netdevice.h
index 3f66d3a..9f49c26 100644
--- a/datapath/linux/compat/include/linux/netdevice.h
+++ b/datapath/linux/compat/include/linux/netdevice.h
@@ -190,6 +190,18 @@ static inline struct sk_buff *__skb_gso_segment(struct 
sk_buff *skb,
 #endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
+
+#if defined(CONFIG_XEN)
+/* XEN assumes dev->master as bond device which causes netif_receive_skb()
+ * panic, Therefore ignore upper device setting on XEN.
+ * ref: netif_receive_skb() for XEN dom0. */
+#define netdev_set_master rpl_netdev_set_master
+static inline int netdev_set_master(struct net_device *slave, struct 
net_device *master)
+{
+       return 0;
+}
+#endif
+
 static inline int netdev_master_upper_dev_link(struct net_device *dev,
                                               struct net_device *upper_dev)
 {
-- 
1.7.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to