Searched refs:bm_pool (Results 1 – 6 of 6) sorted by relevance
/linux-5.19.10/net/core/ |
D | hwbm.c | 13 void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf) in hwbm_buf_free() argument 15 if (likely(bm_pool->frag_size <= PAGE_SIZE)) in hwbm_buf_free() 23 int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp) in hwbm_pool_refill() argument 25 int frag_size = bm_pool->frag_size; in hwbm_pool_refill() 36 if (bm_pool->construct) in hwbm_pool_refill() 37 if (bm_pool->construct(bm_pool, buf)) { in hwbm_pool_refill() 38 hwbm_buf_free(bm_pool, buf); in hwbm_pool_refill() 46 int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num) in hwbm_pool_add() argument 50 mutex_lock(&bm_pool->buf_lock); in hwbm_pool_add() 51 if (bm_pool->buf_num == bm_pool->size) { in hwbm_pool_add() [all …]
|
/linux-5.19.10/drivers/net/ethernet/marvell/ |
D | mvneta_bm.c | 95 struct mvneta_bm_pool *bm_pool = in mvneta_bm_construct() local 97 struct mvneta_bm *priv = bm_pool->priv; in mvneta_bm_construct() 105 phys_addr = dma_map_single(&priv->pdev->dev, buf, bm_pool->buf_size, in mvneta_bm_construct() 110 mvneta_bm_pool_put_bp(priv, bm_pool, phys_addr); in mvneta_bm_construct() 117 struct mvneta_bm_pool *bm_pool) in mvneta_bm_pool_create() argument 122 size_bytes = sizeof(u32) * bm_pool->hwbm_pool.size; in mvneta_bm_pool_create() 123 bm_pool->virt_addr = dma_alloc_coherent(&pdev->dev, size_bytes, in mvneta_bm_pool_create() 124 &bm_pool->phys_addr, in mvneta_bm_pool_create() 126 if (!bm_pool->virt_addr) in mvneta_bm_pool_create() 129 if (!IS_ALIGNED((u32)bm_pool->virt_addr, MVNETA_BM_POOL_PTR_ALIGN)) { in mvneta_bm_pool_create() [all …]
|
D | mvneta_bm.h | 138 struct mvneta_bm_pool *bm_pool, u8 port_map); 139 void mvneta_bm_bufs_free(struct mvneta_bm *priv, struct mvneta_bm_pool *bm_pool, 143 struct mvneta_bm_pool *bm_pool); 149 struct mvneta_bm_pool *bm_pool, in mvneta_bm_pool_put_bp() argument 153 (bm_pool->id << MVNETA_BM_POOL_ACCESS_OFFS)); in mvneta_bm_pool_put_bp() 157 struct mvneta_bm_pool *bm_pool) in mvneta_bm_pool_get_bp() argument 160 (bm_pool->id << MVNETA_BM_POOL_ACCESS_OFFS)); in mvneta_bm_pool_get_bp() 164 struct mvneta_bm_pool *bm_pool, in mvneta_bm_pool_destroy() argument 167 struct mvneta_bm_pool *bm_pool, in mvneta_bm_bufs_free() argument 172 struct mvneta_bm_pool *bm_pool) in mvneta_bm_pool_refill() argument [all …]
|
D | mvneta.c | 1207 struct mvneta_bm_pool *bm_pool = pp->pool_long; in mvneta_bm_update_mtu() local 1208 struct hwbm_pool *hwbm_pool = &bm_pool->hwbm_pool; in mvneta_bm_update_mtu() 1212 mvneta_bm_bufs_free(pp->bm_priv, bm_pool, 1 << pp->id); in mvneta_bm_update_mtu() 1215 bm_pool->id); in mvneta_bm_update_mtu() 1219 bm_pool->pkt_size = MVNETA_RX_PKT_SIZE(mtu); in mvneta_bm_update_mtu() 1220 bm_pool->buf_size = MVNETA_RX_BUF_SIZE(bm_pool->pkt_size); in mvneta_bm_update_mtu() 1222 SKB_DATA_ALIGN(MVNETA_RX_BUF_SIZE(bm_pool->pkt_size)); in mvneta_bm_update_mtu() 1228 bm_pool->id, num, hwbm_pool->size); in mvneta_bm_update_mtu() 1231 mvneta_bm_pool_bufsize_set(pp, bm_pool->buf_size, bm_pool->id); in mvneta_bm_update_mtu() 1993 struct mvneta_bm_pool *bm_pool; in mvneta_rxq_drop_pkts() local [all …]
|
/linux-5.19.10/include/net/ |
D | hwbm.h | 13 int (*construct)(struct hwbm_pool *bm_pool, void *buf); 20 void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf); 21 int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp); 22 int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num); 24 static inline void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf) {} in hwbm_buf_free() argument 26 static inline int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp) in hwbm_pool_refill() argument 29 static inline int hwbm_pool_add(struct hwbm_pool *bm_pool, in hwbm_pool_add() argument
|
/linux-5.19.10/drivers/net/ethernet/marvell/mvpp2/ |
D | mvpp2_main.c | 387 struct mvpp2_bm_pool *bm_pool, int size) in mvpp2_bm_pool_create() argument 401 bm_pool->size_bytes = 2 * sizeof(u32) * size; in mvpp2_bm_pool_create() 403 bm_pool->size_bytes = 2 * sizeof(u64) * size; in mvpp2_bm_pool_create() 405 bm_pool->virt_addr = dma_alloc_coherent(dev, bm_pool->size_bytes, in mvpp2_bm_pool_create() 406 &bm_pool->dma_addr, in mvpp2_bm_pool_create() 408 if (!bm_pool->virt_addr) in mvpp2_bm_pool_create() 411 if (!IS_ALIGNED((unsigned long)bm_pool->virt_addr, in mvpp2_bm_pool_create() 413 dma_free_coherent(dev, bm_pool->size_bytes, in mvpp2_bm_pool_create() 414 bm_pool->virt_addr, bm_pool->dma_addr); in mvpp2_bm_pool_create() 416 bm_pool->id, MVPP2_BM_POOL_PTR_ALIGN); in mvpp2_bm_pool_create() [all …]
|