Lines Matching defs:path
35 char *path;
228 size = strnlen(vsocket->path, PATH_MAX);
229 vhost_set_ifname(vid, vsocket->path, size);
250 VHOST_CONFIG_LOG(vsocket->path, INFO, "new device, handle is %d", vid);
255 VHOST_CONFIG_LOG(vsocket->path, ERR,
268 VHOST_CONFIG_LOG(vsocket->path, ERR,
301 VHOST_CONFIG_LOG(vsocket->path, INFO, "new vhost user connection is %d", fd);
349 VHOST_CONFIG_LOG(vsocket->path, INFO, "vhost-user %s: socket created, fd: %d",
353 VHOST_CONFIG_LOG(vsocket->path, ERR,
362 strlcpy(un->sun_path, vsocket->path, sizeof(un->sun_path));
373 const char *path = vsocket->path;
387 VHOST_CONFIG_LOG(path, ERR, "failed to bind: %s; remove it and try again",
391 VHOST_CONFIG_LOG(path, INFO, "binding succeeded");
400 VHOST_CONFIG_LOG(path, ERR, "failed to add listen fd %d to vhost server fdset",
430 vhost_user_connect_nonblock(char *path, int fd, struct sockaddr *un, size_t sz)
440 VHOST_CONFIG_LOG(path, ERR, "can't get flags for connfd %d (%s)",
445 VHOST_CONFIG_LOG(path, ERR, "can't disable nonblocking on fd %d", fd);
468 ret = vhost_user_connect_nonblock(reconn->vsocket->path, reconn->fd,
473 VHOST_CONFIG_LOG(reconn->vsocket->path, ERR,
481 VHOST_CONFIG_LOG(reconn->vsocket->path, INFO, "connected");
521 const char *path = vsocket->path;
525 ret = vhost_user_connect_nonblock(vsocket->path, fd,
532 VHOST_CONFIG_LOG(path, WARNING, "failed to connect: %s", strerror(errno));
539 VHOST_CONFIG_LOG(path, INFO, "reconnecting...");
543 VHOST_CONFIG_LOG(path, ERR, "failed to allocate memory for reconnect");
558 find_vhost_user_socket(const char *path)
562 if (path == NULL)
568 if (!strcmp(vsocket->path, path))
576 rte_vhost_driver_attach_vdpa_device(const char *path,
581 if (dev == NULL || path == NULL)
585 vsocket = find_vhost_user_socket(path);
594 rte_vhost_driver_detach_vdpa_device(const char *path)
599 vsocket = find_vhost_user_socket(path);
608 rte_vhost_driver_get_vdpa_device(const char *path)
614 vsocket = find_vhost_user_socket(path);
623 rte_vhost_driver_get_vdpa_dev_type(const char *path, uint32_t *type)
630 vsocket = find_vhost_user_socket(path);
632 VHOST_CONFIG_LOG(path, ERR, "socket file is not registered yet.");
651 rte_vhost_driver_disable_features(const char *path, uint64_t features)
656 vsocket = find_vhost_user_socket(path);
671 rte_vhost_driver_enable_features(const char *path, uint64_t features)
676 vsocket = find_vhost_user_socket(path);
694 rte_vhost_driver_set_features(const char *path, uint64_t features)
699 vsocket = find_vhost_user_socket(path);
715 rte_vhost_driver_get_features(const char *path, uint64_t *features)
723 vsocket = find_vhost_user_socket(path);
725 VHOST_CONFIG_LOG(path, ERR, "socket file is not registered yet.");
737 VHOST_CONFIG_LOG(path, ERR, "failed to get vdpa features for socket file.");
750 rte_vhost_driver_set_protocol_features(const char *path,
756 vsocket = find_vhost_user_socket(path);
764 rte_vhost_driver_get_protocol_features(const char *path,
773 vsocket = find_vhost_user_socket(path);
775 VHOST_CONFIG_LOG(path, ERR, "socket file is not registered yet.");
788 VHOST_CONFIG_LOG(path, ERR, "failed to get vdpa protocol features.");
802 rte_vhost_driver_get_queue_num(const char *path, uint32_t *queue_num)
810 vsocket = find_vhost_user_socket(path);
812 VHOST_CONFIG_LOG(path, ERR, "socket file is not registered yet.");
824 VHOST_CONFIG_LOG(path, ERR, "failed to get vdpa queue number.");
837 rte_vhost_driver_set_max_queue_num(const char *path, uint32_t max_queue_pairs)
843 vsocket = find_vhost_user_socket(path);
845 VHOST_CONFIG_LOG(path, ERR, "socket file is not registered yet.");
856 VHOST_CONFIG_LOG(path, DEBUG,
862 VHOST_CONFIG_LOG(path, INFO, "Setting max queue pairs to %u", max_queue_pairs);
865 VHOST_CONFIG_LOG(path, ERR, "Library only supports up to %u queue pairs",
884 free(vsocket->path);
894 rte_vhost_driver_register(const char *path, uint64_t flags)
899 if (!path)
905 VHOST_CONFIG_LOG(path, ERR, "the number of vhost sockets reaches maximum");
913 vsocket->path = strdup(path);
914 if (vsocket->path == NULL) {
915 VHOST_CONFIG_LOG(path, ERR, "failed to copy socket path string");
922 if (!strncmp("/dev/vduse/", path, strlen("/dev/vduse/")))
940 VHOST_CONFIG_LOG(path, ERR, "async copy with IOMMU or post-copy not supported");
969 VHOST_CONFIG_LOG(path, INFO, "logging feature is disabled in async copy mode");
983 VHOST_CONFIG_LOG(path, INFO, "Linear buffers requested without external buffers,");
984 VHOST_CONFIG_LOG(path, INFO, "disabling host segmentation offloading support");
999 VHOST_CONFIG_LOG(path, ERR, "Postcopy requested but not compiled");
1027 VHOST_CONFIG_LOG(path, ERR, "failed to destroy connection mutex");
1063 rte_vhost_driver_unregister(const char *path)
1069 if (path == NULL)
1077 if (strcmp(vsocket->path, path))
1081 vduse_device_destroy(path);
1115 VHOST_CONFIG_LOG(path, INFO, "free connfd %d", conn->connfd);
1125 unlink(path);
1146 rte_vhost_driver_callback_register(const char *path,
1152 vsocket = find_vhost_user_socket(path);
1161 vhost_driver_callback_get(const char *path)
1166 vsocket = find_vhost_user_socket(path);
1173 rte_vhost_driver_start(const char *path)
1178 vsocket = find_vhost_user_socket(path);
1185 return vduse_device_create(path, vsocket->net_compliant_ol_flags);
1190 VHOST_CONFIG_LOG(path, ERR, "failed to init Vhost-user fdset");