mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
net: udp: use skb_list_walk_safe helper for gso segments
This is a straight-forward conversion case for the new function, iterating over the return value from udp_rcv_segment, which actually is a wrapper around skb_gso_segment. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5eee7bd7e2
commit
1a186c14ce
@ -2104,8 +2104,7 @@ static int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
|
|||||||
BUILD_BUG_ON(sizeof(struct udp_skb_cb) > SKB_SGO_CB_OFFSET);
|
BUILD_BUG_ON(sizeof(struct udp_skb_cb) > SKB_SGO_CB_OFFSET);
|
||||||
__skb_push(skb, -skb_mac_offset(skb));
|
__skb_push(skb, -skb_mac_offset(skb));
|
||||||
segs = udp_rcv_segment(sk, skb, true);
|
segs = udp_rcv_segment(sk, skb, true);
|
||||||
for (skb = segs; skb; skb = next) {
|
skb_list_walk_safe(segs, skb, next) {
|
||||||
next = skb->next;
|
|
||||||
__skb_pull(skb, skb_transport_offset(skb));
|
__skb_pull(skb, skb_transport_offset(skb));
|
||||||
ret = udp_queue_rcv_one_skb(sk, skb);
|
ret = udp_queue_rcv_one_skb(sk, skb);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
|
@ -690,8 +690,7 @@ static int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
|
|||||||
|
|
||||||
__skb_push(skb, -skb_mac_offset(skb));
|
__skb_push(skb, -skb_mac_offset(skb));
|
||||||
segs = udp_rcv_segment(sk, skb, false);
|
segs = udp_rcv_segment(sk, skb, false);
|
||||||
for (skb = segs; skb; skb = next) {
|
skb_list_walk_safe(segs, skb, next) {
|
||||||
next = skb->next;
|
|
||||||
__skb_pull(skb, skb_transport_offset(skb));
|
__skb_pull(skb, skb_transport_offset(skb));
|
||||||
|
|
||||||
ret = udpv6_queue_rcv_one_skb(sk, skb);
|
ret = udpv6_queue_rcv_one_skb(sk, skb);
|
||||||
|
Loading…
Reference in New Issue
Block a user