Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH net 0/9] rxrpc: Fix use of skb_cow_data() | Date | Fri, 23 Aug 2019 09:52:28 +0100 |
| |
David Miller <davem@davemloft.net> wrote:
> Why don't you just do an skb_unshare() at the beginning when you know that > you'll need to do that?
I was trying to defer any copying to process context rather than doing it in softirq context to spend less time in softirq context - plus that way I can use GFP_NOIO (kafs) or GFP_KERNEL (direct AF_RXRPC socket) rather than GFP_ATOMIC if the api supports it.
I don't remember now why I used skb_cow_data() rather than skb_unshare() - but it was probably because the former leaves the sk_buff object itself intact, whereas the latter replaces it. I can switch to using skb_unshare() instead.
Question for you: how likely is a newly received buffer, through a UDP socket, to be 'cloned'?
David
| |