• Yunsheng Lin's avatar
    skbuff: remove some unnecessary operation in skb_segment_list() · 1ddc3229
    Yunsheng Lin authored
    gro list uses skb_shinfo(skb)->frag_list to link two skb together,
    and NAPI_GRO_CB(p)->last->next is used when there are more skb,
    see skb_gro_receive_list(). gso expects that each segmented skb is
    linked together using skb->next, so only the first skb->next need
    to set to skb_shinfo(skb)-> frag_list when doing gso list segment.
    
    It is the same reason that nskb->next does not need to be set to
    list_skb before goto the error handling, because nskb->next already
    pointers to list_skb.
    
    And nskb is also the last skb at the end of loop, so remove tail
    variable and use nskb instead.
    Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1ddc3229
skbuff.c 159 KB