-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 19/08/13 17:23, Jesse Gross wrote: >> Is this the case? Is the delta between DKMS and native kernel >>> disappearing? Can I just ship the userspace tooling for 13.10 >>> of Ubuntu? > It's going away but it's not quite there yet. The 3.11 upstream > kernel supports GRE but not VXLAN (that's hopefully coming in 3.12) > so I think it probably makes sense to go with the out of tree > version for one more release and then switch over.
That makes sense to me as well; roll on 14.04! >>> If not, some help diagnosing the issue I'm seeing would be >>> great: >>> >>> https://bugs.launchpad.net/ubuntu/+source/openvswitch/+bug/1213879 > >>> Here's an upstream commit that is definitely needed as part of 3.11 > support and looks at least somewhat related, so it might be a good > place to start: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/net/openvswitch?id=351638e7deeed2ec8ce451b53d33921b3da68f83 Thank > for the pointer - this got me over the immediate kernel panic I saw with the master branch on 3.11; see attached patch file for the full delta I'm using. I'm currently hitting a WARN_ON in net/core/dev.c:5078 /* Notifier chain MUST detach us all upper devices. */ WARN_ON(netdev_has_any_upper_dev(dev)); This occurs when devices are being destroyed in openvswitch (I'm using mininet with a two switch, 14 host topology for testing). Any ideas? The stock openvswitch module in the 3.11 kernel does not exhibit the same behaviour so I've been looking there for clues... Full trace: Aug 21 10:13:42 armstrong kernel: [ 2423.059333] ------------[ cut here ]------------ Aug 21 10:13:42 armstrong kernel: [ 2423.059351] WARNING: CPU: 2 PID: 5286 at /build/buildd/linux-3.11.0/net/core/dev.c:5078 rollback_registered_many+0x219/0x250() Aug 21 10:13:42 armstrong kernel: [ 2423.059355] Modules linked in: openvswitch(OF) veth(F) xt_conntrack(F) ipt_REJECT(F) xt_CHECKSUM(F) iptable_mangle(F) xt_tcpudp(F) ip6table_filter(F) ip6_tables(F) iptable_filter(F) ebtable_nat(F) ebtables(F) ipt_MASQUERADE(F) iptable_nat(F) nf_conntrack_ipv4(F) nf_defrag_ipv4(F) nf_nat_ipv4(F) nf_nat(F) nf_conntrack(F) ip_tables(F) x_tables(F) bridge(F) stp(F) llc(F) dm_crypt(F) gre(F) x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel(F) kvm(F) crc32_pclmul(F) ghash_clmulni_intel(F) aesni_intel(F) aes_x86_64(F) lrw(F) gf128mul(F) glue_helper(F) ablk_helper(F) cryptd(F) snd_usb_audio snd_usbmidi_lib microcode(F) psmouse(F) serio_raw(F) thinkpad_acpi nvram(F) snd_seq_midi(F) snd_seq_midi_event(F) uvcvideo snd_hda_codec_hdmi snd_rawmidi(F) videobuf2_vmalloc arc4(F) videobuf2_memops joydev(F) parport_pc(F) snd_hda_codec_realtek videobuf2_core videodev ppdev(F) snd_seq(F) iwldvm snd_hda_intel mac80211 btusb snd_hda_codec snd_hwdep(F) iwlwifi snd_pcm(F) lpc_ich bnep cfg80211 r Aug 21 10:13:42 armstrong kernel: fcomm bluetooth snd_seq_device(F) snd_page_alloc(F) snd_timer(F) snd(F) tpm_tis soundcore(F) intel_rst mei_me mei mac_hid lp(F) parport(F) nls_iso8859_1(F) usb_storage(F) hid_generic hid_microsoft usbhid hid mmc_block i915 i2c_algo_bit drm_kms_helper drm sdhci_pci ahci(F) libahci(F) sdhci e1000e(F) ptp(F) pps_core(F) wmi video(F) [last unloaded: openvswitch] Aug 21 10:13:42 armstrong kernel: [ 2423.059516] CPU: 2 PID: 5286 Comm: ip Tainted: GF W O 3.11.0-3-generic #7-Ubuntu Aug 21 10:13:42 armstrong kernel: [ 2423.059521] Hardware name: LENOVO 2324CTO/2324CTO, BIOS G2ET91WW (2.51 ) 01/14/2013 Aug 21 10:13:42 armstrong kernel: [ 2423.059524] 0000000000000009 ffff88037b8fd8a8 ffffffff816f0d91 0000000000000000 Aug 21 10:13:42 armstrong kernel: [ 2423.059532] ffff88037b8fd8e0 ffffffff81061ced ffff880387b6a000 ffff88037b8fd8d8 Aug 21 10:13:42 armstrong kernel: [ 2423.059539] ffff88037b8fd948 0000000000000000 ffffffff81cd3880 ffff88037b8fd8f0 Aug 21 10:13:42 armstrong kernel: [ 2423.059546] Call Trace: Aug 21 10:13:42 armstrong kernel: [ 2423.059557] [<ffffffff816f0d91>] dump_stack+0x45/0x56 Aug 21 10:13:42 armstrong kernel: [ 2423.059567] [<ffffffff81061ced>] warn_slowpath_common+0x7d/0xa0 Aug 21 10:13:42 armstrong kernel: [ 2423.059575] [<ffffffff81061dca>] warn_slowpath_null+0x1a/0x20 Aug 21 10:13:42 armstrong kernel: [ 2423.059582] [<ffffffff815f7af9>] rollback_registered_many+0x219/0x250 Aug 21 10:13:42 armstrong kernel: [ 2423.059590] [<ffffffff815f7b87>] unregister_netdevice_many+0x17/0x70 Aug 21 10:13:42 armstrong kernel: [ 2423.059599] [<ffffffff8160b29f>] rtnl_dellink+0xbf/0x130 Aug 21 10:13:42 armstrong kernel: [ 2423.059608] [<ffffffff81608619>] rtnetlink_rcv_msg+0x99/0x260 Aug 21 10:13:42 armstrong kernel: [ 2423.059617] [<ffffffff816f4ea3>] ? __mutex_lock_slowpath+0xb3/0x1c0 Aug 21 10:13:42 armstrong kernel: [ 2423.059624] [<ffffffff81608580>] ? rtnetlink_rcv+0x30/0x30 Aug 21 10:13:42 armstrong kernel: [ 2423.059632] [<ffffffff81626469>] netlink_rcv_skb+0xa9/0xc0 Aug 21 10:13:42 armstrong kernel: [ 2423.059639] [<ffffffff81608578>] rtnetlink_rcv+0x28/0x30 Aug 21 10:13:42 armstrong kernel: [ 2423.059646] [<ffffffff81625abd>] netlink_unicast+0xdd/0x190 Aug 21 10:13:42 armstrong kernel: [ 2423.059655] [<ffffffff8136b9bd>] ? memcpy_fromiovec+0x4d/0x90 Aug 21 10:13:42 armstrong kernel: [ 2423.059662] [<ffffffff81625e6f>] netlink_sendmsg+0x2ff/0x740 Aug 21 10:13:42 armstrong kernel: [ 2423.059671] [<ffffffff815e38f9>] sock_sendmsg+0x99/0xd0 Aug 21 10:13:42 armstrong kernel: [ 2423.059680] [<ffffffff815e3cec>] ___sys_sendmsg+0x36c/0x380 Aug 21 10:13:42 armstrong kernel: [ 2423.059689] [<ffffffff811684e9>] ? handle_mm_fault+0x299/0x670 Aug 21 10:13:42 armstrong kernel: [ 2423.059697] [<ffffffff816fc0a4>] ? __do_page_fault+0x204/0x540 Aug 21 10:13:42 armstrong kernel: [ 2423.059704] [<ffffffff811ba80f>] ? __d_free+0x3f/0x60 Aug 21 10:13:42 armstrong kernel: [ 2423.059712] [<ffffffff811043ac>] ? acct_account_cputime+0x1c/0x20 Aug 21 10:13:42 armstrong kernel: [ 2423.059722] [<ffffffff8109796c>] ? account_user_time+0x9c/0xb0 Aug 21 10:13:42 armstrong kernel: [ 2423.059729] [<ffffffff815e4ad2>] __sys_sendmsg+0x42/0x80 Aug 21 10:13:42 armstrong kernel: [ 2423.059736] [<ffffffff815e4b22>] SyS_sendmsg+0x12/0x20 Aug 21 10:13:42 armstrong kernel: [ 2423.059744] [<ffffffff81700e2f>] tracesys+0xe1/0xe6 Aug 21 10:13:42 armstrong kernel: [ 2423.059749] ---[ end trace a1b3bba9c9d8f049 ]--- - -- James Page Ubuntu and Debian Developer james.p...@ubuntu.com jamesp...@debian.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQIcBAEBCAAGBQJSFIfVAAoJEL/srsug59jDkg8P/370TW/gRa+zvnx42x0IUSEd kUk6RKJBh43DnoPmwCo52uuR4t4CYhgxm0gjKTRU2sSanb/7FHq3Sf8MERK/iQvx 9VcDE4jeJnBNv5COz7vlgQRtwvnmrrKwnN2PKFTdv6bRz5SOl2lWe0Z57x4KtvPK RVikRoqdfsRQIkuf5QXVJSsZwKMbRBHpyriVXV6fn8abudz9nG9StIajtrCuKIj5 hCpk9p5TIgqFCurJtSGn1ped9oJxJva2OVObt9StrK6efCmL8Z9WXvyXyKqHlkzm CnkdcjDolTppduy0dll9waTceBBBWcxxXBNi3r/KtLcEa7kgCY1S7rSND/CYXfiL YW7XiUQZkZC8PmR0Y8fcSSmcbMXBVV5LAGJtPCOgd9Pjc/AcFhWmGYAm3pIcsIzA LS4OTMErBbKYDQOoF8JT0Joy7aiZbC+8hKB+4ONOrnrO7MP5kIxnHIiedfko20MY JLfSbNk4qPKrsAu9PO13Kmwq0BzGITJFK4xZHq3aubEoxYvrdKp0UXf7CgFFRQGv KSarAdITvCWLSLLzKiZKDwUBpt+Vgy5NlsTdIvaeoi3KxNhU0LvRCWSkR8BwJhR3 u1pbqph6/Dy5HeJZRMbunIhTeB8X3TyEHuC7oeF+B5ZSfkNUWE9CuNvZw8S2K64z Mbn+UZ/7b0rP+tErMkzH =uTU7 -----END PGP SIGNATURE-----
>From 4d614a37df3f77b76eddf1cd9a3d959ed42d8699 Mon Sep 17 00:00:00 2001 From: James Page <james.p...@ubuntu.com> Date: Wed, 21 Aug 2013 10:15:30 +0100 Subject: [PATCH] datapath: Add support for Linux 3.11 --- FAQ | 2 +- NEWS | 2 +- datapath/datapath.c | 4 ++-- datapath/dp_notify.c | 2 +- datapath/linux/compat/gre.c | 4 ++++ datapath/linux/compat/include/linux/netdevice.h | 11 +++++++++++ datapath/linux/compat/include/net/gre.h | 3 +++ 7 files changed, 23 insertions(+), 5 deletions(-) diff --git a/FAQ b/FAQ index 75d9007..6eb66d4 100644 --- a/FAQ +++ b/FAQ @@ -148,7 +148,7 @@ A: The following table lists the Linux kernel versions against which the 1.9.x 2.6.18 to 3.8 1.10.x 2.6.18 to 3.8 1.11.x 2.6.18 to 3.8 - 1.12.x 2.6.18 to 3.10 + 1.12.x 2.6.18 to 3.11 Open vSwitch userspace should also work with the Linux kernel module built into Linux 3.3 and later. diff --git a/NEWS b/NEWS index 1246383..ac6cc00 100644 --- a/NEWS +++ b/NEWS @@ -22,7 +22,7 @@ v1.12.0 - xx xxx xxxx through database paths (e.g. Private key option with the database name should look like "--private-key=db:Open_vSwitch,SSL,private_key"). - Added ovs-dev.py, a utility script helpful for Open vSwitch developers. - - Support for Linux kernels up to 3.10 + - Support for Linux kernels up to 3.11 - ovs-ofctl: * New "ofp-parse" for printing OpenFlow messages read from a file. diff --git a/datapath/datapath.c b/datapath/datapath.c index 48f17c0..c01a715 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -62,8 +62,8 @@ #include "vport-netdev.h" #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) || \ - LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0) -#error Kernels before 2.6.18 or after 3.9 are not supported by this version of Open vSwitch. + LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0) +#error Kernels before 2.6.18 or after 3.11 are not supported by this version of Open vSwitch. #endif #define REHASH_FLOW_INTERVAL (10 * 60 * HZ) diff --git a/datapath/dp_notify.c b/datapath/dp_notify.c index d530893..db670e1 100644 --- a/datapath/dp_notify.c +++ b/datapath/dp_notify.c @@ -79,7 +79,7 @@ static int dp_device_event(struct notifier_block *unused, unsigned long event, void *ptr) { struct ovs_net *ovs_net; - struct net_device *dev = ptr; + struct net_device *dev = netdev_notifier_info_to_dev(ptr); struct vport *vport = NULL; if (!ovs_is_internal_dev(dev)) diff --git a/datapath/linux/compat/gre.c b/datapath/linux/compat/gre.c index 582bd94..d02537a 100644 --- a/datapath/linux/compat/gre.c +++ b/datapath/linux/compat/gre.c @@ -19,6 +19,8 @@ #include <linux/kconfig.h> #if IS_ENABLED(CONFIG_NET_IPGRE_DEMUX) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) + #include <linux/module.h> #include <linux/if.h> #include <linux/if_tunnel.h> @@ -354,4 +356,6 @@ int gre_cisco_unregister(struct gre_cisco_protocol *proto) return ret; } +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) */ + #endif /* CONFIG_NET_IPGRE_DEMUX */ diff --git a/datapath/linux/compat/include/linux/netdevice.h b/datapath/linux/compat/include/linux/netdevice.h index 2ceff22..4b2b4e5 100644 --- a/datapath/linux/compat/include/linux/netdevice.h +++ b/datapath/linux/compat/include/linux/netdevice.h @@ -208,4 +208,15 @@ static inline void netdev_upper_dev_unlink(struct net_device *dev, } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) + +/* Simply pass through the passed parameter for Linux < 3.11.0 */ +static inline struct net_device * +netdev_notifier_info_to_dev(void *info) +{ + return info; +} + +#endif + #endif diff --git a/datapath/linux/compat/include/net/gre.h b/datapath/linux/compat/include/net/gre.h index 5f46aed..a51b0bc 100644 --- a/datapath/linux/compat/include/net/gre.h +++ b/datapath/linux/compat/include/net/gre.h @@ -73,6 +73,8 @@ static inline __be16 tnl_flags_to_gre_flags(__be16 tflags) } #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) + #define MAX_GRE_PROTO_PRIORITY 255 struct gre_cisco_protocol { int (*handler)(struct sk_buff *skb, const struct tnl_ptk_info *tpi); @@ -102,5 +104,6 @@ static inline int ip_gre_calc_hlen(__be16 o_flags) return addend; } +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0) */ #endif -- 1.8.3.2
_______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev