• Willem de Bruijn's avatar
    skbuff: in skb_segment, call zerocopy functions once per nskb · bf5c25d6
    Willem de Bruijn authored
    This is a net-next follow-up to commit 268b7906 ("skbuff: orphan
    frags before zerocopy clone"), which fixed a bug in net, but added a
    call to skb_zerocopy_clone at each frag to do so.
    
    When segmenting skbs with user frags, either the user frags must be
    replaced with private copies and uarg released, or the uarg must have
    its refcount increased for each new skb.
    
    skb_orphan_frags does the first, except for cases that can handle
    reference counting. skb_zerocopy_clone then does the second.
    
    Call these once per nskb, instead of once per frag.
    
    That is, in the common case. With a frag list, also refresh when the
    origin skb (frag_skb) changes.
    Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    bf5c25d6
skbuff.c 133 KB