On Wed, 2015-09-16 at 11:25 +0100, David Woodhouse wrote:
> A comment in include/linux/skbuff.h says that:
> 
>  * Various parts of the networking layer expect at least 32 bytes of
>  * headroom, you should not reduce this.
> 
> This was demonstrated by a panic when handling fragmented IPv6 packets:
> http://marc.info/?l=linux-netdev&m=144236093519172&w=2
> 
> It's not entirely clear if that comment is still valid — and if it is,
> perhaps netif_rx() ought to be enforcing it with a warning.
> 
> But either way, it is rather stupid from a performance point of view
> for us to be receiving packets into a buffer which doesn't have enough
> room to prepend an Ethernet header — it means that *every* incoming
> packet is going to be need to be reallocated. So let's fix that.
> 
> Signed-off-by: David Woodhouse <david.woodho...@intel.com>
> --- 
> Tested in the DMA code path; I don't believe the DMA-capable devices
> can still be used in MMIO mode. Simon, Guy, would you be able to test
> the MMIO version?

You should use netdev_alloc_skb() : This helper is better for rx skbs,
as it allows for better packing of frames in GRO or TCP stack.

Also netdev_alloc_skb_ip_align() might handle the NET_IP_ALIGN stuff
for arches that care.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to