Lines Matching refs:ret

85 	int ret;
88 ret = snprintf(g_endpoint_path_dirname, sizeof(g_endpoint_path_dirname) - 2, "%s", basename);
89 if (ret <= 0) {
92 if ((size_t)ret >= sizeof(g_endpoint_path_dirname) - 2) {
93 SPDK_ERRLOG("Char dev dir path length %d is too long\n", ret);
97 if (g_endpoint_path_dirname[ret - 1] != '/') {
98 g_endpoint_path_dirname[ret] = '/';
99 g_endpoint_path_dirname[ret + 1] = '\0';
132 int ret;
134 ret = vfu_run_ctx(vfu_ctx);
135 if (spdk_unlikely(ret == -1)) {
150 return ret != 0 ? SPDK_POLLER_BUSY : SPDK_POLLER_IDLE;
157 int ret;
163 ret = vfu_attach_ctx(endpoint->vfu_ctx);
164 if (ret == 0) {
165 ret = endpoint->ops.attach_device(endpoint);
166 if (!ret) {
239 int ret;
256 ret = spdk_mem_register(info->mapping.iov_base, info->mapping.iov_len);
257 if (ret) {
258 SPDK_ERRLOG("Memory region register %p-%p failed, ret=%d\n",
259 map_start, map_end, ret);
273 int ret = 0;
294 ret = spdk_mem_unregister(info->mapping.iov_base, info->mapping.iov_len);
295 if (ret) {
296 SPDK_ERRLOG("Memory region unregister %p-%p failed, ret=%d\n",
297 map_start, map_end, ret);
306 int ret;
309 ret = endpoint->ops.quiesce_device(endpoint);
310 if (ret) {
312 ret = -1;
315 return ret;
332 int ret;
341 ret = endpoint->ops.get_device_info(endpoint, &pci_dev);
342 if (ret) {
344 return ret;
355 ret = vfu_pci_init(endpoint->vfu_ctx, VFU_PCI_TYPE_EXPRESS, PCI_HEADER_TYPE_NORMAL, 0);
356 if (ret < 0) {
377 ret = -EFAULT;
387 ret = -EFAULT;
395 ret = -EFAULT;
403 ret = -EFAULT;
424 ret = vfu_setup_region(endpoint->vfu_ctx, region_idx, region->len, region->access_cb, region->flags,
427 if (ret) {
436 ret = vfu_setup_device_dma(endpoint->vfu_ctx, tgt_memory_region_add_cb,
438 if (ret < 0) {
444 ret = vfu_setup_device_reset_cb(endpoint->vfu_ctx, tgt_device_reset_cb);
445 if (ret < 0) {
455 ret = vfu_setup_device_nr_irqs(endpoint->vfu_ctx, VFU_DEV_INTX_IRQ, pci_dev.nr_int_irqs);
456 if (ret < 0) {
461 ret = vfu_setup_device_nr_irqs(endpoint->vfu_ctx, VFU_DEV_MSIX_IRQ, pci_dev.nr_msix_irqs);
462 if (ret < 0) {
467 ret = vfu_realize_ctx(endpoint->vfu_ctx);
468 if (ret < 0) {
486 return ret;
606 int ret = 0;
608 ret = vfu_parse_core_mask(cpumask_str, &cpumask);
609 if (ret) {
610 return ret;
652 ret = tgt_endpoint_realize(endpoint);
653 if (ret) {
656 return ret;
667 ret = 0;
672 ret = -EPERM;
676 if (ret) {
785 int ret;
792 ret = vfu_addr_to_sgl(endpoint->vfu_ctx, (void *)(uintptr_t)addr, len, sg, 1, prot);
793 if (ret < 0) {
797 ret = vfu_sgl_get(endpoint->vfu_ctx, sg, iov, 1, 0);
798 if (ret != 0) {