Lines Matching defs:from

101  * size, and we can differentiate heads from skb_small_head_cache
446 * skb_shared_info. @data must have been allocated from the page
624 * @flags: If SKB_ALLOC_FCLONE is set, allocate from fclone cache
634 * Buffers may only be allocated from interrupts using a @gfp_mask of
781 * attempt to allocate the head from a special reserved region used
1279 * Must only be called from net_ratelimit()-ed paths.
1930 * If this function is called from an interrupt gfp_mask() must be
2029 * If this function is called from an interrupt gfp_mask() must be
2146 * @fclone: if true allocate the copy of the skb from the fclone
2444 * is called from an interrupt.
2604 * skb_pull - remove data from the start of a buffer
2608 * This function removes data from the start of a buffer, returning
2620 * skb_pull_data - remove data from the start of a buffer returning its
2625 * This function removes data from the start of a buffer, returning
2644 * skb_trim - remove end from a buffer
2648 * Cut the length of a buffer down by removing data from the tail. If
2775 * data from fragmented part.
2786 /* Moves tail of skb head forward, copying data from fragmented part,
2920 * skb_copy_bits - copy bits from skb to kernel buffer
2926 * Copy the specified number of bytes from the source skb to the
2932 * since it is called from BPF assembly code.
3013 * Callback from splice_to_pipe(), if we need to release some pages
3116 * Map linear and fragment data from the skb to spd. It reports true if the
3168 * Map data from the skb to a pipe. Should handle both the linear part,
3332 * skb_store_bits - store bits from kernel buffer to skb
3335 * @from: source buffer
3338 * Copy the specified number of bytes from the source buffer to the
3343 int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len)
3355 skb_copy_to_linear_data_offset(skb, offset, from, copy);
3359 from += copy;
3381 memcpy(vaddr + p_off, from + copied, p_len);
3388 from += copy;
3403 from, copy))
3408 from += copy;
3622 * which has been changed from the hardware checksum, for example, by
3691 * @from: source buffer
3697 skb_zerocopy_headlen(const struct sk_buff *from)
3701 if (!from->head_frag ||
3702 skb_headlen(from) < L1_CACHE_BYTES ||
3703 skb_shinfo(from)->nr_frags >= MAX_SKB_FRAGS) {
3704 hlen = skb_headlen(from);
3706 hlen = from->len;
3709 if (skb_has_frag_list(from))
3710 hlen = from->len;
3719 * @from: source buffer
3720 * @len: number of bytes to copy from source buffer
3723 * Copies up to `len` bytes from `from` to `to` by creating references
3731 * -ENOMEM: couldn't orphan frags of @from due to lack of memory
3735 skb_zerocopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen)
3743 BUG_ON(!from->head_frag && !hlen);
3747 return skb_copy_bits(from, 0, skb_put(to, len), len);
3750 ret = skb_copy_bits(from, 0, skb_put(to, hlen), hlen);
3755 plen = min_t(int, skb_headlen(from), len);
3757 page = virt_to_head_page(from->head);
3758 offset = from->data - (unsigned char *)page_address(page);
3769 if (unlikely(skb_orphan_frags(from, GFP_ATOMIC))) {
3770 skb_tx_error(from);
3773 skb_zerocopy_clone(to, from, GFP_ATOMIC);
3775 for (i = 0; i < skb_shinfo(from)->nr_frags; i++) {
3780 skb_shinfo(to)->frags[j] = skb_shinfo(from)->frags[i];
3822 * skb_dequeue - remove from the head of the queue
3823 * @list: list to dequeue from
3843 * skb_dequeue_tail - remove from the tail of the queue
3844 * @list: list to dequeue from
3867 * Delete all buffers on an &sk_buff list. Each buffer is removed from
3895 * Delete all buffers on an &sk_buff rbtree. Each buffer is removed from
3980 * skb_unlink - remove a buffer from a list
3984 * Remove a packet from a list. The list locks are taken and this
4103 /* Shifting from/to a cloned skb is a no-go.
4113 * skb_shift - Shifts paged data partially from skb to another
4115 * @skb: buffer from which the paged data comes from
4119 * the length of the skb, from skb to tgt. Returns number bytes shifted.
4132 int from, to, merge, todo;
4143 from = 0;
4145 fragfrom = &skb_shinfo(skb)->frags[from];
4164 fragfrom = &skb_shinfo(skb)->frags[from];
4174 from++;
4179 (skb_shinfo(skb)->nr_frags - from) > (MAX_SKB_FRAGS - to))
4185 while ((todo > 0) && (from < skb_shinfo(skb)->nr_frags)) {
4189 fragfrom = &skb_shinfo(skb)->frags[from];
4195 from++;
4226 while (from < skb_shinfo(skb)->nr_frags)
4227 skb_shinfo(skb)->frags[to++] = skb_shinfo(skb)->frags[from++];
4248 * @from: lower offset of data to be read
4255 void skb_prepare_seq_read(struct sk_buff *skb, unsigned int from,
4258 st->lower_offset = from;
4407 * @from: search offset
4416 unsigned int skb_find_text(struct sk_buff *skb, unsigned int from,
4428 skb_prepare_seq_read(skb, from, to, TS_SKB_CB(&state));
4431 return (ret + patlen <= to - from ? ret : UINT_MAX);
4925 * Idea is to tranfert ownership from head_skb to last segment.
5017 * and should not be copied to/from user.
5102 * skb_to_sgvec - Fill a scatter-gather list from a socket buffer
5350 * prevent the socket from being released prior to being enqueued on
5425 /* Take a reference to prevent skb_orphan() from freeing the socket,
5520 /* Take a reference to prevent skb_orphan() from freeing the socket,
5537 * @off: the offset from start to place the checksum.
5806 * differs from the provided skb.
5846 * differs from the provided skb.
5902 * @from: buffer to add
5906 bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
5910 int i, delta, len = from->len;
5919 * references if @from is cloned and !@to->pp_recycle but its
5923 if (to->pp_recycle != from->pp_recycle)
5928 BUG_ON(skb_copy_bits(from, 0, skb_put(to, len), len));
5934 from_shinfo = skb_shinfo(from);
5937 if (skb_zcopy(to) || skb_zcopy(from))
5940 if (skb_headlen(from) != 0) {
5948 if (skb_head_is_locked(from))
5951 delta = from->truesize - SKB_DATA_ALIGN(sizeof(struct sk_buff));
5953 page = virt_to_head_page(from->head);
5954 offset = from->data - (unsigned char *)page_address(page);
5957 page, offset, skb_headlen(from));
5964 delta = from->truesize - SKB_TRUESIZE(skb_end_offset(from));
5974 if (!skb_cloned(from))
5980 if (skb_pp_frag_ref(from)) {
6001 * into/from a tunnel. Some information have to be cleared during these
6135 /* remove VLAN header from packet and update csum accordingly.
6168 /* Pop a vlan tag either from hwaccel or from payload.
6312 * skb_mpls_push() - push a new MPLS header after mac_len bytes from start of
6543 /* carve out the first off bytes from skb when off < headlen */
6602 /* carve out the first eat bytes from skb's frag_list. May recurse into
6656 /* carve off first len bytes from skb. Split line (off) is in the
6735 /* remove len bytes from the beginning of the skb */
6746 /* Extract to_copy bytes starting at off from skb, and return this in
7079 * extracts pages from an iterator and adds them to the socket buffer if