Commit 2ad69c55 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller

[NET] rename struct tcp_listen_opt to struct listen_sock

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0e87506f
...@@ -78,11 +78,11 @@ static inline void reqsk_free(struct request_sock *req) ...@@ -78,11 +78,11 @@ static inline void reqsk_free(struct request_sock *req)
extern int sysctl_max_syn_backlog; extern int sysctl_max_syn_backlog;
/** struct tcp_listen_opt - listen state /** struct listen_sock - listen state
* *
* @max_qlen_log - log_2 of maximal queued SYNs/REQUESTs * @max_qlen_log - log_2 of maximal queued SYNs/REQUESTs
*/ */
struct tcp_listen_opt { struct listen_sock {
u8 max_qlen_log; u8 max_qlen_log;
/* 3 bytes hole, try to use */ /* 3 bytes hole, try to use */
int qlen; int qlen;
...@@ -111,15 +111,15 @@ struct request_sock_queue { ...@@ -111,15 +111,15 @@ struct request_sock_queue {
struct request_sock *rskq_accept_head; struct request_sock *rskq_accept_head;
struct request_sock *rskq_accept_tail; struct request_sock *rskq_accept_tail;
rwlock_t syn_wait_lock; rwlock_t syn_wait_lock;
struct tcp_listen_opt *listen_opt; struct listen_sock *listen_opt;
}; };
extern int reqsk_queue_alloc(struct request_sock_queue *queue, extern int reqsk_queue_alloc(struct request_sock_queue *queue,
const int nr_table_entries); const int nr_table_entries);
static inline struct tcp_listen_opt *reqsk_queue_yank_listen_sk(struct request_sock_queue *queue) static inline struct listen_sock *reqsk_queue_yank_listen_sk(struct request_sock_queue *queue)
{ {
struct tcp_listen_opt *lopt; struct listen_sock *lopt;
write_lock_bh(&queue->syn_wait_lock); write_lock_bh(&queue->syn_wait_lock);
lopt = queue->listen_opt; lopt = queue->listen_opt;
...@@ -203,7 +203,7 @@ static inline struct sock *reqsk_queue_get_child(struct request_sock_queue *queu ...@@ -203,7 +203,7 @@ static inline struct sock *reqsk_queue_get_child(struct request_sock_queue *queu
static inline int reqsk_queue_removed(struct request_sock_queue *queue, static inline int reqsk_queue_removed(struct request_sock_queue *queue,
struct request_sock *req) struct request_sock *req)
{ {
struct tcp_listen_opt *lopt = queue->listen_opt; struct listen_sock *lopt = queue->listen_opt;
if (req->retrans == 0) if (req->retrans == 0)
--lopt->qlen_young; --lopt->qlen_young;
...@@ -213,7 +213,7 @@ static inline int reqsk_queue_removed(struct request_sock_queue *queue, ...@@ -213,7 +213,7 @@ static inline int reqsk_queue_removed(struct request_sock_queue *queue,
static inline int reqsk_queue_added(struct request_sock_queue *queue) static inline int reqsk_queue_added(struct request_sock_queue *queue)
{ {
struct tcp_listen_opt *lopt = queue->listen_opt; struct listen_sock *lopt = queue->listen_opt;
const int prev_qlen = lopt->qlen; const int prev_qlen = lopt->qlen;
lopt->qlen_young++; lopt->qlen_young++;
...@@ -240,7 +240,7 @@ static inline void reqsk_queue_hash_req(struct request_sock_queue *queue, ...@@ -240,7 +240,7 @@ static inline void reqsk_queue_hash_req(struct request_sock_queue *queue,
u32 hash, struct request_sock *req, u32 hash, struct request_sock *req,
unsigned timeout) unsigned timeout)
{ {
struct tcp_listen_opt *lopt = queue->listen_opt; struct listen_sock *lopt = queue->listen_opt;
req->expires = jiffies + timeout; req->expires = jiffies + timeout;
req->retrans = 0; req->retrans = 0;
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
int reqsk_queue_alloc(struct request_sock_queue *queue, int reqsk_queue_alloc(struct request_sock_queue *queue,
const int nr_table_entries) const int nr_table_entries)
{ {
const int lopt_size = sizeof(struct tcp_listen_opt) + const int lopt_size = sizeof(struct listen_sock) +
nr_table_entries * sizeof(struct request_sock *); nr_table_entries * sizeof(struct request_sock *);
struct tcp_listen_opt *lopt = kmalloc(lopt_size, GFP_KERNEL); struct listen_sock *lopt = kmalloc(lopt_size, GFP_KERNEL);
if (lopt == NULL) if (lopt == NULL)
return -ENOMEM; return -ENOMEM;
......
...@@ -499,7 +499,7 @@ int tcp_listen_start(struct sock *sk) ...@@ -499,7 +499,7 @@ int tcp_listen_start(struct sock *sk)
static void tcp_listen_stop (struct sock *sk) static void tcp_listen_stop (struct sock *sk)
{ {
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
struct tcp_listen_opt *lopt; struct listen_sock *lopt;
struct request_sock *acc_req; struct request_sock *acc_req;
struct request_sock *req; struct request_sock *req;
int i; int i;
......
...@@ -514,7 +514,7 @@ static int tcpdiag_dump_reqs(struct sk_buff *skb, struct sock *sk, ...@@ -514,7 +514,7 @@ static int tcpdiag_dump_reqs(struct sk_buff *skb, struct sock *sk,
struct tcpdiag_entry entry; struct tcpdiag_entry entry;
struct tcpdiagreq *r = NLMSG_DATA(cb->nlh); struct tcpdiagreq *r = NLMSG_DATA(cb->nlh);
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
struct tcp_listen_opt *lopt; struct listen_sock *lopt;
struct rtattr *bc = NULL; struct rtattr *bc = NULL;
struct inet_sock *inet = inet_sk(sk); struct inet_sock *inet = inet_sk(sk);
int j, s_j; int j, s_j;
......
...@@ -874,7 +874,7 @@ static struct request_sock *tcp_v4_search_req(struct tcp_sock *tp, ...@@ -874,7 +874,7 @@ static struct request_sock *tcp_v4_search_req(struct tcp_sock *tp,
__u16 rport, __u16 rport,
__u32 raddr, __u32 laddr) __u32 raddr, __u32 laddr)
{ {
struct tcp_listen_opt *lopt = tp->accept_queue.listen_opt; struct listen_sock *lopt = tp->accept_queue.listen_opt;
struct request_sock *req, **prev; struct request_sock *req, **prev;
for (prev = &lopt->syn_table[tcp_v4_synq_hash(raddr, rport, lopt->hash_rnd)]; for (prev = &lopt->syn_table[tcp_v4_synq_hash(raddr, rport, lopt->hash_rnd)];
...@@ -898,7 +898,7 @@ static struct request_sock *tcp_v4_search_req(struct tcp_sock *tp, ...@@ -898,7 +898,7 @@ static struct request_sock *tcp_v4_search_req(struct tcp_sock *tp,
static void tcp_v4_synq_add(struct sock *sk, struct request_sock *req) static void tcp_v4_synq_add(struct sock *sk, struct request_sock *req)
{ {
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
struct tcp_listen_opt *lopt = tp->accept_queue.listen_opt; struct listen_sock *lopt = tp->accept_queue.listen_opt;
u32 h = tcp_v4_synq_hash(inet_rsk(req)->rmt_addr, inet_rsk(req)->rmt_port, lopt->hash_rnd); u32 h = tcp_v4_synq_hash(inet_rsk(req)->rmt_addr, inet_rsk(req)->rmt_port, lopt->hash_rnd);
reqsk_queue_hash_req(&tp->accept_queue, h, req, TCP_TIMEOUT_INIT); reqsk_queue_hash_req(&tp->accept_queue, h, req, TCP_TIMEOUT_INIT);
......
...@@ -464,7 +464,7 @@ out_unlock: ...@@ -464,7 +464,7 @@ out_unlock:
static void tcp_synack_timer(struct sock *sk) static void tcp_synack_timer(struct sock *sk)
{ {
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
struct tcp_listen_opt *lopt = tp->accept_queue.listen_opt; struct listen_sock *lopt = tp->accept_queue.listen_opt;
int max_retries = tp->syn_retries ? : sysctl_tcp_synack_retries; int max_retries = tp->syn_retries ? : sysctl_tcp_synack_retries;
int thresh = max_retries; int thresh = max_retries;
unsigned long now = jiffies; unsigned long now = jiffies;
......
...@@ -401,7 +401,7 @@ static struct request_sock *tcp_v6_search_req(struct tcp_sock *tp, ...@@ -401,7 +401,7 @@ static struct request_sock *tcp_v6_search_req(struct tcp_sock *tp,
struct in6_addr *laddr, struct in6_addr *laddr,
int iif) int iif)
{ {
struct tcp_listen_opt *lopt = tp->accept_queue.listen_opt; struct listen_sock *lopt = tp->accept_queue.listen_opt;
struct request_sock *req, **prev; struct request_sock *req, **prev;
for (prev = &lopt->syn_table[tcp_v6_synq_hash(raddr, rport, lopt->hash_rnd)]; for (prev = &lopt->syn_table[tcp_v6_synq_hash(raddr, rport, lopt->hash_rnd)];
...@@ -1267,7 +1267,7 @@ static struct sock *tcp_v6_hnd_req(struct sock *sk,struct sk_buff *skb) ...@@ -1267,7 +1267,7 @@ static struct sock *tcp_v6_hnd_req(struct sock *sk,struct sk_buff *skb)
static void tcp_v6_synq_add(struct sock *sk, struct request_sock *req) static void tcp_v6_synq_add(struct sock *sk, struct request_sock *req)
{ {
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
struct tcp_listen_opt *lopt = tp->accept_queue.listen_opt; struct listen_sock *lopt = tp->accept_queue.listen_opt;
u32 h = tcp_v6_synq_hash(&tcp6_rsk(req)->rmt_addr, inet_rsk(req)->rmt_port, lopt->hash_rnd); u32 h = tcp_v6_synq_hash(&tcp6_rsk(req)->rmt_addr, inet_rsk(req)->rmt_port, lopt->hash_rnd);
reqsk_queue_hash_req(&tp->accept_queue, h, req, TCP_TIMEOUT_INIT); reqsk_queue_hash_req(&tp->accept_queue, h, req, TCP_TIMEOUT_INIT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment