• Eric Dumazet's avatar
    net: relax expensive skb_unclone() in iptunnel_handle_offloads() · 9580bf2e
    Eric Dumazet authored
    Locally generated TCP GSO packets having to go through a GRE/SIT/IPIP
    tunnel have to go through an expensive skb_unclone()
    
    Reallocating skb->head is a lot of work.
    
    Test should really check if a 'real clone' of the packet was done.
    
    TCP does not care if the original gso_type is changed while the packet
    travels in the stack.
    
    This adds skb_header_unclone() which is a variant of skb_clone()
    using skb_header_cloned() check instead of skb_cloned().
    
    This variant can probably be used from other points.
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9580bf2e
ip_tunnel_core.c 11.6 KB