diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-09-16 19:21:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-09-16 19:21:16 -0400 |
commit | d9cc20484e5e48c6a5deb4387c20fd45bfbdde8c (patch) | |
tree | f0a9f05ad00b8a506abeb3b42cb3346cef7d2155 /drivers/net | |
parent | e081e1e3ef4682802ac63b1e5e26158fb9ca9e90 (diff) |
[NET] skbuff: Add skb_cow_head
This patch adds an optimised version of skb_cow that avoids the copy if
the header can be modified even if the rest of the payload is cloned.
This can be used in encapsulating paths where we only need to modify the
header. As it is, this can be used in PPPOE and bridging.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/pppoe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index bac36546e0bf..0d7f570b9a54 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c | |||
@@ -860,7 +860,7 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb) | |||
860 | /* Copy the data if there is no space for the header or if it's | 860 | /* Copy the data if there is no space for the header or if it's |
861 | * read-only. | 861 | * read-only. |
862 | */ | 862 | */ |
863 | if (skb_cow(skb, sizeof(*ph) + dev->hard_header_len)) | 863 | if (skb_cow_head(skb, sizeof(*ph) + dev->hard_header_len)) |
864 | goto abort; | 864 | goto abort; |
865 | 865 | ||
866 | __skb_push(skb, sizeof(*ph)); | 866 | __skb_push(skb, sizeof(*ph)); |