Lines Matching full:seg
84 struct sk_buff *skb, int seg, int *len) in otx2_dma_map_skb_frag() argument
91 if (!seg) { in otx2_dma_map_skb_frag()
96 frag = &skb_shinfo(skb)->frags[seg - 1]; in otx2_dma_map_skb_frag()
106 int seg; in otx2_dma_unmap_skb_frags() local
108 for (seg = 0; seg < sg->num_segs; seg++) { in otx2_dma_unmap_skb_frags()
109 otx2_dma_unmap_page(pfvf, sg->dma_addr[seg], in otx2_dma_unmap_skb_frags()
110 sg->size[seg], DMA_TO_DEVICE); in otx2_dma_unmap_skb_frags()
260 int seg; in otx2_free_rcv_seg() local
267 for (seg = 0; seg < sg->segs; seg++, seg_addr++) in otx2_free_rcv_seg()
349 int seg; in otx2_rcv_pkt_handler() local
370 for (seg = 0; seg < sg->segs; seg++, seg_addr++) { in otx2_rcv_pkt_handler()
372 seg_size[seg], parse, cq->cq_idx)) in otx2_rcv_pkt_handler()
636 int seg, len; in otx2_sqe_add_sg() local
640 for (seg = 0; seg < num_segs; seg++) { in otx2_sqe_add_sg()
641 if ((seg % MAX_SEGS_PER_SG) == 0) { in otx2_sqe_add_sg()
651 if ((num_segs - seg) >= (MAX_SEGS_PER_SG - 1)) in otx2_sqe_add_sg()
656 dma_addr = otx2_dma_map_skb_frag(pfvf, skb, seg, &len); in otx2_sqe_add_sg()
660 sg_lens[frag_num(seg % MAX_SEGS_PER_SG)] = len; in otx2_sqe_add_sg()
665 sq->sg[sq->head].dma_addr[seg] = dma_addr; in otx2_sqe_add_sg()
666 sq->sg[sq->head].size[seg] = len; in otx2_sqe_add_sg()
821 int seg, len; in otx2_dma_map_tso_skb() local
828 for (seg = 0; seg < num_segs; seg++) { in otx2_dma_map_tso_skb()
830 if (!seg && !len) in otx2_dma_map_tso_skb()
832 dma_addr = otx2_dma_map_skb_frag(pfvf, skb, seg, &len); in otx2_dma_map_tso_skb()
848 struct sk_buff *skb, int seg, in otx2_tso_frag_dma_addr() argument
855 if (seg < 0) in otx2_tso_frag_dma_addr()
858 frag = &skb_shinfo(skb)->frags[seg]; in otx2_tso_frag_dma_addr()
861 seg++; in otx2_tso_frag_dma_addr()
862 return sg->dma_addr[seg] + offset; in otx2_tso_frag_dma_addr()
871 int seg; in otx2_sqe_tso_add_sg() local
874 for (seg = 0; seg < list->num_segs; seg++) { in otx2_sqe_tso_add_sg()
875 if ((seg % MAX_SEGS_PER_SG) == 0) { in otx2_sqe_tso_add_sg()
885 if ((list->num_segs - seg) >= (MAX_SEGS_PER_SG - 1)) in otx2_sqe_tso_add_sg()
890 sg_lens[frag_num(seg % MAX_SEGS_PER_SG)] = list->size[seg]; in otx2_sqe_tso_add_sg()
891 *iova++ = list->dma_addr[seg]; in otx2_sqe_tso_add_sg()