Lines Matching refs: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 unsigned int xsk_pool_get_napi_id(struct xsk_buff_pool *pool) in xsk_pool_get_napi_id() argument
65 return pool->heads[0].xdp.rxq->napi_id; in xsk_pool_get_napi_id()
71 static inline void xsk_pool_dma_unmap(struct xsk_buff_pool *pool, in xsk_pool_dma_unmap() argument
74 xp_dma_unmap(pool, attrs); in xsk_pool_dma_unmap()
77 static inline int xsk_pool_dma_map(struct xsk_buff_pool *pool, in xsk_pool_dma_map() argument
80 struct xdp_umem *umem = pool->umem; in xsk_pool_dma_map()
82 return xp_dma_map(pool, dev, attrs, umem->pgs, umem->npgs); in xsk_pool_dma_map()
99 static inline struct xdp_buff *xsk_buff_alloc(struct xsk_buff_pool *pool) in xsk_buff_alloc() argument
101 return xp_alloc(pool); in xsk_buff_alloc()
110 static inline u32 xsk_buff_alloc_batch(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max) in xsk_buff_alloc_batch() argument
112 return xp_alloc_batch(pool, xdp, max); in xsk_buff_alloc_batch()
115 static inline bool xsk_buff_can_alloc(struct xsk_buff_pool *pool, u32 count) in xsk_buff_can_alloc() argument
117 return xp_can_alloc(pool, count); in xsk_buff_can_alloc()
123 struct list_head *xskb_list = &xskb->pool->xskb_list; in xsk_buff_free()
143 list_add_tail(&frag->xskb_list_node, &frag->pool->xskb_list); in xsk_buff_add_frag()
152 frag = list_first_entry_or_null(&xskb->pool->xskb_list, in xsk_buff_get_frag()
174 frag = list_last_entry(&xskb->pool->xskb_list, struct xdp_buff_xsk, in xsk_buff_get_tail()
187 static inline dma_addr_t xsk_buff_raw_get_dma(struct xsk_buff_pool *pool, in xsk_buff_raw_get_dma() argument
190 return xp_raw_get_dma(pool, addr); in xsk_buff_raw_get_dma()
193 static inline void *xsk_buff_raw_get_data(struct xsk_buff_pool *pool, u64 addr) in xsk_buff_raw_get_data() argument
195 return xp_raw_get_data(pool, addr); in xsk_buff_raw_get_data()
208 static inline struct xsk_tx_metadata *xsk_buff_get_metadata(struct xsk_buff_pool *pool, u64 addr) in xsk_buff_get_metadata() argument
212 if (!pool->tx_metadata_len) in xsk_buff_get_metadata()
215 meta = xp_raw_get_data(pool, addr) - pool->tx_metadata_len; in xsk_buff_get_metadata()
229 static inline void xsk_buff_raw_dma_sync_for_device(struct xsk_buff_pool *pool, in xsk_buff_raw_dma_sync_for_device() argument
233 xp_dma_sync_for_device(pool, dma, size); in xsk_buff_raw_dma_sync_for_device()
238 static inline void xsk_tx_completed(struct xsk_buff_pool *pool, u32 nb_entries) in xsk_tx_completed() argument
242 static inline bool xsk_tx_peek_desc(struct xsk_buff_pool *pool, in xsk_tx_peek_desc() argument
248 static inline u32 xsk_tx_peek_release_desc_batch(struct xsk_buff_pool *pool, u32 max) in xsk_tx_peek_release_desc_batch() argument
253 static inline void xsk_tx_release(struct xsk_buff_pool *pool) in xsk_tx_release() argument
263 static inline void xsk_set_rx_need_wakeup(struct xsk_buff_pool *pool) in xsk_set_rx_need_wakeup() argument
267 static inline void xsk_set_tx_need_wakeup(struct xsk_buff_pool *pool) in xsk_set_tx_need_wakeup() argument
271 static inline void xsk_clear_rx_need_wakeup(struct xsk_buff_pool *pool) in xsk_clear_rx_need_wakeup() argument
275 static inline void xsk_clear_tx_need_wakeup(struct xsk_buff_pool *pool) in xsk_clear_tx_need_wakeup() argument
279 static inline bool xsk_uses_need_wakeup(struct xsk_buff_pool *pool) in xsk_uses_need_wakeup() argument
284 static inline u32 xsk_pool_get_headroom(struct xsk_buff_pool *pool) in xsk_pool_get_headroom() argument
289 static inline u32 xsk_pool_get_chunk_size(struct xsk_buff_pool *pool) in xsk_pool_get_chunk_size() argument
294 static inline u32 xsk_pool_get_rx_frame_size(struct xsk_buff_pool *pool) in xsk_pool_get_rx_frame_size() argument
299 static inline void xsk_pool_set_rxq_info(struct xsk_buff_pool *pool, in xsk_pool_set_rxq_info() argument
304 static inline void xsk_pool_fill_cb(struct xsk_buff_pool *pool, in xsk_pool_fill_cb() argument
309 static inline unsigned int xsk_pool_get_napi_id(struct xsk_buff_pool *pool) in xsk_pool_get_napi_id() argument
314 static inline void xsk_pool_dma_unmap(struct xsk_buff_pool *pool, in xsk_pool_dma_unmap() argument
319 static inline int xsk_pool_dma_map(struct xsk_buff_pool *pool, in xsk_pool_dma_map() argument
335 static inline struct xdp_buff *xsk_buff_alloc(struct xsk_buff_pool *pool) in xsk_buff_alloc() argument
345 static inline u32 xsk_buff_alloc_batch(struct xsk_buff_pool *pool, struct xdp_buff **xdp, u32 max) in xsk_buff_alloc_batch() argument
350 static inline bool xsk_buff_can_alloc(struct xsk_buff_pool *pool, u32 count) in xsk_buff_can_alloc() argument
381 static inline dma_addr_t xsk_buff_raw_get_dma(struct xsk_buff_pool *pool, in xsk_buff_raw_get_dma() argument
387 static inline void *xsk_buff_raw_get_data(struct xsk_buff_pool *pool, u64 addr) in xsk_buff_raw_get_data() argument
397 static inline struct xsk_tx_metadata *xsk_buff_get_metadata(struct xsk_buff_pool *pool, u64 addr) in xsk_buff_get_metadata() argument
406 static inline void xsk_buff_raw_dma_sync_for_device(struct xsk_buff_pool *pool, in xsk_buff_raw_dma_sync_for_device() argument