mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
[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>
This commit is contained in:
parent
e081e1e3ef
commit
d9cc20484e
3 changed files with 33 additions and 11 deletions
|
@ -183,7 +183,7 @@ int nf_bridge_copy_header(struct sk_buff *skb)
|
|||
int err;
|
||||
int header_size = ETH_HLEN + nf_bridge_encap_header_len(skb);
|
||||
|
||||
err = skb_cow(skb, header_size);
|
||||
err = skb_cow_head(skb, header_size);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue