aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet/dn_route.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_route.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_route.c')
-rw-r--r--net/decnet/dn_route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index bb73bf16630f..9678b096b844 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1468,7 +1468,7 @@ static int dn_rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq,
1468 struct dn_route *rt = (struct dn_route *)skb->dst; 1468 struct dn_route *rt = (struct dn_route *)skb->dst;
1469 struct rtmsg *r; 1469 struct rtmsg *r;
1470 struct nlmsghdr *nlh; 1470 struct nlmsghdr *nlh;
1471 unsigned char *b = skb->tail; 1471 unsigned char *b = skb_tail_pointer(skb);
1472 long expires; 1472 long expires;
1473 1473
1474 nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*r), flags); 1474 nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*r), flags);
@@ -1509,7 +1509,7 @@ static int dn_rt_fill_info(struct sk_buff *skb, u32 pid, u32 seq,
1509 if (rt->fl.iif) 1509 if (rt->fl.iif)
1510 RTA_PUT(skb, RTA_IIF, sizeof(int), &rt->fl.iif); 1510 RTA_PUT(skb, RTA_IIF, sizeof(int), &rt->fl.iif);
1511 1511
1512 nlh->nlmsg_len = skb->tail - b; 1512 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
1513 return skb->len; 1513 return skb->len;
1514 1514
1515nlmsg_failure: 1515nlmsg_failure: