Lines Matching refs:frags

77 			       struct mlx4_en_rx_alloc *frags,  in mlx4_en_alloc_frags()  argument
82 for (i = 0; i < priv->num_frags; i++, frags++) { in mlx4_en_alloc_frags()
83 if (!frags->page) { in mlx4_en_alloc_frags()
84 if (mlx4_alloc_page(priv, frags, gfp)) in mlx4_en_alloc_frags()
88 rx_desc->data[i].addr = cpu_to_be64(frags->dma + in mlx4_en_alloc_frags()
89 frags->page_offset); in mlx4_en_alloc_frags()
139 struct mlx4_en_rx_alloc *frags = ring->rx_info + in mlx4_en_prepare_rx_desc() local
143 if (!frags->page) { in mlx4_en_prepare_rx_desc()
145 frags->page = ring->page_cache.buf[ring->page_cache.index].page; in mlx4_en_prepare_rx_desc()
146 frags->dma = ring->page_cache.buf[ring->page_cache.index].dma; in mlx4_en_prepare_rx_desc()
148 frags->page_offset = XDP_PACKET_HEADROOM; in mlx4_en_prepare_rx_desc()
149 rx_desc->data[0].addr = cpu_to_be64(frags->dma + in mlx4_en_prepare_rx_desc()
154 return mlx4_en_alloc_frags(priv, ring, rx_desc, frags, gfp); in mlx4_en_prepare_rx_desc()
172 struct mlx4_en_rx_alloc *frags; in mlx4_en_free_rx_desc() local
175 frags = ring->rx_info + (index << priv->log_rx_info); in mlx4_en_free_rx_desc()
178 mlx4_en_free_frag(priv, frags + nr); in mlx4_en_free_rx_desc()
468 struct mlx4_en_rx_alloc *frags, in mlx4_en_complete_rx_desc() argument
480 for (nr = 0;; frags++) { in mlx4_en_complete_rx_desc()
483 page = frags->page; in mlx4_en_complete_rx_desc()
487 dma = frags->dma; in mlx4_en_complete_rx_desc()
488 dma_sync_single_range_for_cpu(priv->ddev, dma, frags->page_offset, in mlx4_en_complete_rx_desc()
491 __skb_fill_page_desc(skb, nr, page, frags->page_offset, in mlx4_en_complete_rx_desc()
496 frags->page_offset ^= PAGE_SIZE / 2; in mlx4_en_complete_rx_desc()
507 frags->page_offset += sz_align; in mlx4_en_complete_rx_desc()
508 release = frags->page_offset + frag_info->frag_size > PAGE_SIZE; in mlx4_en_complete_rx_desc()
512 frags->page = NULL; in mlx4_en_complete_rx_desc()
529 __skb_frag_unref(skb_shinfo(skb)->frags + nr, false); in mlx4_en_complete_rx_desc()
697 struct mlx4_en_rx_alloc *frags; in mlx4_en_process_rx_cq() local
705 frags = ring->rx_info + (index << priv->log_rx_info); in mlx4_en_process_rx_cq()
706 va = page_address(frags[0].page) + frags[0].page_offset; in mlx4_en_process_rx_cq()
735 dma = frags[0].dma + frags[0].page_offset; in mlx4_en_process_rx_cq()
774 dma = frags[0].dma + frags[0].page_offset; in mlx4_en_process_rx_cq()
779 xdp_prepare_buff(&xdp, va - frags[0].page_offset, in mlx4_en_process_rx_cq()
780 frags[0].page_offset, length, false); in mlx4_en_process_rx_cq()
787 frags[0].page_offset = xdp.data - in mlx4_en_process_rx_cq()
799 frags[0].page = NULL; in mlx4_en_process_rx_cq()
806 if (likely(!mlx4_en_xmit_frame(ring, frags, priv, in mlx4_en_process_rx_cq()
809 frags[0].page = NULL; in mlx4_en_process_rx_cq()
894 nr = mlx4_en_complete_rx_desc(priv, frags, skb, length); in mlx4_en_process_rx_cq()