aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_frag.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/inet_frag.h')
-rw-r--r--include/net/inet_frag.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h
index ed07e3786d98..1662cbc0b46b 100644
--- a/include/net/inet_frag.h
+++ b/include/net/inet_frag.h
@@ -2,7 +2,7 @@
2#ifndef __NET_FRAG_H__ 2#ifndef __NET_FRAG_H__
3#define __NET_FRAG_H__ 3#define __NET_FRAG_H__
4 4
5#include <linux/rhashtable.h> 5#include <linux/rhashtable-types.h>
6 6
7struct netns_frags { 7struct netns_frags {
8 /* sysctls */ 8 /* sysctls */
@@ -57,7 +57,9 @@ struct frag_v6_compare_key {
57 * @lock: spinlock protecting this frag 57 * @lock: spinlock protecting this frag
58 * @refcnt: reference count of the queue 58 * @refcnt: reference count of the queue
59 * @fragments: received fragments head 59 * @fragments: received fragments head
60 * @rb_fragments: received fragments rb-tree root
60 * @fragments_tail: received fragments tail 61 * @fragments_tail: received fragments tail
62 * @last_run_head: the head of the last "run". see ip_fragment.c
61 * @stamp: timestamp of the last received fragment 63 * @stamp: timestamp of the last received fragment
62 * @len: total length of the original datagram 64 * @len: total length of the original datagram
63 * @meat: length of received fragments so far 65 * @meat: length of received fragments so far
@@ -75,8 +77,10 @@ struct inet_frag_queue {
75 struct timer_list timer; 77 struct timer_list timer;
76 spinlock_t lock; 78 spinlock_t lock;
77 refcount_t refcnt; 79 refcount_t refcnt;
78 struct sk_buff *fragments; 80 struct sk_buff *fragments; /* Used in IPv6. */
81 struct rb_root rb_fragments; /* Used in IPv4. */
79 struct sk_buff *fragments_tail; 82 struct sk_buff *fragments_tail;
83 struct sk_buff *last_run_head;
80 ktime_t stamp; 84 ktime_t stamp;
81 int len; 85 int len;
82 int meat; 86 int meat;
@@ -112,6 +116,9 @@ void inet_frag_kill(struct inet_frag_queue *q);
112void inet_frag_destroy(struct inet_frag_queue *q); 116void inet_frag_destroy(struct inet_frag_queue *q);
113struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key); 117struct inet_frag_queue *inet_frag_find(struct netns_frags *nf, void *key);
114 118
119/* Free all skbs in the queue; return the sum of their truesizes. */
120unsigned int inet_frag_rbtree_purge(struct rb_root *root);
121
115static inline void inet_frag_put(struct inet_frag_queue *q) 122static inline void inet_frag_put(struct inet_frag_queue *q)
116{ 123{
117 if (refcount_dec_and_test(&q->refcnt)) 124 if (refcount_dec_and_test(&q->refcnt))