summaryrefslogtreecommitdiff
path: root/include/net/inet_frag.h
diff options
context:
space:
mode:
authorAnton Vorontsov <anton@enomsg.org>2013-03-25 07:06:35 +0400
committerAnton Vorontsov <anton@enomsg.org>2013-03-25 07:06:35 +0400
commit6e997bb894beef128fcfe1679e0830f97dee6dc2 (patch)
tree078d95af4d30b5e3d5b1db18de215489b26e01ce /include/net/inet_frag.h
parentc6cc9fc9d42ec82da2c770f0bef1488dc467f29c (diff)
parent92413a9bee1299cedcc0e5cfbfbc6b42496fb817 (diff)
downloadlinux-6e997bb894beef128fcfe1679e0830f97dee6dc2.tar.xz
Merge branch 'urgent'
Conflicts: drivers/power/pm2301_charger.c
Diffstat (limited to 'include/net/inet_frag.h')
-rw-r--r--include/net/inet_frag.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index 76c3fe5ecc2e..0a1dcc2fa2f5 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -43,6 +43,13 @@ struct inet_frag_queue {
#define INETFRAGS_HASHSZ 64
+/* averaged:
+ * max_depth = default ipfrag_high_thresh / INETFRAGS_HASHSZ /
+ * rounded up (SKB_TRUELEN(0) + sizeof(struct ipq or
+ * struct frag_queue))
+ */
+#define INETFRAGS_MAXDEPTH 128
+
struct inet_frags {
struct hlist_head hash[INETFRAGS_HASHSZ];
/* This rwlock is a global lock (seperate per IPv4, IPv6 and
@@ -76,6 +83,8 @@ int inet_frag_evictor(struct netns_frags *nf, struct inet_frags *f, bool force);
struct inet_frag_queue *inet_frag_find(struct netns_frags *nf,
struct inet_frags *f, void *key, unsigned int hash)
__releases(&f->lock);
+void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
+ const char *prefix);
static inline void inet_frag_put(struct inet_frag_queue *q, struct inet_frags *f)
{