Skip to content

Commit

Permalink
skbuff: skb_segment: s/frag/nskb_frag/
Browse files Browse the repository at this point in the history
frag points at nskb, so name it appropriately

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael S. Tsirkin authored and David S. Miller committed Mar 11, 2014
1 parent 9d79b3c commit 8cb1990
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -2876,7 +2876,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features)

do {
struct sk_buff *nskb;
skb_frag_t *frag;
skb_frag_t *nskb_frag;
int hsize;
int size;

Expand Down Expand Up @@ -2969,7 +2969,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features)
continue;
}

frag = skb_shinfo(nskb)->frags;
nskb_frag = skb_shinfo(nskb)->frags;

skb_copy_from_linear_data_offset(skb, offset,
skb_put(nskb, hsize), hsize);
Expand Down Expand Up @@ -2997,13 +2997,13 @@ struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features)
goto err;
}

*frag = *skb_frag;
__skb_frag_ref(frag);
size = skb_frag_size(frag);
*nskb_frag = *skb_frag;
__skb_frag_ref(nskb_frag);
size = skb_frag_size(nskb_frag);

if (pos < offset) {
frag->page_offset += offset - pos;
skb_frag_size_sub(frag, offset - pos);
nskb_frag->page_offset += offset - pos;
skb_frag_size_sub(nskb_frag, offset - pos);
}

skb_shinfo(nskb)->nr_frags++;
Expand All @@ -3013,11 +3013,11 @@ struct sk_buff *skb_segment(struct sk_buff *skb, netdev_features_t features)
skb_frag++;
pos += size;
} else {
skb_frag_size_sub(frag, pos + size - (offset + len));
skb_frag_size_sub(nskb_frag, pos + size - (offset + len));
goto skip_fraglist;
}

frag++;
nskb_frag++;
}

skip_fraglist:
Expand Down

0 comments on commit 8cb1990

Please sign in to comment.