[NET] Generalise tcp_listen_opt
This chunks out the accept_queue and tcp_listen_opt code and moves them to net/core/request_sock.c and include/net/request_sock.h, to make it useful for other transport protocols, DCCP being the first one to use it. Next patches will rename tcp_listen_opt to accept_sock and remove the inline tcp functions that just call a reqsk_queue_ function. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
60236fdd08
commit
0e87506fcc
@ -379,22 +379,7 @@ struct tcp_sock {
|
||||
|
||||
__u32 total_retrans; /* Total retransmits for entire connection */
|
||||
|
||||
/* The syn_wait_lock is necessary only to avoid proc interface having
|
||||
* to grab the main lock sock while browsing the listening hash
|
||||
* (otherwise it's deadlock prone).
|
||||
* This lock is acquired in read mode only from listening_get_next()
|
||||
* and it's acquired in write mode _only_ from code that is actively
|
||||
* changing the syn_wait_queue. All readers that are holding
|
||||
* the master sock lock don't need to grab this lock in read mode
|
||||
* too as the syn_wait_queue writes are always protected from
|
||||
* the main sock lock.
|
||||
*/
|
||||
rwlock_t syn_wait_lock;
|
||||
struct tcp_listen_opt *listen_opt;
|
||||
|
||||
/* FIFO of established children */
|
||||
struct request_sock *accept_queue;
|
||||
struct request_sock *accept_queue_tail;
|
||||
struct request_sock_queue accept_queue; /* FIFO of established children */
|
||||
|
||||
unsigned int keepalive_time; /* time before keep alive takes place */
|
||||
unsigned int keepalive_intvl; /* time interval between keep alive probes */
|
||||
|
Reference in New Issue
Block a user