lkml.org 
[lkml]   [2014]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: skbuff truesize incorrect.
On 22/05/14 20:25, Vlad Yasevich wrote:
> On 05/22/2014 03:07 PM, Jim Baxter wrote:
>>
>> skb2 = skb_clone(skb, GFP_ATOMIC);
>> if (skb2 == NULL)
>> goto err;
>>
>> if (!skb_pull(skb2, index)) {
>> ret = -EOVERFLOW;
>> goto err;
>> }
>
> This assumes that you original 16K packet is linear. Is that
> always the case?
The packets within the original packet are linear, however they could be
in an arbitrary order because they are just offsets from the start of
the 16k skb.


>
> This is the very same problem that I ran into with SCTP since it
> has similar code in it. You can play games with truesize manually,
> but you have to be very careful here.
>
> -vlad

I now think that the correct solution here is to create a new smaller
skb and copy the data from the sub packets into it.

Jim





\
 
 \ /
  Last update: 2014-05-22 22:21    [W:0.118 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site