diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-05-12 23:48:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-12 23:48:31 -0400 |
commit | f5184d267c1aedb9b7a8cc44e08ff6b8d382c3b5 (patch) | |
tree | 5ccce7558f9e1e53e5b189d6e2fe62a667988ac8 /net/xfrm | |
parent | 8388e3da34edb141362bb42811ee487dfec15525 (diff) |
net: Allow netdevices to specify needed head/tailroom
This patch adds needed_headroom/needed_tailroom members to struct
net_device and updates many places that allocate sbks to use them. Not
all of them can be converted though, and I'm sure I missed some (I
mostly grepped for LL_RESERVED_SPACE)
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_output.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c index 09cd9c0c2d80..3f964db908a7 100644 --- a/net/xfrm/xfrm_output.c +++ b/net/xfrm/xfrm_output.c | |||
@@ -25,11 +25,11 @@ static int xfrm_state_check_space(struct xfrm_state *x, struct sk_buff *skb) | |||
25 | struct dst_entry *dst = skb->dst; | 25 | struct dst_entry *dst = skb->dst; |
26 | int nhead = dst->header_len + LL_RESERVED_SPACE(dst->dev) | 26 | int nhead = dst->header_len + LL_RESERVED_SPACE(dst->dev) |
27 | - skb_headroom(skb); | 27 | - skb_headroom(skb); |
28 | int ntail = dst->dev->needed_tailroom - skb_tailroom(skb); | ||
28 | 29 | ||
29 | if (nhead > 0) | 30 | if (nhead > 0 || ntail > 0) |
30 | return pskb_expand_head(skb, nhead, 0, GFP_ATOMIC); | 31 | return pskb_expand_head(skb, nhead, ntail, GFP_ATOMIC); |
31 | 32 | ||
32 | /* Check tail too... */ | ||
33 | return 0; | 33 | return 0; |
34 | } | 34 | } |
35 | 35 | ||