diff options
Diffstat (limited to 'include/net/request_sock.h')
-rw-r--r-- | include/net/request_sock.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index 72fd6f5e86b1..b52cc52ffe39 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -89,6 +89,7 @@ struct listen_sock { | |||
89 | int qlen_young; | 89 | int qlen_young; |
90 | int clock_hand; | 90 | int clock_hand; |
91 | u32 hash_rnd; | 91 | u32 hash_rnd; |
92 | u32 nr_table_entries; | ||
92 | struct request_sock *syn_table[0]; | 93 | struct request_sock *syn_table[0]; |
93 | }; | 94 | }; |
94 | 95 | ||
@@ -96,6 +97,7 @@ struct listen_sock { | |||
96 | * | 97 | * |
97 | * @rskq_accept_head - FIFO head of established children | 98 | * @rskq_accept_head - FIFO head of established children |
98 | * @rskq_accept_tail - FIFO tail of established children | 99 | * @rskq_accept_tail - FIFO tail of established children |
100 | * @rskq_defer_accept - User waits for some data after accept() | ||
99 | * @syn_wait_lock - serializer | 101 | * @syn_wait_lock - serializer |
100 | * | 102 | * |
101 | * %syn_wait_lock is necessary only to avoid proc interface having to grab the main | 103 | * %syn_wait_lock is necessary only to avoid proc interface having to grab the main |
@@ -111,6 +113,8 @@ struct request_sock_queue { | |||
111 | struct request_sock *rskq_accept_head; | 113 | struct request_sock *rskq_accept_head; |
112 | struct request_sock *rskq_accept_tail; | 114 | struct request_sock *rskq_accept_tail; |
113 | rwlock_t syn_wait_lock; | 115 | rwlock_t syn_wait_lock; |
116 | u8 rskq_defer_accept; | ||
117 | /* 3 bytes hole, try to pack */ | ||
114 | struct listen_sock *listen_opt; | 118 | struct listen_sock *listen_opt; |
115 | }; | 119 | }; |
116 | 120 | ||
@@ -129,11 +133,13 @@ static inline struct listen_sock *reqsk_queue_yank_listen_sk(struct request_sock | |||
129 | return lopt; | 133 | return lopt; |
130 | } | 134 | } |
131 | 135 | ||
132 | static inline void reqsk_queue_destroy(struct request_sock_queue *queue) | 136 | static inline void __reqsk_queue_destroy(struct request_sock_queue *queue) |
133 | { | 137 | { |
134 | kfree(reqsk_queue_yank_listen_sk(queue)); | 138 | kfree(reqsk_queue_yank_listen_sk(queue)); |
135 | } | 139 | } |
136 | 140 | ||
141 | extern void reqsk_queue_destroy(struct request_sock_queue *queue); | ||
142 | |||
137 | static inline struct request_sock * | 143 | static inline struct request_sock * |
138 | reqsk_queue_yank_acceptq(struct request_sock_queue *queue) | 144 | reqsk_queue_yank_acceptq(struct request_sock_queue *queue) |
139 | { | 145 | { |
@@ -221,17 +227,17 @@ static inline int reqsk_queue_added(struct request_sock_queue *queue) | |||
221 | return prev_qlen; | 227 | return prev_qlen; |
222 | } | 228 | } |
223 | 229 | ||
224 | static inline int reqsk_queue_len(struct request_sock_queue *queue) | 230 | static inline int reqsk_queue_len(const struct request_sock_queue *queue) |
225 | { | 231 | { |
226 | return queue->listen_opt != NULL ? queue->listen_opt->qlen : 0; | 232 | return queue->listen_opt != NULL ? queue->listen_opt->qlen : 0; |
227 | } | 233 | } |
228 | 234 | ||
229 | static inline int reqsk_queue_len_young(struct request_sock_queue *queue) | 235 | static inline int reqsk_queue_len_young(const struct request_sock_queue *queue) |
230 | { | 236 | { |
231 | return queue->listen_opt->qlen_young; | 237 | return queue->listen_opt->qlen_young; |
232 | } | 238 | } |
233 | 239 | ||
234 | static inline int reqsk_queue_is_full(struct request_sock_queue *queue) | 240 | static inline int reqsk_queue_is_full(const struct request_sock_queue *queue) |
235 | { | 241 | { |
236 | return queue->listen_opt->qlen >> queue->listen_opt->max_qlen_log; | 242 | return queue->listen_opt->qlen >> queue->listen_opt->max_qlen_log; |
237 | } | 243 | } |