mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 11:00:56 +07:00
net: openvswitch: use skb_list_walk_safe helper for gso segments
This is a straight-forward conversion case for the new function, keeping the flow of the existing code as intact as possible. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c3b18e0d92
commit
2cec4448db
@ -321,8 +321,7 @@ static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb,
|
||||
}
|
||||
|
||||
/* Queue all of the segments. */
|
||||
skb = segs;
|
||||
do {
|
||||
skb_list_walk_safe(segs, skb, nskb) {
|
||||
if (gso_type & SKB_GSO_UDP && skb != segs)
|
||||
key = &later_key;
|
||||
|
||||
@ -330,17 +329,15 @@ static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb,
|
||||
if (err)
|
||||
break;
|
||||
|
||||
} while ((skb = skb->next));
|
||||
}
|
||||
|
||||
/* Free all of the segments. */
|
||||
skb = segs;
|
||||
do {
|
||||
nskb = skb->next;
|
||||
skb_list_walk_safe(segs, skb, nskb) {
|
||||
if (err)
|
||||
kfree_skb(skb);
|
||||
else
|
||||
consume_skb(skb);
|
||||
} while ((skb = nskb));
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user