aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet/dn_nsp_out.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-19 23:29:13 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:26:28 -0400
commit27a884dc3cb63b93c2b3b643f5b31eed5f8a4d26 (patch)
tree5a267e40f9b94014be38dad5de0a52b6628834e0 /net/decnet/dn_nsp_out.c
parentbe8bd86321fa7f06359d866ef61fb4d2f3e9dce9 (diff)
[SK_BUFF]: Convert skb->tail to sk_buff_data_t
So that it is also an offset from skb->head, reduces its size from 8 to 4 bytes on 64bit architectures, allowing us to combine the 4 bytes hole left by the layer headers conversion, reducing struct sk_buff size to 256 bytes, i.e. 4 64byte cachelines, and since the sk_buff slab cache is SLAB_HWCACHE_ALIGN... :-) Many calculations that previously required that skb->{transport,network, mac}_header be first converted to a pointer now can be done directly, being meaningful as offsets or pointers. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_nsp_out.c')
-rw-r--r--net/decnet/dn_nsp_out.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c
index 84b8c5b45fef..7404653880b0 100644
--- a/net/decnet/dn_nsp_out.c
+++ b/net/decnet/dn_nsp_out.c
@@ -681,8 +681,10 @@ void dn_nsp_send_conninit(struct sock *sk, unsigned char msgflg)
681 if (scp->peer.sdn_objnum) 681 if (scp->peer.sdn_objnum)
682 type = 0; 682 type = 0;
683 683
684 skb_put(skb, dn_sockaddr2username(&scp->peer, skb->tail, type)); 684 skb_put(skb, dn_sockaddr2username(&scp->peer,
685 skb_put(skb, dn_sockaddr2username(&scp->addr, skb->tail, 2)); 685 skb_tail_pointer(skb), type));
686 skb_put(skb, dn_sockaddr2username(&scp->addr,
687 skb_tail_pointer(skb), 2));
686 688
687 menuver = DN_MENUVER_ACC | DN_MENUVER_USR; 689 menuver = DN_MENUVER_ACC | DN_MENUVER_USR;
688 if (scp->peer.sdn_flags & SDF_PROXY) 690 if (scp->peer.sdn_flags & SDF_PROXY)