Lines Matching full:headroom
41 /* Amount of XDP headroom to prepend to packets for use by xdp_adjust_head */
475 unsigned int headroom) in mergeable_len_to_ctx() argument
477 return (void *)(unsigned long)((headroom << MRG_CTX_HEADER_SHIFT) | truesize); in mergeable_len_to_ctx()
491 unsigned int headroom, in virtnet_build_skb() argument
500 skb_reserve(skb, headroom); in virtnet_build_skb()
511 unsigned int headroom) in page_to_skb() argument
529 buf = p - headroom; in page_to_skb()
533 tailroom = truesize - headroom - hdr_padded_len - len; in page_to_skb()
847 if (unlikely(xdpf->headroom < vi->hdr_len)) in __virtnet_xdp_xmit_one()
859 * xdpf->headroom. Therefore, we need to update the value of in __virtnet_xdp_xmit_one()
860 * headroom synchronously here. in __virtnet_xdp_xmit_one()
862 xdpf->headroom -= vi->hdr_len; in __virtnet_xdp_xmit_one()
1076 * 2) Headroom space is insufficient.
1080 * with large buffers with sufficient headroom - so it should affect
1085 * have enough headroom.
1133 /* Headroom does not contribute to packet length */ in xdp_linearize_page()
1147 unsigned int headroom; in receive_small_build_skb() local
1152 headroom = vi->hdr_len + header_offset; in receive_small_build_skb()
1153 buflen = SKB_DATA_ALIGN(GOOD_PACKET_LEN + headroom) + in receive_small_build_skb()
1156 skb = virtnet_build_skb(buf, buflen, headroom, len); in receive_small_build_skb()
1177 unsigned int headroom = vi->hdr_len + header_offset; in receive_small_xdp() local
1194 buflen = SKB_DATA_ALIGN(GOOD_PACKET_LEN + headroom) + in receive_small_xdp()
1204 headroom = vi->hdr_len + header_offset; in receive_small_xdp()
1205 buflen = SKB_DATA_ALIGN(GOOD_PACKET_LEN + headroom) + in receive_small_xdp()
1367 unsigned int headroom, data_len; in build_skb_from_xdp_buff() local
1384 headroom = xdp->data - xdp->data_hard_start; in build_skb_from_xdp_buff()
1386 skb_reserve(skb, headroom); in build_skb_from_xdp_buff()
1416 unsigned int headroom, tailroom, room; in virtnet_build_xdp_buff_mrg() local
1463 headroom = mergeable_ctx_to_headroom(ctx); in virtnet_build_xdp_buff_mrg()
1464 tailroom = headroom ? sizeof(struct skb_shared_info) : 0; in virtnet_build_xdp_buff_mrg()
1465 room = SKB_DATA_ALIGN(headroom + tailroom); in virtnet_build_xdp_buff_mrg()
1505 unsigned int headroom = mergeable_ctx_to_headroom(ctx); in mergeable_xdp_get_buf() local
1521 * with headroom may add hole in truesize, which in mergeable_xdp_get_buf()
1527 if (likely(headroom >= virtnet_get_headroom(vi) && in mergeable_xdp_get_buf()
1532 /* This happens when headroom is not enough because in mergeable_xdp_get_buf()
1646 unsigned int headroom = mergeable_ctx_to_headroom(ctx); in receive_mergeable() local
1647 unsigned int tailroom = headroom ? sizeof(struct skb_shared_info) : 0; in receive_mergeable()
1648 unsigned int room = SKB_DATA_ALIGN(headroom + tailroom); in receive_mergeable()
1674 head_skb = page_to_skb(vi, rq, page, offset, len, truesize, headroom); in receive_mergeable()
1696 headroom = mergeable_ctx_to_headroom(ctx); in receive_mergeable()
1697 tailroom = headroom ? sizeof(struct skb_shared_info) : 0; in receive_mergeable()
1698 room = SKB_DATA_ALIGN(headroom + tailroom); in receive_mergeable()
1844 * same size, except for the headroom. For this reason we do
1846 * to store the headroom as the context ignoring the truesize.
1951 unsigned int headroom = virtnet_get_headroom(vi); in add_recvbuf_mergeable() local
1952 unsigned int tailroom = headroom ? sizeof(struct skb_shared_info) : 0; in add_recvbuf_mergeable()
1953 unsigned int room = SKB_DATA_ALIGN(headroom + tailroom); in add_recvbuf_mergeable()
1975 buf += headroom; /* advance address leaving hole at front of pkt */ in add_recvbuf_mergeable()
1984 if (!headroom) in add_recvbuf_mergeable()
1991 ctx = mergeable_len_to_ctx(len + room, headroom); in add_recvbuf_mergeable()
4303 unsigned int headroom = virtnet_get_headroom(vi); in mergeable_rx_buffer_size_show() local
4304 unsigned int tailroom = headroom ? sizeof(struct skb_shared_info) : 0; in mergeable_rx_buffer_size_show()
4311 SKB_DATA_ALIGN(headroom + tailroom))); in mergeable_rx_buffer_size_show()