Thread (1 message) flat view 1 message, 1 author, 2011-12-03

Re: pull request: batman-adv 2011-11-26

From: David Miller <hidden>
Date: 2011-12-03 01:59:55
Also in: batman

From: Antonio Quartulli <redacted>
Date: Sat, 3 Dec 2011 02:55:29 +0100
We first call pskb_may_pull() to pull the header only and then, under certain
conditions, we linearise the whole skb to access it all. Should I use
pskb_may_pull() even in this case?
Why would you need to access the whole thing?

There are only two types of possible accesses:

1) Header parsing --> use pskb_may_pull() as needed.

2) Copying the data to some other location, such as a user
   buffer.  Use skb_copy_datagram_iovec or similar which handle
   fragmented SKBs just fine.

You should handle fragmented SKBs as much as possible, because
linearization is expensive and often amounts to a memory allocation
plus a copy if you linearize the whole thing.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help