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

Function fdset_pipe_init

dpdk/lib/vhost/fd_man.c:337–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337int
338fdset_pipe_init(struct fdset *fdset)
339{
340 int ret;
341
342 if (pipe(fdset->u.pipefd) < 0) {
343 RTE_LOG(ERR, VHOST_FDMAN,
344 "failed to create pipe for vhost fdset\n");
345 return -1;
346 }
347
348 ret = fdset_add(fdset, fdset->u.readfd,
349 fdset_pipe_read_cb, NULL, fdset);
350
351 if (ret < 0) {
352 RTE_LOG(ERR, VHOST_FDMAN,
353 "failed to add pipe readfd %d into vhost server fdset\n",
354 fdset->u.readfd);
355
356 fdset_pipe_uninit(fdset);
357 return -1;
358 }
359
360 return 0;
361}
362
363void
364fdset_pipe_notify(struct fdset *fdset)

Callers 2

rte_vhost_driver_startFunction · 0.85
vduse_device_createFunction · 0.85

Calls 3

fdset_addFunction · 0.85
fdset_pipe_uninitFunction · 0.85
pipeClass · 0.50

Tested by

no test coverage detected