Re: [PATCH v8 3/3] net: ax88796c: ASIX AX88796C SPI Ethernet Adapter Driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux