MCPcopy Index your code
hub / github.com/F-Stack/f-stack / ff_ipc_msg_alloc

Function ff_ipc_msg_alloc

tools/compat/ff_ipc.c:90–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90struct ff_msg *
91ff_ipc_msg_alloc(void)
92{
93 if (inited == 0) {
94 int ret = ff_ipc_init();
95 if (ret < 0) {
96 return NULL;
97 }
98 }
99
100 void *msg;
101 if (rte_mempool_get(message_pool, &msg) < 0) {
102 printf("get buffer from message pool failed.\n");
103 return NULL;
104 }
105
106 return (struct ff_msg *)msg;
107}
108
109int
110ff_ipc_msg_free(struct ff_msg *msg)

Callers 8

rtioctlFunction · 0.85
sysctlFunction · 0.85
ioctl_vaFunction · 0.85
ngctlFunction · 0.85
traffic_statusFunction · 0.85
ipfw_ctlFunction · 0.85
cpu_statusFunction · 0.85
knictl_statusFunction · 0.85

Calls 3

ff_ipc_initFunction · 0.85
rte_mempool_getFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected