Lines Matching defs:vdev

28 	struct spdk_vhost_dev *vdev;
884 struct spdk_vhost_dev *vdev;
903 vdev = spdk_vhost_dev_find(ctrlr_name);
904 if (vdev == NULL) {
911 user_dev = to_user_dev(vdev);
938 vsession->vdev = vdev;
941 vsession->name = spdk_sprintf_alloc("%ss%u", vdev->name, vsession->vid);
973 struct spdk_vhost_dev *vdev = vsession->vdev;
974 struct spdk_vhost_user_dev *user_dev = to_user_dev(vsession->vdev);
978 SPDK_INFOLOG(vhost, "Starting new session for device %s with vid %d\n", vdev->name, vsession->vid);
982 rc = backend->start_session(vdev, vsession, NULL);
1065 backend = to_user_dev(vsession->vdev)->user_backend;
1131 struct spdk_vhost_dev *vdev;
1141 vdev = vsession->vdev;
1142 user_dev = to_user_dev(vdev);
1158 vhost_user_session_set_coalescing(vdev, vsession, NULL);
1159 spdk_thread_send_msg(vdev->thread, vhost_user_session_start, vsession);
1177 user_dev = to_user_dev(vsession->vdev);
1201 user_dev = to_user_dev(vsession->vdev);
1216 TAILQ_REMOVE(&to_user_dev(vsession->vdev)->vsessions, vsession, tailq);
1231 vhost_session_find_by_id(struct spdk_vhost_dev *vdev, unsigned id)
1235 TAILQ_FOREACH(vsession, &to_user_dev(vdev)->vsessions, tailq) {
1247 struct spdk_vhost_dev *vdev;
1252 for (vdev = spdk_vhost_dev_next(NULL); vdev != NULL;
1253 vdev = spdk_vhost_dev_next(vdev)) {
1254 user_dev = to_user_dev(vdev);
1302 struct spdk_vhost_dev *vdev = ctx->vdev;
1303 struct spdk_vhost_user_dev *user_dev = to_user_dev(vdev);
1311 vsession = vhost_session_find_by_id(vdev, ctx->vsession_id);
1312 user_dev->user_backend->stop_session(vdev, vsession, NULL);
1321 struct spdk_vhost_dev *vdev = vsession->vdev;
1322 struct spdk_vhost_user_dev *user_dev = to_user_dev(vdev);
1324 ev_ctx.vdev = vdev;
1327 spdk_thread_send_msg(vdev->thread, vhost_user_session_stop_event, &ev_ctx);
1340 struct spdk_vhost_dev *vdev = ev_ctx->vdev;
1341 struct spdk_vhost_user_dev *user_dev = to_user_dev(vdev);
1352 ev_ctx->cpl_fn(vdev, ev_ctx->user_ctx);
1363 struct spdk_vhost_dev *vdev = ev_ctx->vdev;
1364 struct spdk_vhost_user_dev *user_dev = to_user_dev(vdev);
1374 rc = ev_ctx->cb_fn(vdev, vsession, ev_ctx->user_ctx);
1386 vhost_user_dev_foreach_session(struct spdk_vhost_dev *vdev,
1392 struct spdk_vhost_user_dev *user_dev = to_user_dev(vdev);
1401 ev_ctx->vdev = vdev;
1411 spdk_thread_send_msg(vdev->thread, foreach_session, ev_ctx);
1455 user_dev = to_user_dev(vsession->vdev);
1482 if (vsession->vdev->backend->vhost_get_config) {
1483 rc = vsession->vdev->backend->vhost_get_config(vsession->vdev,
1497 if (vsession->vdev->backend->vhost_set_config) {
1498 rc = vsession->vdev->backend->vhost_set_config(vsession->vdev,
1528 user_dev = to_user_dev(vsession->vdev);
1700 vhost_user_session_set_coalescing(struct spdk_vhost_dev *vdev,
1704 to_user_dev(vdev)->coalescing_delay_us * spdk_get_ticks_hz() / 1000000ULL;
1706 to_user_dev(vdev)->coalescing_iops_threshold * SPDK_VHOST_STATS_CHECK_INTERVAL_MS / 1000U;
1711 vhost_user_set_coalescing(struct spdk_vhost_dev *vdev, uint32_t delay_base_us,
1716 rc = vhost_user_dev_set_coalescing(to_user_dev(vdev), delay_base_us, iops_threshold);
1721 vhost_user_dev_foreach_session(vdev, vhost_user_session_set_coalescing, NULL, NULL);
1727 vhost_user_get_coalescing(struct spdk_vhost_dev *vdev, uint32_t *delay_base_us,
1730 struct spdk_vhost_user_dev *user_dev = to_user_dev(vdev);
1774 vhost_user_dev_init(struct spdk_vhost_dev *vdev, const char *name,
1786 vdev->path = strdup(path);
1787 if (vdev->path == NULL) {
1793 free(vdev->path);
1796 vdev->ctxt = user_dev;
1798 vdev->thread = spdk_thread_create(vdev->name, cpumask);
1799 if (vdev->thread == NULL) {
1801 free(vdev->path);
1807 user_dev->vdev = vdev;
1819 vhost_user_dev_start(struct spdk_vhost_dev *vdev)
1821 return vhost_register_unix_socket(vdev->path, vdev->name, vdev->virtio_features,
1822 vdev->disabled_features,
1823 vdev->protocol_features);
1827 vhost_user_dev_create(struct spdk_vhost_dev *vdev, const char *name, struct spdk_cpuset *cpumask,
1833 rc = vhost_user_dev_init(vdev, name, cpumask, user_backend);
1839 rc = vhost_user_dev_start(vdev);
1841 user_dev = to_user_dev(vdev);
1842 spdk_thread_send_msg(vdev->thread, vhost_dev_thread_exit, NULL);
1845 free(vdev->path);
1854 vhost_user_dev_busy(struct spdk_vhost_dev *vdev)
1856 struct spdk_vhost_user_dev *user_dev = to_user_dev(vdev);
1864 SPDK_ERRLOG("Controller %s has still valid connection.\n", vdev->name);
1873 vhost_user_dev_unregister(struct spdk_vhost_dev *vdev)
1875 struct spdk_vhost_user_dev *user_dev = to_user_dev(vdev);
1889 SPDK_ERRLOG("Controller %s has still valid connection.\n", vdev->name);
1917 vhost_driver_unregister(vdev->path);
1919 spdk_thread_send_msg(vdev->thread, vhost_dev_thread_exit, NULL);
1923 free(vdev->path);
1969 struct spdk_vhost_dev *vdev = NULL;
1974 for (vdev = spdk_vhost_dev_next(NULL); vdev != NULL;
1975 vdev = spdk_vhost_dev_next(vdev)) {
1976 user_dev = to_user_dev(vdev);
1986 vhost_driver_unregister(vdev->path);
2021 vhost_session_info_json(struct spdk_vhost_dev *vdev, struct spdk_json_write_ctx *w)
2026 user_dev = to_user_dev(vdev);