Lines Matching refs:from

1997 int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len)  in skb_store_bits()  argument
2009 skb_copy_to_linear_data_offset(skb, offset, from, copy); in skb_store_bits()
2013 from += copy; in skb_store_bits()
2031 from, copy); in skb_store_bits()
2037 from += copy; in skb_store_bits()
2052 from, copy)) in skb_store_bits()
2057 from += copy; in skb_store_bits()
2240 skb_zerocopy_headlen(const struct sk_buff *from) in skb_zerocopy_headlen() argument
2244 if (!from->head_frag || in skb_zerocopy_headlen()
2245 skb_headlen(from) < L1_CACHE_BYTES || in skb_zerocopy_headlen()
2246 skb_shinfo(from)->nr_frags >= MAX_SKB_FRAGS) in skb_zerocopy_headlen()
2247 hlen = skb_headlen(from); in skb_zerocopy_headlen()
2249 if (skb_has_frag_list(from)) in skb_zerocopy_headlen()
2250 hlen = from->len; in skb_zerocopy_headlen()
2275 skb_zerocopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen) in skb_zerocopy() argument
2283 BUG_ON(!from->head_frag && !hlen); in skb_zerocopy()
2287 return skb_copy_bits(from, 0, skb_put(to, len), len); in skb_zerocopy()
2290 ret = skb_copy_bits(from, 0, skb_put(to, hlen), hlen); in skb_zerocopy()
2295 plen = min_t(int, skb_headlen(from), len); in skb_zerocopy()
2297 page = virt_to_head_page(from->head); in skb_zerocopy()
2298 offset = from->data - (unsigned char *)page_address(page); in skb_zerocopy()
2310 if (unlikely(skb_orphan_frags(from, GFP_ATOMIC))) { in skb_zerocopy()
2311 skb_tx_error(from); in skb_zerocopy()
2315 for (i = 0; i < skb_shinfo(from)->nr_frags; i++) { in skb_zerocopy()
2318 skb_shinfo(to)->frags[j] = skb_shinfo(from)->frags[i]; in skb_zerocopy()
2627 int from, to, merge, todo; in skb_shift() local
2634 from = 0; in skb_shift()
2636 fragfrom = &skb_shinfo(skb)->frags[from]; in skb_shift()
2655 fragfrom = &skb_shinfo(skb)->frags[from]; in skb_shift()
2665 from++; in skb_shift()
2670 (skb_shinfo(skb)->nr_frags - from) > (MAX_SKB_FRAGS - to)) in skb_shift()
2676 while ((todo > 0) && (from < skb_shinfo(skb)->nr_frags)) { in skb_shift()
2680 fragfrom = &skb_shinfo(skb)->frags[from]; in skb_shift()
2686 from++; in skb_shift()
2717 while (from < skb_shinfo(skb)->nr_frags) in skb_shift()
2718 skb_shinfo(skb)->frags[to++] = skb_shinfo(skb)->frags[from++]; in skb_shift()
2751 void skb_prepare_seq_read(struct sk_buff *skb, unsigned int from, in skb_prepare_seq_read() argument
2754 st->lower_offset = from; in skb_prepare_seq_read()
2894 unsigned int skb_find_text(struct sk_buff *skb, unsigned int from, in skb_find_text() argument
2903 skb_prepare_seq_read(skb, from, to, TS_SKB_CB(&state)); in skb_find_text()
2906 return (ret <= to - from ? ret : UINT_MAX); in skb_find_text()
2922 int (*getfrag)(void *from, char *to, int offset, in skb_append_datato_frags() argument
2924 void *from, int length) in skb_append_datato_frags()
2943 ret = getfrag(from, page_address(pfrag->page) + pfrag->offset, in skb_append_datato_frags()
4062 bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, in skb_try_coalesce() argument
4065 int i, delta, len = from->len; in skb_try_coalesce()
4074 BUG_ON(skb_copy_bits(from, 0, skb_put(to, len), len)); in skb_try_coalesce()
4079 if (skb_has_frag_list(to) || skb_has_frag_list(from)) in skb_try_coalesce()
4082 if (skb_headlen(from) != 0) { in skb_try_coalesce()
4087 skb_shinfo(from)->nr_frags >= MAX_SKB_FRAGS) in skb_try_coalesce()
4090 if (skb_head_is_locked(from)) in skb_try_coalesce()
4093 delta = from->truesize - SKB_DATA_ALIGN(sizeof(struct sk_buff)); in skb_try_coalesce()
4095 page = virt_to_head_page(from->head); in skb_try_coalesce()
4096 offset = from->data - (unsigned char *)page_address(page); in skb_try_coalesce()
4099 page, offset, skb_headlen(from)); in skb_try_coalesce()
4103 skb_shinfo(from)->nr_frags > MAX_SKB_FRAGS) in skb_try_coalesce()
4106 delta = from->truesize - SKB_TRUESIZE(skb_end_offset(from)); in skb_try_coalesce()
4112 skb_shinfo(from)->frags, in skb_try_coalesce()
4113 skb_shinfo(from)->nr_frags * sizeof(skb_frag_t)); in skb_try_coalesce()
4114 skb_shinfo(to)->nr_frags += skb_shinfo(from)->nr_frags; in skb_try_coalesce()
4116 if (!skb_cloned(from)) in skb_try_coalesce()
4117 skb_shinfo(from)->nr_frags = 0; in skb_try_coalesce()
4122 for (i = 0; i < skb_shinfo(from)->nr_frags; i++) in skb_try_coalesce()
4123 skb_frag_ref(from, i); in skb_try_coalesce()