Messages in this thread | | | Subject | Re: TCP bug? | From | Andi Kleen <> | Date | 27 Oct 1998 23:00:38 +0100 |
| |
In article <E0zYBw8-0006Xy-00@danube.inka.de>, Olaf Titz <olaf@bigred.inka.de> writes: >> skb_unshare is a copy on write for multiple users. So 99.99% of the time it >> actually just returns skb.
> OK. Because it can happen that I need to copy the skb for another > reason (too little space for additional headers) I can just do > something like
> if (skb_cloned(skb) || toosmall(skb)) { > skn = skb_copy(skb, GFP_KERNEL); > /* etc */ > }
skb_cow does exactly what you want: struct sk_buff *skb_cow(struct sk_buff *skb, unsigned int headroom);
-Andi
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |