Lines Matching refs:nskb
1761 static int skb_zerocopy_clone(struct sk_buff *nskb, struct sk_buff *orig, in skb_zerocopy_clone() argument
1765 if (skb_zcopy(nskb)) { in skb_zerocopy_clone()
1771 if (skb_uarg(nskb) == skb_uarg(orig)) in skb_zerocopy_clone()
1773 if (skb_copy_ubufs(nskb, GFP_ATOMIC)) in skb_zerocopy_clone()
1776 skb_zcopy_set(nskb, skb_uarg(orig), NULL); in skb_zerocopy_clone()
2261 struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); in skb_expand_head() local
2263 if (unlikely(!nskb)) in skb_expand_head()
2267 skb_set_owner_w(nskb, sk); in skb_expand_head()
2269 skb = nskb; in skb_expand_head()
4346 struct sk_buff *nskb, *tmp; in skb_segment_list() local
4359 nskb = list_skb; in skb_segment_list()
4363 delta_truesize += nskb->truesize; in skb_segment_list()
4364 if (skb_shared(nskb)) { in skb_segment_list()
4365 tmp = skb_clone(nskb, GFP_ATOMIC); in skb_segment_list()
4367 consume_skb(nskb); in skb_segment_list()
4368 nskb = tmp; in skb_segment_list()
4369 err = skb_unclone(nskb, GFP_ATOMIC); in skb_segment_list()
4376 skb->next = nskb; in skb_segment_list()
4378 tail->next = nskb; in skb_segment_list()
4381 nskb->next = list_skb; in skb_segment_list()
4385 tail = nskb; in skb_segment_list()
4387 delta_len += nskb->len; in skb_segment_list()
4389 skb_push(nskb, -skb_network_offset(nskb) + offset); in skb_segment_list()
4391 skb_release_head_state(nskb); in skb_segment_list()
4392 len_diff = skb_network_header_len(nskb) - skb_network_header_len(skb); in skb_segment_list()
4393 __copy_skb_header(nskb, skb); in skb_segment_list()
4395 skb_headers_offset_update(nskb, skb_headroom(nskb) - skb_headroom(skb)); in skb_segment_list()
4396 nskb->transport_header += len_diff; in skb_segment_list()
4398 nskb->data - tnl_hlen, in skb_segment_list()
4401 if (skb_needs_linearize(nskb, features) && in skb_segment_list()
4402 __skb_linearize(nskb)) in skb_segment_list()
4543 struct sk_buff *nskb; in skb_segment() local
4562 nskb = skb_clone(list_skb, GFP_ATOMIC); in skb_segment()
4563 if (unlikely(!nskb)) in skb_segment()
4586 if (unlikely(pskb_trim(nskb, len))) { in skb_segment()
4587 kfree_skb(nskb); in skb_segment()
4591 hsize = skb_end_offset(nskb); in skb_segment()
4592 if (skb_cow_head(nskb, doffset + headroom)) { in skb_segment()
4593 kfree_skb(nskb); in skb_segment()
4597 nskb->truesize += skb_end_offset(nskb) - hsize; in skb_segment()
4598 skb_release_head_state(nskb); in skb_segment()
4599 __skb_push(nskb, doffset); in skb_segment()
4606 nskb = __alloc_skb(hsize + doffset + headroom, in skb_segment()
4610 if (unlikely(!nskb)) in skb_segment()
4613 skb_reserve(nskb, headroom); in skb_segment()
4614 __skb_put(nskb, doffset); in skb_segment()
4618 tail->next = nskb; in skb_segment()
4620 segs = nskb; in skb_segment()
4621 tail = nskb; in skb_segment()
4623 __copy_skb_header(nskb, head_skb); in skb_segment()
4625 skb_headers_offset_update(nskb, skb_headroom(nskb) - headroom); in skb_segment()
4626 skb_reset_mac_len(nskb); in skb_segment()
4629 nskb->data - tnl_hlen, in skb_segment()
4632 if (nskb->len == len + doffset) in skb_segment()
4637 if (!nskb->remcsum_offload) in skb_segment()
4638 nskb->ip_summed = CHECKSUM_NONE; in skb_segment()
4639 SKB_GSO_CB(nskb)->csum = in skb_segment()
4641 skb_put(nskb, in skb_segment()
4644 SKB_GSO_CB(nskb)->csum_start = in skb_segment()
4645 skb_headroom(nskb) + doffset; in skb_segment()
4647 if (skb_copy_bits(head_skb, offset, skb_put(nskb, len), len)) in skb_segment()
4653 nskb_frag = skb_shinfo(nskb)->frags; in skb_segment()
4656 skb_put(nskb, hsize), hsize); in skb_segment()
4658 skb_shinfo(nskb)->flags |= skb_shinfo(head_skb)->flags & in skb_segment()
4661 if (skb_zerocopy_clone(nskb, frag_skb, GFP_ATOMIC)) in skb_segment()
4667 skb_zerocopy_clone(nskb, list_skb, in skb_segment()
4688 if (unlikely(skb_shinfo(nskb)->nr_frags >= in skb_segment()
4706 skb_shinfo(nskb)->nr_frags++; in skb_segment()
4721 nskb->data_len = len - hsize; in skb_segment()
4722 nskb->len += nskb->data_len; in skb_segment()
4723 nskb->truesize += nskb->data_len; in skb_segment()
4727 if (skb_has_shared_frag(nskb) && in skb_segment()
4728 __skb_linearize(nskb)) in skb_segment()
4731 if (!nskb->remcsum_offload) in skb_segment()
4732 nskb->ip_summed = CHECKSUM_NONE; in skb_segment()
4733 SKB_GSO_CB(nskb)->csum = in skb_segment()
4734 skb_checksum(nskb, doffset, in skb_segment()
4735 nskb->len - doffset, 0); in skb_segment()
4736 SKB_GSO_CB(nskb)->csum_start = in skb_segment()
4737 skb_headroom(nskb) + doffset; in skb_segment()