Lines Matching refs:pg_info

261 		   struct octeon_skb_page_info *pg_info)  in recv_buffer_alloc()  argument
274 pg_info->page = NULL; in recv_buffer_alloc()
286 pg_info->dma = dma_map_page(&oct->pci_dev->dev, page, 0, in recv_buffer_alloc()
290 if (dma_mapping_error(&oct->pci_dev->dev, pg_info->dma)) { in recv_buffer_alloc()
293 pg_info->page = NULL; in recv_buffer_alloc()
297 pg_info->page = page; in recv_buffer_alloc()
298 pg_info->page_offset = 0; in recv_buffer_alloc()
301 skb_pg_info->dma = pg_info->dma; in recv_buffer_alloc()
333 struct octeon_skb_page_info *pg_info = buf; in recv_buffer_recycle() local
335 if (!pg_info->page) { in recv_buffer_recycle()
341 if (unlikely(page_count(pg_info->page) != 1) || in recv_buffer_recycle()
342 unlikely(page_to_nid(pg_info->page) != numa_node_id())) { in recv_buffer_recycle()
344 pg_info->dma, (PAGE_SIZE << 0), in recv_buffer_recycle()
346 pg_info->dma = 0; in recv_buffer_recycle()
347 pg_info->page = NULL; in recv_buffer_recycle()
348 pg_info->page_offset = 0; in recv_buffer_recycle()
353 if (pg_info->page_offset == 0) in recv_buffer_recycle()
354 pg_info->page_offset = LIO_RXBUFFER_SZ; in recv_buffer_recycle()
356 pg_info->page_offset = 0; in recv_buffer_recycle()
357 page_ref_inc(pg_info->page); in recv_buffer_recycle()
365 struct octeon_skb_page_info *pg_info = buf, *skb_pg_info; in recv_buffer_reuse() local
371 pg_info->dma, (PAGE_SIZE << 0), in recv_buffer_reuse()
383 skb_pg_info->page = pg_info->page; in recv_buffer_reuse()
384 skb_pg_info->page_offset = pg_info->page_offset; in recv_buffer_reuse()
385 skb_pg_info->dma = pg_info->dma; in recv_buffer_reuse()
391 recv_buffer_destroy(void *buffer, struct octeon_skb_page_info *pg_info) in recv_buffer_destroy() argument
395 put_page(pg_info->page); in recv_buffer_destroy()
396 pg_info->dma = 0; in recv_buffer_destroy()
397 pg_info->page = NULL; in recv_buffer_destroy()
398 pg_info->page_offset = 0; in recv_buffer_destroy()
407 struct octeon_skb_page_info *pg_info; in recv_buffer_free() local
409 pg_info = ((struct octeon_skb_page_info *)(skb->cb)); in recv_buffer_free()
411 if (pg_info->page) { in recv_buffer_free()
412 put_page(pg_info->page); in recv_buffer_free()
413 pg_info->dma = 0; in recv_buffer_free()
414 pg_info->page = NULL; in recv_buffer_free()
415 pg_info->page_offset = 0; in recv_buffer_free()
440 struct octeon_skb_page_info *pg_info; in get_rbd() local
443 pg_info = ((struct octeon_skb_page_info *)(skb->cb)); in get_rbd()
444 va = page_address(pg_info->page) + pg_info->page_offset; in get_rbd()
455 struct octeon_skb_page_info *pg_info; in lio_map_ring() local
457 pg_info = ((struct octeon_skb_page_info *)(skb->cb)); in lio_map_ring()
458 if (!pg_info->page) { in lio_map_ring()
464 dma_addr = pg_info->dma; in lio_map_ring()
465 if (!pg_info->dma) { in lio_map_ring()
470 dma_addr += pg_info->page_offset; in lio_map_ring()