Lines Matching defs:total_sg
245 unsigned int total_sg)
251 return (vq->indirect && total_sg > 1 && vq->vq.num_free);
493 unsigned int total_sg,
506 desc = kmalloc_array(total_sg, sizeof(struct vring_desc), gfp);
510 for (i = 0; i < total_sg; i++)
546 unsigned int total_sg,
572 BUG_ON(total_sg == 0);
576 if (virtqueue_use_indirect(vq, total_sg))
577 desc = alloc_indirect_split(_vq, total_sg, gfp);
580 WARN_ON_ONCE(total_sg > vq->split.vring.num && !vq->indirect);
593 descs_used = total_sg;
653 vq, desc, total_sg * sizeof(struct vring_desc),
664 total_sg * sizeof(struct vring_desc),
716 for (n = 0; n < total_sg; n++) {
1266 static struct vring_packed_desc *alloc_indirect_packed(unsigned int total_sg,
1278 desc = kmalloc_array(total_sg, sizeof(struct vring_packed_desc), gfp);
1285 unsigned int total_sg,
1298 desc = alloc_indirect_packed(total_sg, gfp);
1329 total_sg * sizeof(struct vring_packed_desc),
1339 vq->packed.vring.desc[head].len = cpu_to_le32(total_sg *
1345 vq->packed.desc_extra[id].len = total_sg *
1403 unsigned int total_sg,
1430 BUG_ON(total_sg == 0);
1432 if (virtqueue_use_indirect(vq, total_sg)) {
1433 err = virtqueue_add_indirect_packed(vq, sgs, total_sg, out_sgs,
1446 WARN_ON_ONCE(total_sg > vq->packed.vring.num && !vq->indirect);
1450 descs_used = total_sg;
1473 (++c == total_sg ? 0 : VRING_DESC_F_NEXT) |
1539 for (n = 0; n < total_sg; n++) {
2199 unsigned int total_sg,
2208 return vq->packed_ring ? virtqueue_add_packed(_vq, sgs, total_sg,
2210 virtqueue_add_split(_vq, sgs, total_sg,
2235 unsigned int i, total_sg = 0;
2242 total_sg++;
2244 return virtqueue_add(_vq, sgs, total_sg, out_sgs, in_sgs,