Lines Matching full:headroom

41 /* Amount of XDP headroom to prepend to packets for use by xdp_adjust_head */
465 unsigned int headroom) in mergeable_len_to_ctx() argument
467 return (void *)(unsigned long)((headroom << MRG_CTX_HEADER_SHIFT) | truesize); in mergeable_len_to_ctx()
481 unsigned int headroom, in virtnet_build_skb() argument
490 skb_reserve(skb, headroom); in virtnet_build_skb()
501 unsigned int headroom) in page_to_skb() argument
519 buf = p - headroom; in page_to_skb()
523 tailroom = truesize - headroom - hdr_padded_len - len; in page_to_skb()
837 if (unlikely(xdpf->headroom < vi->hdr_len)) in __virtnet_xdp_xmit_one()
849 * xdpf->headroom. Therefore, we need to update the value of in __virtnet_xdp_xmit_one()
850 * headroom synchronously here. in __virtnet_xdp_xmit_one()
852 xdpf->headroom -= vi->hdr_len; in __virtnet_xdp_xmit_one()
1066 * 2) Headroom space is insufficient.
1070 * with large buffers with sufficient headroom - so it should affect
1075 * have enough headroom.
1123 /* Headroom does not contribute to packet length */ in xdp_linearize_page()
1137 unsigned int headroom; in receive_small_build_skb() local
1142 headroom = vi->hdr_len + header_offset; in receive_small_build_skb()
1143 buflen = SKB_DATA_ALIGN(GOOD_PACKET_LEN + headroom) + in receive_small_build_skb()
1146 skb = virtnet_build_skb(buf, buflen, headroom, len); in receive_small_build_skb()
1167 unsigned int headroom = vi->hdr_len + header_offset; in receive_small_xdp() local
1180 buflen = SKB_DATA_ALIGN(GOOD_PACKET_LEN + headroom) + in receive_small_xdp()
1190 headroom = vi->hdr_len + header_offset; in receive_small_xdp()
1191 buflen = SKB_DATA_ALIGN(GOOD_PACKET_LEN + headroom) + in receive_small_xdp()
1348 unsigned int headroom, data_len; in build_skb_from_xdp_buff() local
1365 headroom = xdp->data - xdp->data_hard_start; in build_skb_from_xdp_buff()
1367 skb_reserve(skb, headroom); in build_skb_from_xdp_buff()
1397 unsigned int headroom, tailroom, room; in virtnet_build_xdp_buff_mrg() local
1444 headroom = mergeable_ctx_to_headroom(ctx); in virtnet_build_xdp_buff_mrg()
1445 tailroom = headroom ? sizeof(struct skb_shared_info) : 0; in virtnet_build_xdp_buff_mrg()
1446 room = SKB_DATA_ALIGN(headroom + tailroom); in virtnet_build_xdp_buff_mrg()
1486 unsigned int headroom = mergeable_ctx_to_headroom(ctx); in mergeable_xdp_get_buf() local
1498 * with headroom may add hole in truesize, which in mergeable_xdp_get_buf()
1504 if (likely(headroom >= virtnet_get_headroom(vi) && in mergeable_xdp_get_buf()
1509 /* This happens when headroom is not enough because in mergeable_xdp_get_buf()
1623 unsigned int headroom = mergeable_ctx_to_headroom(ctx); in receive_mergeable() local
1624 unsigned int tailroom = headroom ? sizeof(struct skb_shared_info) : 0; in receive_mergeable()
1625 unsigned int room = SKB_DATA_ALIGN(headroom + tailroom); in receive_mergeable()
1651 head_skb = page_to_skb(vi, rq, page, offset, len, truesize, headroom); in receive_mergeable()
1673 headroom = mergeable_ctx_to_headroom(ctx); in receive_mergeable()
1674 tailroom = headroom ? sizeof(struct skb_shared_info) : 0; in receive_mergeable()
1675 room = SKB_DATA_ALIGN(headroom + tailroom); in receive_mergeable()
1811 * same size, except for the headroom. For this reason we do
1813 * to store the headroom as the context ignoring the truesize.
1914 unsigned int headroom = virtnet_get_headroom(vi); in add_recvbuf_mergeable() local
1915 unsigned int tailroom = headroom ? sizeof(struct skb_shared_info) : 0; in add_recvbuf_mergeable()
1916 unsigned int room = SKB_DATA_ALIGN(headroom + tailroom); in add_recvbuf_mergeable()
1932 buf += headroom; /* advance address leaving hole at front of pkt */ in add_recvbuf_mergeable()
1941 if (!headroom) in add_recvbuf_mergeable()
1948 ctx = mergeable_len_to_ctx(len + room, headroom); in add_recvbuf_mergeable()
4219 unsigned int headroom = virtnet_get_headroom(vi); in mergeable_rx_buffer_size_show() local
4220 unsigned int tailroom = headroom ? sizeof(struct skb_shared_info) : 0; in mergeable_rx_buffer_size_show()
4227 SKB_DATA_ALIGN(headroom + tailroom))); in mergeable_rx_buffer_size_show()