diff options
author | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2014-04-02 00:54:30 +0000 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2014-04-08 18:16:21 -0700 |
commit | 9cffb9dd036e0e3e0ee6d91c715bea4d82365c28 (patch) | |
tree | 9945fd348a29e0256d5b9b40d568cd4dd3ad7b88 /backport/backport-include | |
parent | 357791393648fc97e66aa8dd914f43cc7c908864 (diff) |
backports: backport inet_frag_maybe_warn_overflow()
This is used by the ieee802154 reassembly code. This is
a straight forward backport.
mcgrof@ergon ~/linux-next (git::master)$ git describe --contains 5a3da1fe95
v3.9-rc4~27^2
commit 5a3da1fe9561828d0ca7eca664b16ec2b9bf0055
Author: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Fri Mar 15 11:32:30 2013 +0000
inet: limit length of fragment queue hash table bucket lists
This patch introduces a constant limit of the fragment queue hash
table bucket list lengths. Currently the limit 128 is choosen somewhat
arbitrary and just ensures that we can fill up the fragment cache with
empty packets up to the default ip_frag_high_thresh limits. It should
just protect from list iteration eating considerable amounts of cpu.
If we reach the maximum length in one hash bucket a warning is printed.
This is implemented on the caller side of inet_frag_find to distinguish
between the different users of inet_fragment.c.
I dropped the out of memory warning in the ipv4 fragment lookup path,
because we already get a warning by the slab allocator.
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jesper Dangaard Brouer <jbrouer@redhat.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Diffstat (limited to 'backport/backport-include')
-rw-r--r-- | backport/backport-include/net/inet_frag.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/backport/backport-include/net/inet_frag.h b/backport/backport-include/net/inet_frag.h index 167792bf..3c9e11a4 100644 --- a/backport/backport-include/net/inet_frag.h +++ b/backport/backport-include/net/inet_frag.h @@ -34,6 +34,11 @@ static inline int sum_frag_mem_limit(struct netns_frags *nf) { return atomic_read(&nf->mem); } + +#define inet_frag_maybe_warn_overflow LINUX_BACKPORT(inet_frag_maybe_warn_overflow) +void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q, + const char *prefix); #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */ + #endif /* __BACKPORT__NET_FRAG_H__ */ |