Commit 3f78a3f4 authored by Committed by Greg Kroah-Hartman
ip: use rb trees for IP frag queue.
commit fa0f527358bd900ef92f925878ed6bfbd51305cc upstream. Similar to TCP OOO RX queue, it makes sense to use rb trees to store IP fragments, so that OOO fragments are inserted faster. Tested: - a follow-up patch contains a rather comprehensive ip defrag self-test (functional) - ran neper `udp_stream -c -H <host> -F 100 -l 300 -T 20`: netstat --statistics Ip: 282078937 total packets received 0 forwarded 0 incoming packets discarded 946760 incoming packets delivered 18743456 requests sent out 101 fragments dropped after timeout 282077129 reassemblies required 944952 packets reassembled ok 262734239 packet reassembles failed (The numbers/stats above are somewhat better re: reassemblies vs a kernel without this patchset. More comprehensive performance testing TBD). Reported-by: Jann Horn <firstname.lastname@example.org> Reported-by: Juha-Matti Tilli <email@example.com> Suggested-by: Eric Dumazet <firstname.lastname@example.org> Signed-off-by: Peter Oskolkov <email@example.com> Signed-off-by: Eric Dumazet <firstname.lastname@example.org> Cc: Florian Westphal <email@example.com> Signed-off-by: David S. Miller <firstname.lastname@example.org> Signed-off-by: Mao Wenan <email@example.com> [bwh: Backported to 4.4: - Keep using frag_kfree_skb() in inet_frag_destroy() - Adjust context] Signed-off-by: Ben Hutchings <firstname.lastname@example.org> Signed-off-by: Greg Kroah-Hartman <email@example.com>
Showing with 117 additions and 90 deletions