lkml.org 
[lkml]   [2020]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 3/3] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver
On Wed, 16 Dec 2020 13:21:52 +0100 Lukasz Stelmach wrote:
> So, the only thing that's left is pskb_expand_head(). I need to wrap my
> head around it. Can you tell me how a cloned skb is different and why
> there may be separate branch for it?

I think this driver needs to prepend and append some info to the packet
data, right? Cloned skb is sharing the data with another skb, the
metadata is separate but the packet data is shared, so you can't modify
the data, you need to do a copy of the data. pskb_expand_head() should
take care of cloned skbs so you can just call it upfront and it will
make sure the skb is the right geometry for you.

BTW you should set netdev->needed_headroom and netdev->needed_tailroom
to the correct values so the stack pre-allocates the needed spaces,
when it can.

\
 
 \ /
  Last update: 2020-12-16 17:16    [W:0.068 / U:2.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site