diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-10-15 02:30:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-18 21:52:53 -0400 |
commit | c720c7e8383aff1cb219bddf474ed89d850336e3 (patch) | |
tree | 4f12337e6690fccced376db9f501eaf98614a65e /net/ipv4/inet_timewait_sock.c | |
parent | 988ade6b8e27e79311812f83a87b5cea11fabcd7 (diff) |
inet: rename some inet_sock fields
In order to have better cache layouts of struct sock (separate zones
for rx/tx paths), we need this preliminary patch.
Goal is to transfert fields used at lookup time in the first
read-mostly cache line (inside struct sock_common) and move sk_refcnt
to a separate cache line (only written by rx path)
This patch adds inet_ prefix to daddr, rcv_saddr, dport, num, saddr,
sport and id fields. This allows a future patch to define these
fields as macros, like sk_refcnt, without name clashes.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_timewait_sock.c')
-rw-r--r-- | net/ipv4/inet_timewait_sock.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index 2fe571155b22..1f5d508bb18b 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c | |||
@@ -86,7 +86,7 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk, | |||
86 | Note, that any socket with inet->num != 0 MUST be bound in | 86 | Note, that any socket with inet->num != 0 MUST be bound in |
87 | binding cache, even if it is closed. | 87 | binding cache, even if it is closed. |
88 | */ | 88 | */ |
89 | bhead = &hashinfo->bhash[inet_bhashfn(twsk_net(tw), inet->num, | 89 | bhead = &hashinfo->bhash[inet_bhashfn(twsk_net(tw), inet->inet_num, |
90 | hashinfo->bhash_size)]; | 90 | hashinfo->bhash_size)]; |
91 | spin_lock(&bhead->lock); | 91 | spin_lock(&bhead->lock); |
92 | tw->tw_tb = icsk->icsk_bind_hash; | 92 | tw->tw_tb = icsk->icsk_bind_hash; |
@@ -124,14 +124,14 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, const int stat | |||
124 | kmemcheck_annotate_bitfield(tw, flags); | 124 | kmemcheck_annotate_bitfield(tw, flags); |
125 | 125 | ||
126 | /* Give us an identity. */ | 126 | /* Give us an identity. */ |
127 | tw->tw_daddr = inet->daddr; | 127 | tw->tw_daddr = inet->inet_daddr; |
128 | tw->tw_rcv_saddr = inet->rcv_saddr; | 128 | tw->tw_rcv_saddr = inet->inet_rcv_saddr; |
129 | tw->tw_bound_dev_if = sk->sk_bound_dev_if; | 129 | tw->tw_bound_dev_if = sk->sk_bound_dev_if; |
130 | tw->tw_num = inet->num; | 130 | tw->tw_num = inet->inet_num; |
131 | tw->tw_state = TCP_TIME_WAIT; | 131 | tw->tw_state = TCP_TIME_WAIT; |
132 | tw->tw_substate = state; | 132 | tw->tw_substate = state; |
133 | tw->tw_sport = inet->sport; | 133 | tw->tw_sport = inet->inet_sport; |
134 | tw->tw_dport = inet->dport; | 134 | tw->tw_dport = inet->inet_dport; |
135 | tw->tw_family = sk->sk_family; | 135 | tw->tw_family = sk->sk_family; |
136 | tw->tw_reuse = sk->sk_reuse; | 136 | tw->tw_reuse = sk->sk_reuse; |
137 | tw->tw_hash = sk->sk_hash; | 137 | tw->tw_hash = sk->sk_hash; |