aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_make_chunk.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/sctp/sm_make_chunk.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/sctp/sm_make_chunk.c')
-rw-r--r--net/sctp/sm_make_chunk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 60c5b59d4c65..759ea3d19976 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1143,7 +1143,7 @@ void *sctp_addto_chunk(struct sctp_chunk *chunk, int len, const void *data)
1143 1143
1144 /* Adjust the chunk length field. */ 1144 /* Adjust the chunk length field. */
1145 chunk->chunk_hdr->length = htons(chunklen + padlen + len); 1145 chunk->chunk_hdr->length = htons(chunklen + padlen + len);
1146 chunk->chunk_end = chunk->skb->tail; 1146 chunk->chunk_end = skb_tail_pointer(chunk->skb);
1147 1147
1148 return target; 1148 return target;
1149} 1149}
@@ -1168,7 +1168,7 @@ int sctp_user_addto_chunk(struct sctp_chunk *chunk, int off, int len,
1168 /* Adjust the chunk length field. */ 1168 /* Adjust the chunk length field. */
1169 chunk->chunk_hdr->length = 1169 chunk->chunk_hdr->length =
1170 htons(ntohs(chunk->chunk_hdr->length) + len); 1170 htons(ntohs(chunk->chunk_hdr->length) + len);
1171 chunk->chunk_end = chunk->skb->tail; 1171 chunk->chunk_end = skb_tail_pointer(chunk->skb);
1172 1172
1173out: 1173out:
1174 return err; 1174 return err;