Commit 536577f3 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by David S. Miller

net: myri10ge: use skb_list_walk_safe helper for gso segments

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: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 69b4ed5c
...@@ -2892,7 +2892,7 @@ static netdev_tx_t myri10ge_xmit(struct sk_buff *skb, ...@@ -2892,7 +2892,7 @@ static netdev_tx_t myri10ge_xmit(struct sk_buff *skb,
static netdev_tx_t myri10ge_sw_tso(struct sk_buff *skb, static netdev_tx_t myri10ge_sw_tso(struct sk_buff *skb,
struct net_device *dev) struct net_device *dev)
{ {
struct sk_buff *segs, *curr; struct sk_buff *segs, *curr, *next;
struct myri10ge_priv *mgp = netdev_priv(dev); struct myri10ge_priv *mgp = netdev_priv(dev);
struct myri10ge_slice_state *ss; struct myri10ge_slice_state *ss;
netdev_tx_t status; netdev_tx_t status;
...@@ -2901,10 +2901,8 @@ static netdev_tx_t myri10ge_sw_tso(struct sk_buff *skb, ...@@ -2901,10 +2901,8 @@ static netdev_tx_t myri10ge_sw_tso(struct sk_buff *skb,
if (IS_ERR(segs)) if (IS_ERR(segs))
goto drop; goto drop;
while (segs) { skb_list_walk_safe(segs, curr, next) {
curr = segs; skb_mark_not_on_list(curr);
segs = segs->next;
curr->next = NULL;
status = myri10ge_xmit(curr, dev); status = myri10ge_xmit(curr, dev);
if (status != 0) { if (status != 0) {
dev_kfree_skb_any(curr); dev_kfree_skb_any(curr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment