Home
last modified time | relevance | path

Searched refs:bm_pool (Results 1 – 6 of 6) sorted by relevance

/linux-6.15/net/core/
H A Dhwbm.c25 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()
50 mutex_lock(&bm_pool->buf_lock); in hwbm_pool_add()
51 if (bm_pool->buf_num == bm_pool->size) { in hwbm_pool_add()
54 return bm_pool->buf_num; in hwbm_pool_add()
57 if (buf_num + bm_pool->buf_num > bm_pool->size) { in hwbm_pool_add()
64 if ((buf_num + bm_pool->buf_num) < bm_pool->buf_num) { in hwbm_pool_add()
66 buf_num, bm_pool->buf_num); in hwbm_pool_add()
[all …]
/linux-6.15/drivers/net/ethernet/marvell/
H A Dmvneta_bm.c124 &bm_pool->phys_addr, in mvneta_bm_pool_create()
126 if (!bm_pool->virt_addr) in mvneta_bm_pool_create()
131 bm_pool->phys_addr); in mvneta_bm_pool_create()
141 bm_pool->phys_addr); in mvneta_bm_pool_create()
147 bm_pool->phys_addr); in mvneta_bm_pool_create()
223 if (bm_pool->port_map) in mvneta_bm_bufs_free()
263 if (bm_pool->port_map) in mvneta_bm_pool_destroy()
272 if (bm_pool->virt_addr) { in mvneta_bm_pool_destroy()
275 bm_pool->virt_addr, bm_pool->phys_addr); in mvneta_bm_pool_destroy()
297 bm_pool->id = i; in mvneta_bm_pools_init()
[all …]
H A Dmvneta_bm.h138 struct mvneta_bm_pool *bm_pool, u8 port_map);
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
182 struct mvneta_bm_pool *bm_pool, in mvneta_bm_pool_put_bp() argument
[all …]
H A Dmvneta.c1221 bm_pool->id); in mvneta_bm_update_mtu()
1225 bm_pool->pkt_size = MVNETA_RX_PKT_SIZE(mtu); in mvneta_bm_update_mtu()
1226 bm_pool->buf_size = MVNETA_RX_BUF_SIZE(bm_pool->pkt_size); in mvneta_bm_update_mtu()
1234 bm_pool->id, num, hwbm_pool->size); in mvneta_bm_update_mtu()
1237 mvneta_bm_pool_bufsize_set(pp, bm_pool->buf_size, bm_pool->id); in mvneta_bm_update_mtu()
2000 struct mvneta_bm_pool *bm_pool; in mvneta_rxq_drop_pkts() local
2002 bm_pool = &pp->bm_priv->bm_pools[pool_id]; in mvneta_rxq_drop_pkts()
2561 struct mvneta_bm_pool *bm_pool = NULL; in mvneta_rx_hwbm() local
2575 bm_pool = &pp->bm_priv->bm_pools[pool_id]; in mvneta_rx_hwbm()
2633 frag_size = bm_pool->hwbm_pool.frag_size; in mvneta_rx_hwbm()
[all …]
/linux-6.15/include/net/
H A Dhwbm.h15 int (*construct)(struct hwbm_pool *bm_pool, void *buf);
22 void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf);
23 int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp);
24 int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num);
26 static inline void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf) {} in hwbm_buf_free() argument
28 static inline int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp) in hwbm_pool_refill() argument
31 static inline int hwbm_pool_add(struct hwbm_pool *bm_pool, in hwbm_pool_add() argument
/linux-6.15/drivers/net/ethernet/marvell/mvpp2/
H A Dmvpp2_main.c405 bm_pool->virt_addr = dma_alloc_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()
441 bm_pool->size = size; in mvpp2_bm_pool_create()
442 bm_pool->pkt_size = 0; in mvpp2_bm_pool_create()
443 bm_pool->buf_num = 0; in mvpp2_bm_pool_create()
561 bm_pool->id, bm_pool->buf_num); in mvpp2_bm_pool_destroy()
592 bm_pool->id = i; in mvpp2_bm_pools_init()
1063 (buf_num + bm_pool->buf_num > bm_pool->size)) { in mvpp2_bm_bufs_add()
1087 bm_pool->id, bm_pool->pkt_size, buf_size, total_size); in mvpp2_bm_bufs_add()
1259 if (!bm_pool) in mvpp2_swf_bm_pool_init_percpu()
[all …]