]> Git Repo - linux.git/commit
skbuff: remove some unnecessary operation in skb_segment_list()
authorYunsheng Lin <[email protected]>
Wed, 10 Mar 2021 08:28:58 +0000 (16:28 +0800)
committerDavid S. Miller <[email protected]>
Wed, 10 Mar 2021 20:45:15 +0000 (12:45 -0800)
commit1ddc3229ad3c40840c24a699ada5cfeb4319b578
treec85e3c65ebd379d4779d4afd3544668891e3e640
parent134639e9cc0f921c2c3ad44a5bea00219f8b0ada
skbuff: remove some unnecessary operation in skb_segment_list()

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: Yunsheng Lin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/core/skbuff.c
This page took 0.046275 seconds and 4 git commands to generate.