Lines Matching defs:fd
65 int fd, ret;
77 fd = ret;
83 VHOST_CONFIG_LOG(dev->ifname, DEBUG, "\tfd: %d", fd);
87 mmap_addr = mmap(0, size + entry.offset, entry.perm, MAP_SHARED, fd, 0);
95 ret = fstat(fd, &stat);
108 close(fd);
120 vduse_control_queue_event(int fd, void *arg, int *remove __rte_unused)
126 ret = read(fd, &buf, sizeof(buf));
186 VHOST_CONFIG_LOG(dev->ifname, INFO, "\tkick fd: %d", vq->kickfd);
209 vq_efd.fd = vq->kickfd;
226 vq_efd.fd = VDUSE_EVENTFD_DEASSIGN;
247 vq_efd.fd = VDUSE_EVENTFD_DEASSIGN;
353 vduse_events_handler(int fd, void *arg, int *remove __rte_unused)
364 ret = read(fd, &req, sizeof(req));
477 int fd, ret;
492 fd = open(reco_file, O_CREAT | O_EXCL | O_RDWR, 0600);
493 if (fd < 0) {
504 ret = ftruncate(fd, sizeof(*dev->reconnect_log));
511 fd = open(reco_file, O_RDWR, 0600);
512 if (fd < 0) {
523 MAP_SHARED, fd, 0);
533 close(fd);
566 vduse_reconnect_handler(int fd, void *arg, int *remove)
572 close(fd);
579 int fd, ret;
585 fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC);
586 if (fd < 0) {
593 ret = fdset_add(vduse.fdset, fd, vduse_reconnect_handler, NULL, dev);
596 fd);
600 ret = eventfd_write(fd, (eventfd_t)1);
609 fdset_del(vduse.fdset, fd);
611 close(fd);
792 VHOST_CONFIG_LOG(name, ERR, "Failed to add fd %d to vduse fdset",