mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 07:44:21 +08:00
70d0bb45fa
Correct spelling in Networking headers. As reported by codespell. Signed-off-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20240822-net-spell-v1-12-3a98971ce2d2@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
36 lines
997 B
C
36 lines
997 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _HWBM_H
|
|
#define _HWBM_H
|
|
|
|
#include <linux/mutex.h>
|
|
|
|
struct hwbm_pool {
|
|
/* Capacity of the pool */
|
|
int size;
|
|
/* Size of the buffers managed */
|
|
int frag_size;
|
|
/* Number of buffers currently used by this pool */
|
|
int buf_num;
|
|
/* constructor called during allocation */
|
|
int (*construct)(struct hwbm_pool *bm_pool, void *buf);
|
|
/* protect access to the buffer counter*/
|
|
struct mutex buf_lock;
|
|
/* private data */
|
|
void *priv;
|
|
};
|
|
#ifdef CONFIG_HWBM
|
|
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);
|
|
#else
|
|
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)
|
|
{ return 0; }
|
|
|
|
static inline int hwbm_pool_add(struct hwbm_pool *bm_pool,
|
|
unsigned int buf_num)
|
|
{ return 0; }
|
|
#endif /* CONFIG_HWBM */
|
|
#endif /* _HWBM_H */
|