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 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html