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

Function ff_ipc_send

tools/compat/ff_ipc.c:129–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129int
130ff_ipc_send(const struct ff_msg *msg)
131{
132 int ret;
133
134 if (inited == 0) {
135 printf("ff ipc not inited\n");
136 return -1;
137 }
138
139 char name[RTE_RING_NAMESIZE];
140 snprintf(name, RTE_RING_NAMESIZE, "%s%u",
141 FF_MSG_RING_IN, ff_proc_id);
142 struct rte_ring *ring = rte_ring_lookup(name);
143 if (ring == NULL) {
144 printf("lookup message ring:%s failed!\n", name);
145 return -1;
146 }
147
148 ret = rte_ring_enqueue(ring, (void *)msg);
149 if (ret < 0) {
150 printf("ff_ipc_send failed\n");
151 return ret;
152 }
153
154 return 0;
155}
156
157int
158ff_ipc_recv(struct ff_msg **msg, enum FF_MSG_TYPE msg_type)

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 4

snprintfFunction · 0.85
rte_ring_lookupFunction · 0.85
rte_ring_enqueueFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected