summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorJoe Stringer <joe@ovn.org>2016-07-12 15:26:19 -0700
committerJoe Stringer <joe@ovn.org>2016-08-01 14:16:10 -0700
commitccd0a13bfa5121b1d2215d7811056d9310ad1e31 (patch)
treedbe58c13d538a7ea67624da7e10ec6fb41dec535 /acinclude.m4
parente92669badd3f1b17fd3f6247b45f3de129bc108f (diff)
downloadopenvswitch-ccd0a13bfa5121b1d2215d7811056d9310ad1e31.tar.gz
compat: Simplify inet_fragment backports.
The core fragmentation handling logic is exported on all supported kernels, so it's not necessary to backport the latest version of this. This greatly simplifies the code due to inconsistencies between the old per-lookup garbage collection and the newer workqueue based garbage collection. As a result of simplifying and removing unnecessary backport code, a few bugs are fixed for corner cases such as when some fragments remain in the fragment cache when openvswitch is unloaded. Some backported ip functions need a little extra logic than what is seen on the latest code due to this, for instance on kernels <3.17: * Call inet_frag_evictor() before defrag * Limit hashsize in ip{,6}_fragment logic The pernet init/exit logic also differs a little from upstream. Upstream ipv[46]_defrag logic initializes the various pernet fragment parameters and its own global fragments cache. In the OVS backport, the pernet parameters are shared while the fragments cache is separate. The backport relies upon upstream pernet initialization to perform the shared setup, and performs no pernet initialization of its own. When it comes to pernet exit however, the backport must ensure that all OVS-specific fragment state is cleared, while the shared state remains untouched so that the regular ipv[46] logic may do its own cleanup. In practice this means that OVS must have its own divergent implementation of inet_frags_exit_net(). Fixes the following crash: Call Trace: <IRQ> [<ffffffff810744f6>] ? call_timer_fn+0x36/0x100 [<ffffffff8107548f>] run_timer_softirq+0x1ef/0x2f0 [<ffffffff8106cccc>] __do_softirq+0xec/0x2c0 [<ffffffff8106d215>] irq_exit+0x105/0x110 [<ffffffff81737095>] smp_apic_timer_interrupt+0x45/0x60 [<ffffffff81735a1d>] apic_timer_interrupt+0x6d/0x80 <EOI> [<ffffffff8104f596>] ? native_safe_halt+0x6/0x10 [<ffffffff8101cb2f>] default_idle+0x1f/0xc0 [<ffffffff8101d406>] arch_cpu_idle+0x26/0x30 [<ffffffff810bf3a5>] cpu_startup_entry+0xc5/0x290 [<ffffffff810415ed>] start_secondary+0x21d/0x2d0 Code: Bad RIP value. RIP [<ffffffffa0177480>] 0xffffffffa0177480 RSP <ffff88003f703e78> CR2: ffffffffa0177480 ---[ end trace eb98ca80ba07bd9c ]--- Kernel panic - not syncing: Fatal exception in interrupt Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Pravin B Shelar <pshelar@ovn.org>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m41
1 files changed, 1 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index faf79eb9d..7a714b2cb 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -428,6 +428,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
OVS_GREP_IFELSE([$KSRC/include/net/inet_frag.h], [last_in],
[OVS_DEFINE([HAVE_INET_FRAGS_LAST_IN])])
OVS_GREP_IFELSE([$KSRC/include/net/inet_frag.h], [inet_frag_evicting])
+ OVS_GREP_IFELSE([$KSRC/include/net/inet_frag.h], [inet_frag_evictor])
OVS_FIND_FIELD_IFELSE([$KSRC/include/net/inet_frag.h], [inet_frags],
[frags_work])
OVS_FIND_FIELD_IFELSE([$KSRC/include/net/inet_frag.h], [inet_frags],