Motr  M0
buffer_pool.c File Reference
#include "lib/misc.h"
#include "lib/memory.h"
#include "lib/errno.h"
#include "lib/arith.h"
#include "motr/magic.h"
#include "net/buffer_pool.h"
#include "net/net_internal.h"
#include "lib/trace.h"
Include dependency graph for buffer_pool.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_NET
 

Functions

 M0_TL_DESCR_DEFINE (m0_net_pool, "net_buffer_pool", M0_INTERNAL, struct m0_net_buffer, nb_lru, nb_magic, M0_NET_BUFFER_LINK_MAGIC, M0_NET_BUFFER_HEAD_MAGIC)
 
 M0_TL_DEFINE (m0_net_pool, M0_INTERNAL, struct m0_net_buffer)
 
static bool pool_colour_check (const struct m0_net_buffer_pool *pool)
 
static bool pool_lru_buffer_check (const struct m0_net_buffer_pool *pool)
 
static bool colour_is_valid (const struct m0_net_buffer_pool *pool, uint32_t colour)
 
M0_INTERNAL bool m0_net_buffer_pool_invariant (const struct m0_net_buffer_pool *pool)
 
M0_INTERNAL int m0_net_buffer_pool_init (struct m0_net_buffer_pool *pool, struct m0_net_domain *ndom, uint32_t threshold, uint32_t seg_nr, m0_bcount_t seg_size, uint32_t colours, unsigned shift, bool dont_dump)
 
static bool net_buffer_pool_grow (struct m0_net_buffer_pool *pool)
 
M0_INTERNAL int m0_net_buffer_pool_provision (struct m0_net_buffer_pool *pool, uint32_t buf_nr)
 
static void buffer_remove (struct m0_net_buffer_pool *pool, struct m0_net_buffer *nb)
 
M0_INTERNAL void m0_net_buffer_pool_fini (struct m0_net_buffer_pool *pool)
 
M0_INTERNAL void m0_net_buffer_pool_lock (struct m0_net_buffer_pool *pool)
 
M0_INTERNAL bool m0_net_buffer_pool_is_locked (const struct m0_net_buffer_pool *pool)
 
M0_INTERNAL bool m0_net_buffer_pool_is_not_locked (const struct m0_net_buffer_pool *pool)
 
M0_INTERNAL void m0_net_buffer_pool_unlock (struct m0_net_buffer_pool *pool)
 
M0_INTERNAL struct m0_net_bufferm0_net_buffer_pool_get (struct m0_net_buffer_pool *pool, uint32_t colour)
 
M0_INTERNAL void m0_net_buffer_pool_put (struct m0_net_buffer_pool *pool, struct m0_net_buffer *buf, uint32_t colour)
 
M0_INTERNAL bool m0_net_buffer_pool_prune (struct m0_net_buffer_pool *pool)
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_NET

Definition at line 31 of file buffer_pool.c.