42 .nbpo_below_threshold =
low,
53 uint32_t colours = 10;
191 }
while (nb ==
NULL);
static m0_bcount_t seg_size
M0_INTERNAL void m0_net_buffer_pool_fini(struct m0_net_buffer_pool *pool)
static void test_fini(void)
M0_INTERNAL void m0_chan_wait(struct m0_clink *link)
#define M0_ALLOC_ARR(arr, nr)
void m0_net_domain_fini(struct m0_net_domain *dom)
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
M0_INTERNAL void m0_clink_del_lock(struct m0_clink *link)
int m0_thread_join(struct m0_thread *q)
static void low(struct m0_net_buffer_pool *bp)
M0_INTERNAL struct m0_net_buffer * m0_net_buffer_pool_get(struct m0_net_buffer_pool *pool, uint32_t colour)
M0_INTERNAL void m0_net_buffer_pool_unlock(struct m0_net_buffer_pool *pool)
static void test_get_put_multiple(void)
const struct m0_net_buffer_pool_ops * nbp_ops
#define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt,...)
m0_time_t m0_time(uint64_t secs, long ns)
struct m0_ut_suite buffer_pool_ut
M0_INTERNAL void m0_chan_signal(struct m0_chan *chan)
static void buffers_get_put(int rc)
M0_INTERNAL bool m0_net_buffer_pool_invariant(const struct m0_net_buffer_pool *pool)
M0_INTERNAL void m0_chan_init(struct m0_chan *chan, struct m0_mutex *ch_guard)
static void test_init(void)
M0_INTERNAL bool m0_net_buffer_pool_prune(struct m0_net_buffer_pool *pool)
static struct m0_chan buf_chan
static void test_get_put_colour(void)
void(* nbpo_not_empty)(struct m0_net_buffer_pool *)
M0_INTERNAL void m0_net_buffer_pool_lock(struct m0_net_buffer_pool *pool)
struct m0_net_xprt * m0_net_xprt_default_get(void)
static void test_prune(void)
static void notempty(struct m0_net_buffer_pool *bp)
struct m0_net_domain * nbp_ndom
void m0_clink_add_lock(struct m0_chan *chan, struct m0_clink *link)
static struct m0_net_buffer_pool bp
static uint32_t min32u(uint32_t a, uint32_t b)
int m0_net_domain_init(struct m0_net_domain *dom, const struct m0_net_xprt *xprt)
struct m0_mutex nbp_mutex
static void test_grow(void)
#define M0_ALLOC_PTR(ptr)
M0_INTERNAL int m0_net_buffer_pool_provision(struct m0_net_buffer_pool *pool, uint32_t buf_nr)
M0_INTERNAL void m0_clink_fini(struct m0_clink *link)
static struct m0_thread * client_thread
M0_INTERNAL int32_t m0_net_domain_get_max_buffer_segments(struct m0_net_domain *dom)
static const struct m0_net_buffer_pool_ops b_ops
M0_INTERNAL void m0_net_buffer_pool_put(struct m0_net_buffer_pool *pool, struct m0_net_buffer *buf, uint32_t colour)
M0_INTERNAL void m0_chan_fini_lock(struct m0_chan *chan)
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 void test_get_put(void)
static int nr_client_threads
int m0_nanosleep(const m0_time_t req, m0_time_t *rem)