Lines Matching full:sg
610 struct scatterlist *sg = NULL;
614 sg = sgl->sg;
616 if (!sg || sgl->cur >= MAX_SGL_ENTS) {
618 struct_size(sgl, sg, (MAX_SGL_ENTS + 1)),
623 sg_init_table(sgl->sg, MAX_SGL_ENTS + 1);
626 if (sg)
627 sg_chain(sg, MAX_SGL_ENTS + 1, sgl->sg);
636 * af_alg_count_tsgl - Count number of TX SG entries
639 * an @offset is provided, the counting of the SG entries starts at the @offset.
642 * @bytes: Count the number of SG entries holding given number of bytes.
643 * @offset: Start the counting of SG entries from the given offset.
644 * Return: Number of TX SG entries found given the constraints
658 const struct scatterlist *sg = sgl->sg;
664 if (offset >= sg[i].length) {
665 offset -= sg[i].length;
666 bytes -= sg[i].length;
670 bytes_count = sg[i].length - offset;
708 struct scatterlist *sg;
714 sg = sgl->sg;
717 size_t plen = min_t(size_t, used, sg[i].length);
718 struct page *page = sg_page(sg + i);
725 * SG entries in dst.
736 sg[i].offset + dst_offset);
742 sg[i].length -= plen;
743 sg[i].offset += plen;
748 if (sg[i].length)
752 sg_assign_page(sg + i, NULL);
756 sock_kfree_s(sk, sgl, struct_size(sgl, sg, MAX_SGL_ENTS + 1));
777 struct scatterlist *sg;
790 for_each_sg(tsgl, sg, areq->tsgl_entries, i) {
791 if (!sg_page(sg))
793 put_page(sg_page(sg));
1000 struct scatterlist *sg;
1008 sg = sgl->sg + sgl->cur - 1;
1010 PAGE_SIZE - sg->offset - sg->length);
1012 err = memcpy_from_msg(page_address(sg_page(sg)) +
1013 sg->offset + sg->length,
1018 sg->length += len;
1019 ctx->merge = (sg->offset + sg->length) &
1045 sg = sgl->sg;
1047 sg_unmark_end(sg + sgl->cur - 1);
1051 .sgl = sg,
1064 get_page(sg_page(&sg[sgl->cur]));
1082 sg_assign_page(sg + i, pg);
1085 page_address(sg_page(sg + i)),
1088 __free_page(sg_page(sg + i));
1089 sg_assign_page(sg + i, NULL);
1093 sg[i].length = plen;
1105 sg_mark_end(sg + sgl->cur - 1);