Lines Matching defs:rx_sg
65 struct scatterlist rx_sg[MAX_SKB_FRAGS + 2];
338 sg_set_buf(vi->rx_sg, &hdr->hdr, sizeof hdr->hdr);
340 skb_to_sgvec(skb, vi->rx_sg + 1, 0, skb->len);
342 err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, 2, skb, gfp);
355 /* page in vi->rx_sg[MAX_SKB_FRAGS + 1] is list tail */
363 sg_set_buf(&vi->rx_sg[i], page_address(first), PAGE_SIZE);
377 /* vi->rx_sg[0], vi->rx_sg[1] share the same page */
378 /* a separated vi->rx_sg[0] for virtio_net_hdr only due to QEMU bug */
379 sg_set_buf(&vi->rx_sg[0], p, sizeof(struct virtio_net_hdr));
381 /* vi->rx_sg[1] for data packet, from offset */
383 sg_set_buf(&vi->rx_sg[1], p + offset, PAGE_SIZE - offset);
387 err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, MAX_SKB_FRAGS + 2,
404 sg_init_one(vi->rx_sg, page_address(page), PAGE_SIZE);
406 err = virtqueue_add_buf_gfp(vi->rvq, vi->rx_sg, 0, 1, page, gfp);
962 sg_init_table(vi->rx_sg, ARRAY_SIZE(vi->rx_sg));