Commit 90919f14 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by David S. Miller

net: sunvnet: 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 9f072238
...@@ -1223,7 +1223,7 @@ vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb, ...@@ -1223,7 +1223,7 @@ vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb,
{ {
struct net_device *dev = VNET_PORT_TO_NET_DEVICE(port); struct net_device *dev = VNET_PORT_TO_NET_DEVICE(port);
struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING]; struct vio_dring_state *dr = &port->vio.drings[VIO_DRIVER_TX_RING];
struct sk_buff *segs; struct sk_buff *segs, *curr, *next;
int maclen, datalen; int maclen, datalen;
int status; int status;
int gso_size, gso_type, gso_segs; int gso_size, gso_type, gso_segs;
...@@ -1282,11 +1282,8 @@ vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb, ...@@ -1282,11 +1282,8 @@ vnet_handle_offloads(struct vnet_port *port, struct sk_buff *skb,
skb_reset_mac_header(skb); skb_reset_mac_header(skb);
status = 0; status = 0;
while (segs) { skb_list_walk_safe(segs, curr, next) {
struct sk_buff *curr = segs; skb_mark_not_on_list(curr);
segs = segs->next;
curr->next = NULL;
if (port->tso && curr->len > dev->mtu) { if (port->tso && curr->len > dev->mtu) {
skb_shinfo(curr)->gso_size = gso_size; skb_shinfo(curr)->gso_size = gso_size;
skb_shinfo(curr)->gso_type = gso_type; skb_shinfo(curr)->gso_type = gso_type;
......
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