upipe/uprobe_ubuf_mem_pool.h header reference
probe catching provide_request events asking for a ubuf manager, and keeping the managers in a pool More
Header inclusion [link]
Members [link]
Type [link]
- struct uprobe_ubuf_mem_pool
Functions [link]
- struct uprobe * uprobe_ubuf_mem_pool_alloc(struct uprobe *next, struct umem_mgr *umem_mgr, uint16_t ubuf_pool_depth, uint16_t shared_pool_depth)
- void uprobe_ubuf_mem_pool_clean(struct uprobe_ubuf_mem_pool *uprobe_ubuf_mem_pool)
- struct uprobe * uprobe_ubuf_mem_pool_init(struct uprobe_ubuf_mem_pool *uprobe_ubuf_mem_pool, struct uprobe *next, struct umem_mgr *umem_mgr, uint16_t ubuf_pool_depth, uint16_t shared_pool_depth)
- void uprobe_ubuf_mem_pool_set(struct uprobe *uprobe, struct umem_mgr *umem_mgr)
- void uprobe_ubuf_mem_pool_vacuum(struct uprobe_ubuf_mem_pool *uprobe_ubuf_mem_pool)
Description [link]
probe catching provide_request events asking for a ubuf manager, and keeping the managers in a pool
Members detail [link]
#define _UPIPE_UPROBE_UBUF_MEM_POOL_H_ [link]
This macro is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 31.
[link]
This struct is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 43.
| Field | Description |
|---|---|
| struct urefcount * refcount; | pointer to refcount management structure |
| bool (*umem_alloc)(struct umem_mgr *, struct umem *, size_t ) ; | function to allocate a new memory block |
| bool (*umem_realloc)(struct umem *, size_t ) ; | function to resize umem |
| void (*umem_free)(struct umem *) ; | function to free a umem |
| void (*umem_mgr_vacuum)(struct umem_mgr *) ; | function to release all buffers kept in pools |
struct uprobe_ubuf_mem_pool [link]
This struct is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 47.
This struct is a super-set of the uprobe structure with additional local members.
| Field | Description |
|---|---|
| struct umem_mgr * umem_mgr; | pointer to umem_mgr to use to allocate ubuf manager |
| uint16_t ubuf_pool_depth; | depth of the ubuf pool |
| uint16_t shared_pool_depth; | depth of the shared object pool |
| uatomic_ptr_t first; | chained list of ubuf managers, elements are never removed |
| struct uprobe uprobe; | structure exported to modules |
struct uprobe * uprobe_ubuf_mem_pool_alloc(struct uprobe *next, struct umem_mgr *umem_mgr, uint16_t ubuf_pool_depth, uint16_t shared_pool_depth) [link]
This function is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 104.
This function allocates a new uprobe_ubuf_mgr structure.
Parameter list:
- next: next probe to test if this one doesn't catch the event
- umem_mgr: memory allocator to use for buffers
- ubuf_pool_depth: maximum number of ubuf structures in the pool
- shared_pool_depth: maximum number of shared structures in the pool
The return value is pointer to uprobe, or NULL in case of error
void uprobe_ubuf_mem_pool_clean(struct uprobe_ubuf_mem_pool *uprobe_ubuf_mem_pool) [link]
This function is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 91.
This function cleans a uprobe_ubuf_mem_pool structure.
Parameter list:
- uprobe_ubuf_mem_pool: structure to clean
struct uprobe * uprobe_ubuf_mem_pool_init(struct uprobe_ubuf_mem_pool *uprobe_ubuf_mem_pool, struct uprobe *next, struct umem_mgr *umem_mgr, uint16_t ubuf_pool_depth, uint16_t shared_pool_depth) [link]
This function is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 77.
This function initializes an already allocated uprobe_ubuf_mem_pool structure.
Parameter list:
- uprobe_ubuf_mem_pool: pointer to the already allocated structure
- next: next probe to test if this one doesn't catch the event
- umem_mgr: memory allocator to use for buffers
- ubuf_pool_depth: maximum number of ubuf structures in the pool
- shared_pool_depth: maximum number of shared structures in the pool
The return value is pointer to uprobe, or NULL in case of error
This function is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 111.
This function changes the umem_mgr used by this probe.
Parameter list:
- uprobe: pointer to probe
- umem_mgr: new umem manager to use
void uprobe_ubuf_mem_pool_vacuum(struct uprobe_ubuf_mem_pool *uprobe_ubuf_mem_pool) [link]
This function is declared in upipe/uprobe_ubuf_mem_pool.h source file, line 85.
This function instructs an existing probe to release all manager currently kept in pools. Please not that this function is not thread-safe, and mustn't be used if the probe may be called from another thread.
Parameter list:
- uprobe_ubuf_mem_pool: structure to vacuum
struct uprobe_ubuf_mem_pool * uprobe_ubuf_mem_pool_from_uprobe(struct uprobe *uprobe) [link]
This function is for internal use only.
This function is declared in UPROBE_HELPER_UPROBE function like macro expansion, line 19 in upipe/uprobe_ubuf_mem_pool.h source file, line 62.
This function returns the private uprobe_ubuf_mem_pool structure.
Parameter list:
- uprobe: public description structure of the probe
The return value is pointer to the private uprobe_ubuf_mem_pool structure
struct uprobe * uprobe_ubuf_mem_pool_to_uprobe(struct uprobe_ubuf_mem_pool *s) [link]
This function is for internal use only.
This function is declared in UPROBE_HELPER_UPROBE function like macro expansion, line 9 in upipe/uprobe_ubuf_mem_pool.h source file, line 62.
This function returns the public uprobe structure.
Parameter list:
- uprobe_ubuf_mem_pool: pointer to the private uprobe_ubuf_mem_pool structure
The return value is pointer to the public uprobe structure