Lines Matching full:pool

23 void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries);
24 bool xsk_tx_peek_desc(struct xsk_buff_pool *pool, struct xdp_desc *desc);
25 u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, u32 max);
26 void xsk_tx_release(struct xsk_buff_pool *pool);
29 void xsk_set_rx_need_wakeup(struct xsk_buff_pool *pool);
30 void xsk_set_tx_need_wakeup(struct xsk_buff_pool *pool);
31 void xsk_clear_rx_need_wakeup(struct xsk_buff_pool *pool);
32 void xsk_clear_tx_need_wakeup(struct xsk_buff_pool *pool);
33 bool xsk_uses_need_wakeup(struct xsk_buff_pool *pool);
35 static inline u32 xsk_pool_get_headroom(struct xsk_buff_pool *pool) in xsk_pool_get_headroom() argument
37 return XDP_PACKET_HEADROOM + pool->headroom; in xsk_pool_get_headroom()
40 static inline u32 xsk_pool_get_chunk_size(struct xsk_buff_pool *pool) in xsk_pool_get_chunk_size() argument
42 return pool->chunk_size; in xsk_pool_get_chunk_size()
45 static inline u32 xsk_pool_get_rx_frame_size(struct xsk_buff_pool *pool) in xsk_pool_get_rx_frame_size() argument
47 return xsk_pool_get_chunk_size(pool) - xsk_pool_get_headroom(pool); in xsk_pool_get_rx_frame_size()
50 static inline void xsk_pool_set_rxq_info(struct xsk_buff_pool *pool, in xsk_pool_set_rxq_info() argument
53 xp_set_rxq_info(pool, rxq); in xsk_pool_set_rxq_info()
56 static inline void xsk_pool_fill_cb(struct xsk_buff_pool *pool, in xsk_pool_fill_cb() argument
59 xp_fill_cb(pool, desc); in xsk_pool_fill_cb()
62 static inline void xsk_pool_dma_unmap(struct xsk_buff_pool *pool, in xsk_pool_dma_unmap() argument
65 xp_dma_unmap(pool, attrs); in xsk_pool_dma_unmap()
68 static inline int xsk_pool_dma_map(struct xsk_buff_pool *pool, in xsk_pool_dma_map() argument
71 struct xdp_umem *umem = pool->umem; in xsk_pool_dma_map()
73 return xp_dma_map(pool, dev, attrs, umem->pgs, umem->npgs); in xsk_pool_dma_map()
90 static inline struct xdp_buff *xsk_buff_alloc(struct xsk_buff_pool *pool) in xsk_buff_alloc() argument
92 return xp_alloc(pool); in xsk_buff_alloc()
101 static inline u32 xsk_buff_alloc_batch(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max) in xsk_buff_alloc_batch() argument
103 return xp_alloc_batch(pool, xdp, max); in xsk_buff_alloc_batch()
106 static inline bool xsk_buff_can_alloc(struct xsk_buff_pool *pool, u32 count) in xsk_buff_can_alloc() argument
108 return xp_can_alloc(pool, count); in xsk_buff_can_alloc()
114 struct list_head *xskb_list = &xskb->pool->xskb_list; in xsk_buff_free()
142 list_add_tail(&frag->list_node, &frag->pool->xskb_list); in xsk_buff_add_frag()
153 frag = list_first_entry_or_null(&xskb->pool->xskb_list, in xsk_buff_get_frag()
175 frag = list_last_entry(&xskb->pool->xskb_list, struct xdp_buff_xsk, in xsk_buff_get_tail()
188 static inline dma_addr_t xsk_buff_raw_get_dma(struct xsk_buff_pool *pool, in xsk_buff_raw_get_dma() argument
191 return xp_raw_get_dma(pool, addr); in xsk_buff_raw_get_dma()
194 static inline void *xsk_buff_raw_get_data(struct xsk_buff_pool *pool, u64 addr) in xsk_buff_raw_get_data() argument
196 return xp_raw_get_data(pool, addr); in xsk_buff_raw_get_data()
201 * @pool: XSk buff pool desc address belongs to
211 xsk_buff_raw_get_ctx(const struct xsk_buff_pool *pool, u64 addr) in xsk_buff_raw_get_ctx() argument
213 return xp_raw_get_ctx(pool, addr); in xsk_buff_raw_get_ctx()
229 __xsk_buff_get_metadata(const struct xsk_buff_pool *pool, void *data) in __xsk_buff_get_metadata() argument
233 if (!pool->tx_metadata_len) in __xsk_buff_get_metadata()
236 meta = data - pool->tx_metadata_len; in __xsk_buff_get_metadata()
244 xsk_buff_get_metadata(struct xsk_buff_pool *pool, u64 addr) in xsk_buff_get_metadata() argument
246 return __xsk_buff_get_metadata(pool, xp_raw_get_data(pool, addr)); in xsk_buff_get_metadata()
256 static inline void xsk_buff_raw_dma_sync_for_device(struct xsk_buff_pool *pool, in xsk_buff_raw_dma_sync_for_device() argument
260 xp_dma_sync_for_device(pool, dma, size); in xsk_buff_raw_dma_sync_for_device()
265 static inline void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries) in xsk_tx_completed() argument
269 static inline bool xsk_tx_peek_desc(struct xsk_buff_pool *pool, in xsk_tx_peek_desc() argument
275 static inline u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, u32 max) in xsk_tx_peek_release_desc_batch() argument
280 static inline void xsk_tx_release(struct xsk_buff_pool *pool) in xsk_tx_release() argument
290 static inline void xsk_set_rx_need_wakeup(struct xsk_buff_pool *pool) in xsk_set_rx_need_wakeup() argument
294 static inline void xsk_set_tx_need_wakeup(struct xsk_buff_pool *pool) in xsk_set_tx_need_wakeup() argument
298 static inline void xsk_clear_rx_need_wakeup(struct xsk_buff_pool *pool) in xsk_clear_rx_need_wakeup() argument
302 static inline void xsk_clear_tx_need_wakeup(struct xsk_buff_pool *pool) in xsk_clear_tx_need_wakeup() argument
306 static inline bool xsk_uses_need_wakeup(struct xsk_buff_pool *pool) in xsk_uses_need_wakeup() argument
311 static inline u32 xsk_pool_get_headroom(struct xsk_buff_pool *pool) in xsk_pool_get_headroom() argument
316 static inline u32 xsk_pool_get_chunk_size(struct xsk_buff_pool *pool) in xsk_pool_get_chunk_size() argument
321 static inline u32 xsk_pool_get_rx_frame_size(struct xsk_buff_pool *pool) in xsk_pool_get_rx_frame_size() argument
326 static inline void xsk_pool_set_rxq_info(struct xsk_buff_pool *pool, in xsk_pool_set_rxq_info() argument
331 static inline void xsk_pool_fill_cb(struct xsk_buff_pool *pool, in xsk_pool_fill_cb() argument
336 static inline void xsk_pool_dma_unmap(struct xsk_buff_pool *pool, in xsk_pool_dma_unmap() argument
341 static inline int xsk_pool_dma_map(struct xsk_buff_pool *pool, in xsk_pool_dma_map() argument
357 static inline struct xdp_buff *xsk_buff_alloc(struct xsk_buff_pool *pool) in xsk_buff_alloc() argument
367 static inline u32 xsk_buff_alloc_batch(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max) in xsk_buff_alloc_batch() argument
372 static inline bool xsk_buff_can_alloc(struct xsk_buff_pool *pool, u32 count) in xsk_buff_can_alloc() argument
405 static inline dma_addr_t xsk_buff_raw_get_dma(struct xsk_buff_pool *pool, in xsk_buff_raw_get_dma() argument
411 static inline void *xsk_buff_raw_get_data(struct xsk_buff_pool *pool, u64 addr) in xsk_buff_raw_get_data() argument
417 xsk_buff_raw_get_ctx(const struct xsk_buff_pool *pool, u64 addr) in xsk_buff_raw_get_ctx() argument
428 __xsk_buff_get_metadata(const struct xsk_buff_pool *pool, void *data) in __xsk_buff_get_metadata() argument
434 xsk_buff_get_metadata(struct xsk_buff_pool *pool, u64 addr) in xsk_buff_get_metadata() argument
443 static inline void xsk_buff_raw_dma_sync_for_device(struct xsk_buff_pool *pool, in xsk_buff_raw_dma_sync_for_device() argument