Skip to content

Commit

Permalink
net: sfc: use skb_list_walk_safe helper for gso segments
Browse files Browse the repository at this point in the history
This is a straight-forward conversion case for the new function, and
while we're at it, we can remove a null write to skb->next by replacing
it with skb_mark_not_on_list.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jason A. Donenfeld authored and David S. Miller committed Jan 8, 2020
1 parent 90919f1 commit 69b4ed5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/net/ethernet/sfc/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,9 @@ static int efx_tx_tso_fallback(struct efx_tx_queue *tx_queue,
dev_consume_skb_any(skb);
skb = segments;

while (skb) {
next = skb->next;
skb->next = NULL;

skb_list_walk_safe(skb, skb, next) {
skb_mark_not_on_list(skb);
efx_enqueue_skb(tx_queue, skb);
skb = next;
}

return 0;
Expand Down

0 comments on commit 69b4ed5

Please sign in to comment.