hwbm_pool
struct hwbm_pool *hwbm_pool = &bm_pool->hwbm_pool;
if (hwbm_pool->buf_num) {
hwbm_pool->frag_size = SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) +
num = hwbm_pool_add(hwbm_pool, hwbm_pool->size);
if (num != hwbm_pool->size) {
bm_pool->id, num, hwbm_pool->size);
err = hwbm_pool_refill(&bm_pool->hwbm_pool, GFP_ATOMIC);
frag_size = bm_pool->hwbm_pool.frag_size;
size_bytes = sizeof(u32) * bm_pool->hwbm_pool.size;
struct hwbm_pool *hwbm_pool = &new_pool->hwbm_pool;
hwbm_pool->frag_size =
hwbm_pool->construct = mvneta_bm_construct;
hwbm_pool->priv = new_pool;
mutex_init(&hwbm_pool->buf_lock);
num = hwbm_pool_add(hwbm_pool, hwbm_pool->size);
if (num != hwbm_pool->size) {
new_pool->id, num, hwbm_pool->size);
for (i = 0; i < bm_pool->hwbm_pool.buf_num; i++) {
hwbm_buf_free(&bm_pool->hwbm_pool, vaddr);
bm_pool->hwbm_pool.buf_num -= i;
struct hwbm_pool *hwbm_pool = &bm_pool->hwbm_pool;
if (hwbm_pool->buf_num)
sizeof(u32) * hwbm_pool->size,
bm_pool->hwbm_pool.size = size;
bm_pool->hwbm_pool.size);
int mvneta_bm_construct(struct hwbm_pool *hwbm_pool, void *buf)
(struct mvneta_bm_pool *)hwbm_pool->priv;
struct hwbm_pool hwbm_pool;
int mvneta_bm_construct(struct hwbm_pool *hwbm_pool, void *buf);
static inline int mvneta_bm_construct(struct hwbm_pool *hwbm_pool, void *buf)
int (*construct)(struct hwbm_pool *bm_pool, void *buf);
void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf);
int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp);
int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num);
static inline void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf) {}
static inline int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp)
static inline int hwbm_pool_add(struct hwbm_pool *bm_pool,
void hwbm_buf_free(struct hwbm_pool *bm_pool, void *buf)
int hwbm_pool_refill(struct hwbm_pool *bm_pool, gfp_t gfp)
int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num)