MCPcopy Create free account
hub / github.com/F-Stack/f-stack / __stack_alloc

Function __stack_alloc

dpdk/drivers/mempool/stack/rte_mempool_stack.c:9–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <rte_stack.h>
8
9static int
10__stack_alloc(struct rte_mempool *mp, uint32_t flags)
11{
12 char name[RTE_STACK_NAMESIZE];
13 struct rte_stack *s;
14 int ret;
15
16 ret = snprintf(name, sizeof(name),
17 RTE_MEMPOOL_MZ_FORMAT, mp->name);
18 if (ret < 0 || ret >= (int)sizeof(name)) {
19 rte_errno = ENAMETOOLONG;
20 return -rte_errno;
21 }
22
23 s = rte_stack_create(name, mp->size, mp->socket_id, flags);
24 if (s == NULL)
25 return -rte_errno;
26
27 mp->pool_data = s;
28
29 return 0;
30}
31
32static int
33stack_alloc(struct rte_mempool *mp)

Callers 2

stack_allocFunction · 0.85
lf_stack_allocFunction · 0.85

Calls 2

snprintfFunction · 0.85
rte_stack_createFunction · 0.85

Tested by

no test coverage detected