Lines Matching refs:xskb

109 void xp_free(struct xdp_buff_xsk *xskb);
111 static inline void xp_init_xskb_addr(struct xdp_buff_xsk *xskb, struct xsk_buff_pool *pool, in xp_init_xskb_addr() argument
114 xskb->orig_addr = addr; in xp_init_xskb_addr()
115 xskb->xdp.data_hard_start = pool->addrs + addr + pool->headroom; in xp_init_xskb_addr()
118 static inline void xp_init_xskb_dma(struct xdp_buff_xsk *xskb, struct xsk_buff_pool *pool, in xp_init_xskb_dma() argument
121 xskb->frame_dma = (dma_pages[addr >> PAGE_SHIFT] & ~XSK_NEXT_PG_CONTIG_MASK) + in xp_init_xskb_dma()
123 xskb->dma = xskb->frame_dma + pool->headroom + XDP_PACKET_HEADROOM; in xp_init_xskb_dma()
136 static inline dma_addr_t xp_get_dma(struct xdp_buff_xsk *xskb) in xp_get_dma() argument
138 return xskb->dma; in xp_get_dma()
141 static inline dma_addr_t xp_get_frame_dma(struct xdp_buff_xsk *xskb) in xp_get_frame_dma() argument
143 return xskb->frame_dma; in xp_get_frame_dma()
146 void xp_dma_sync_for_cpu_slow(struct xdp_buff_xsk *xskb);
147 static inline void xp_dma_sync_for_cpu(struct xdp_buff_xsk *xskb) in xp_dma_sync_for_cpu() argument
149 xp_dma_sync_for_cpu_slow(xskb); in xp_dma_sync_for_cpu()
213 static inline void xp_release(struct xdp_buff_xsk *xskb) in xp_release() argument
215 if (xskb->pool->unaligned) in xp_release()
216 xskb->pool->free_heads[xskb->pool->free_heads_cnt++] = xskb; in xp_release()
219 static inline u64 xp_get_handle(struct xdp_buff_xsk *xskb) in xp_get_handle() argument
221 u64 offset = xskb->xdp.data - xskb->xdp.data_hard_start; in xp_get_handle()
223 offset += xskb->pool->headroom; in xp_get_handle()
224 if (!xskb->pool->unaligned) in xp_get_handle()
225 return xskb->orig_addr + offset; in xp_get_handle()
226 return xskb->orig_addr + (offset << XSK_UNALIGNED_BUF_OFFSET_SHIFT); in xp_get_handle()