aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-10-15 02:30:45 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-18 21:52:53 -0400
commitc720c7e8383aff1cb219bddf474ed89d850336e3 (patch)
tree4f12337e6690fccced376db9f501eaf98614a65e /net/sctp/protocol.c
parent988ade6b8e27e79311812f83a87b5cea11fabcd7 (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/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 612dc878e05c..d9f4cc2c7869 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -296,19 +296,19 @@ static void sctp_v4_from_sk(union sctp_addr *addr, struct sock *sk)
296{ 296{
297 addr->v4.sin_family = AF_INET; 297 addr->v4.sin_family = AF_INET;
298 addr->v4.sin_port = 0; 298 addr->v4.sin_port = 0;
299 addr->v4.sin_addr.s_addr = inet_sk(sk)->rcv_saddr; 299 addr->v4.sin_addr.s_addr = inet_sk(sk)->inet_rcv_saddr;
300} 300}
301 301
302/* Initialize sk->sk_rcv_saddr from sctp_addr. */ 302/* Initialize sk->sk_rcv_saddr from sctp_addr. */
303static void sctp_v4_to_sk_saddr(union sctp_addr *addr, struct sock *sk) 303static void sctp_v4_to_sk_saddr(union sctp_addr *addr, struct sock *sk)
304{ 304{
305 inet_sk(sk)->rcv_saddr = addr->v4.sin_addr.s_addr; 305 inet_sk(sk)->inet_rcv_saddr = addr->v4.sin_addr.s_addr;
306} 306}
307 307
308/* Initialize sk->sk_daddr from sctp_addr. */ 308/* Initialize sk->sk_daddr from sctp_addr. */
309static void sctp_v4_to_sk_daddr(union sctp_addr *addr, struct sock *sk) 309static void sctp_v4_to_sk_daddr(union sctp_addr *addr, struct sock *sk)
310{ 310{
311 inet_sk(sk)->daddr = addr->v4.sin_addr.s_addr; 311 inet_sk(sk)->inet_daddr = addr->v4.sin_addr.s_addr;
312} 312}
313 313
314/* Initialize a sctp_addr from an address parameter. */ 314/* Initialize a sctp_addr from an address parameter. */
@@ -598,7 +598,7 @@ static struct sock *sctp_v4_create_accept_sk(struct sock *sk,
598 598
599 newinet = inet_sk(newsk); 599 newinet = inet_sk(newsk);
600 600
601 newinet->daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr; 601 newinet->inet_daddr = asoc->peer.primary_addr.v4.sin_addr.s_addr;
602 602
603 sk_refcnt_debug_inc(newsk); 603 sk_refcnt_debug_inc(newsk);
604 604