Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 295f7324 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller
Browse files

[ICSK]: Introduce reqsk_queue_prune from code in tcp_synack_timer



With this we're very close to getting all of the current TCP
refactorings in my dccp-2.6 tree merged, next changeset will export
some functions needed by the current DCCP code and then dccp-2.6.git
will be born!

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0a5578cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -270,7 +270,7 @@ struct tcp_sock {
	__u8	frto_counter;	/* Number of new acks after RTO */

	__u8	nonagle;	/* Disable Nagle algorithm?             */
	__u8	defer_accept;	/* User waits for some data after accept() */
	/* ONE BYTE HOLE, TRY TO PACK */

/* RTT measurement */
	__u32	srtt;		/* smoothed round trip time << 3	*/
+2 −0
Original line number Diff line number Diff line
@@ -239,4 +239,6 @@ static inline void inet_csk_reqsk_queue_drop(struct sock *sk,
	reqsk_free(req);
}

extern void inet_csk_listen_stop(struct sock *sk);

#endif /* _INET_CONNECTION_SOCK_H */
+7 −0
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ struct listen_sock {
 *
 * @rskq_accept_head - FIFO head of established children
 * @rskq_accept_tail - FIFO tail of established children
 * @rskq_defer_accept - User waits for some data after accept()
 * @syn_wait_lock - serializer
 *
 * %syn_wait_lock is necessary only to avoid proc interface having to grab the main
@@ -112,6 +113,8 @@ struct request_sock_queue {
	struct request_sock	*rskq_accept_head;
	struct request_sock	*rskq_accept_tail;
	rwlock_t		syn_wait_lock;
	u8			rskq_defer_accept;
	/* 3 bytes hole, try to pack */
	struct listen_sock	*listen_opt;
};

@@ -255,4 +258,8 @@ static inline void reqsk_queue_hash_req(struct request_sock_queue *queue,
	write_unlock(&queue->syn_wait_lock);
}

extern void reqsk_queue_prune(struct request_sock_queue *queue, struct sock *parent,
			      const unsigned long interval, const unsigned long timeout,
			      const unsigned long max_rto, int max_retries);

#endif /* _REQUEST_SOCK_H */
+2 −1
Original line number Diff line number Diff line
@@ -423,7 +423,8 @@ extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk,
					    size_t len, int nonblock, 
					    int flags, int *addr_len);

extern int			tcp_listen_start(struct sock *sk);
extern int			inet_csk_listen_start(struct sock *sk,
						      const int nr_table_entries);

extern void			tcp_parse_options(struct sk_buff *skb,
						  struct tcp_options_received *opt_rx,
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ int reqsk_queue_alloc(struct request_sock_queue *queue,
	get_random_bytes(&lopt->hash_rnd, sizeof(lopt->hash_rnd));
	rwlock_init(&queue->syn_wait_lock);
	queue->rskq_accept_head = queue->rskq_accept_head = NULL;
	queue->rskq_defer_accept = 0;
	lopt->nr_table_entries = nr_table_entries;

	write_lock_bh(&queue->syn_wait_lock);
Loading