/spdk/test/unit/lib/util/base64.c/ |
H A D | base64_ut.c | 79 int ret; in test_base64_encode() local 81 ret = spdk_base64_encode(text, raw_A, sizeof(raw_A)); in test_base64_encode() 82 CU_ASSERT_EQUAL(ret, 0); in test_base64_encode() 86 ret = spdk_base64_encode(text, raw_B, sizeof(raw_B)); in test_base64_encode() 87 CU_ASSERT_EQUAL(ret, 0); in test_base64_encode() 91 ret = spdk_base64_encode(text, raw_C, sizeof(raw_C)); in test_base64_encode() 92 CU_ASSERT_EQUAL(ret, 0); in test_base64_encode() 95 ret = spdk_base64_encode(text, raw_D, sizeof(raw_D)); in test_base64_encode() 96 CU_ASSERT_EQUAL(ret, 0); in test_base64_encode() 99 ret = spdk_base64_encode(text, raw_I, sizeof(raw_I)); in test_base64_encode() [all …]
|
/spdk/lib/nvme/ |
H A D | nvme_opal.c | 19 int ret; in opal_nvme_security_recv_done() local 32 ret = spdk_nvme_ctrlr_cmd_security_receive(dev->ctrlr, SPDK_SCSI_SECP_TCG, in opal_nvme_security_recv_done() 35 if (ret) { in opal_nvme_security_recv_done() 36 sess->sess_cb(sess, ret, sess->cb_arg); in opal_nvme_security_recv_done() 45 int ret; in opal_nvme_security_send_done() local 52 ret = spdk_nvme_ctrlr_cmd_security_receive(dev->ctrlr, SPDK_SCSI_SECP_TCG, in opal_nvme_security_send_done() 55 if (ret) { in opal_nvme_security_send_done() 56 sess->sess_cb(sess, ret, sess->cb_arg); in opal_nvme_security_send_done() 82 int ret; in opal_send_recv() local 85 ret = opal_nvme_security_send(dev, sess, opal_send_recv_done, NULL); in opal_send_recv() [all …]
|
H A D | nvme_vfio_user.c | 72 int ret; in nvme_vfio_ctrlr_get_reg_4() local 76 ret = spdk_vfio_user_pci_bar_access(vctrlr->dev, VFIO_PCI_BAR0_REGION_INDEX, in nvme_vfio_ctrlr_get_reg_4() 78 if (ret != 0) { in nvme_vfio_ctrlr_get_reg_4() 80 return ret; in nvme_vfio_ctrlr_get_reg_4() 92 int ret; in nvme_vfio_ctrlr_get_reg_8() local 96 ret = spdk_vfio_user_pci_bar_access(vctrlr->dev, VFIO_PCI_BAR0_REGION_INDEX, in nvme_vfio_ctrlr_get_reg_8() 98 if (ret != 0) { in nvme_vfio_ctrlr_get_reg_8() 100 return ret; in nvme_vfio_ctrlr_get_reg_8() 153 int ret; in nvme_vfio_ctrlr_construct() local 157 ret = access(ctrlr_path, F_OK); in nvme_vfio_ctrlr_construct() [all …]
|
/spdk/test/unit/lib/util/xor.c/ |
H A D | xor_ut.c | 23 int ret; in test_xor_gen() local 29 ret = posix_memalign(&bufs[i], spdk_xor_get_optimal_alignment(), BUF_SIZE); in test_xor_gen() 30 SPDK_CU_ASSERT_FATAL(ret == 0); in test_xor_gen() 51 ret = spdk_xor_gen(dest, bufs, SRC_BUF_COUNT, BUF_SIZE); in test_xor_gen() 52 CU_ASSERT(ret == 0); in test_xor_gen() 53 ret = memcmp(ref, dest, BUF_SIZE); in test_xor_gen() 54 CU_ASSERT(ret == 0); in test_xor_gen() 58 ret = spdk_xor_gen(dest, bufs, SRC_BUF_COUNT, BUF_SIZE - 1); in test_xor_gen() 59 CU_ASSERT(ret == 0); in test_xor_gen() 60 ret = memcmp(ref, dest, BUF_SIZE - 1); in test_xor_gen() [all …]
|
/spdk/test/nvme/reserve/ |
H A D | reserve.c | 52 int ret; in get_host_identifier() local 68 ret = spdk_nvme_ctrlr_cmd_get_feature(ctrlr, SPDK_NVME_FEAT_HOST_IDENTIFIER, cdw11, host_id, in get_host_identifier() 71 if (ret) { in get_host_identifier() 94 int ret; in set_host_identifier() local 112 ret = spdk_nvme_ctrlr_cmd_set_feature(ctrlr, SPDK_NVME_FEAT_HOST_IDENTIFIER, cdw11, 0, host_id, in set_host_identifier() 114 if (ret) { in set_host_identifier() 151 int ret; in reservation_ns_register() local 171 ret = spdk_nvme_ns_cmd_reservation_register(ns, qpair, &rr_data, true, in reservation_ns_register() 175 if (ret) { in reservation_ns_register() 196 int ret, in reservation_ns_report() local 254 int ret; reservation_ns_acquire() local 291 int ret; reservation_ns_release() local 329 int ret; reserve_controller() local 397 int ret = 0; main() local [all...] |
/spdk/lib/vfu_tgt/ |
H A D | tgt_endpoint.c | 85 int ret; in spdk_vfu_set_socket_path() 88 ret = snprintf(g_endpoint_path_dirname, sizeof(g_endpoint_path_dirname) - 2, "%s", basename); in spdk_vfu_set_socket_path() 89 if (ret <= 0) { in spdk_vfu_set_socket_path() 92 if ((size_t)ret >= sizeof(g_endpoint_path_dirname) - 2) { in spdk_vfu_set_socket_path() 93 SPDK_ERRLOG("Char dev dir path length %d is too long\n", ret); in spdk_vfu_set_socket_path() 97 if (g_endpoint_path_dirname[ret - 1] != '/') { in spdk_vfu_set_socket_path() 98 g_endpoint_path_dirname[ret] = '/'; in spdk_vfu_set_socket_path() 99 g_endpoint_path_dirname[ret + 1] = '\0'; in spdk_vfu_set_socket_path() 132 int ret; in tgt_vfu_ctx_poller() 134 ret in tgt_vfu_ctx_poller() 83 int ret; spdk_vfu_set_socket_path() local 130 int ret; tgt_vfu_ctx_poller() local 155 int ret; tgt_accept_poller() local 237 int ret; tgt_memory_region_add_cb() local 271 int ret = 0; tgt_memory_region_remove_cb() local 304 int ret; tgt_device_quiesce_cb() local 330 int ret; tgt_endpoint_realize() local 570 int ret = 0; spdk_vfu_create_endpoint() local 735 int ret; spdk_vfu_map_one() local [all...] |
/spdk/lib/vfio_user/host/ |
H A D | vfio_user.c | 97 int ret; in read_fd_message() local 108 ret = recvmsg(sockfd, &msgh, 0); in read_fd_message() 109 if (ret <= 0) { in read_fd_message() 110 return ret; in read_fd_message() 129 return ret; in read_fd_message() 135 int ret; in vfio_user_read() local 138 ret = read_fd_message(fd, (char *)req, sizeof(struct vfio_user_header), req->fds, &req->fd_num); in vfio_user_read() 139 if (ret <= 0) { in vfio_user_read() 140 return ret; in vfio_user_read() 151 ret = read(fd, req->payload, sz_payload); in vfio_user_read() [all …]
|
H A D | vfio_user_pci.c | 112 int ret; in vfio_mr_map_notify() local 124 ret = vfio_user_dev_dma_map_unmap(dev, mr, false); in vfio_mr_map_notify() 127 return ret; in vfio_mr_map_notify() 151 ret = vfio_add_mr(dev, mr); in vfio_mr_map_notify() 152 if (ret) { in vfio_mr_map_notify() 154 return ret; in vfio_mr_map_notify() 276 int ret; in vfio_device_map_bars_and_config_region() local 293 ret = vfio_user_get_dev_region_info(device, info, len, fds, VFIO_MAXIMUM_SPARSE_MMAP_REGIONS); in vfio_device_map_bars_and_config_region() 294 if (ret) { in vfio_device_map_bars_and_config_region() 295 SPDK_ERRLOG("Device setup bar %d failed\n", ret); in vfio_device_map_bars_and_config_region() [all …]
|
/spdk/module/bdev/raid/ |
H A D | raid1.c | 106 int ret; in raid1_correct_read_error() local 114 ret = raid_bdev_writev_blocks_ext(base_info, base_ch, raid_io->iovs, raid_io->iovcnt, in raid1_correct_read_error() 117 if (spdk_unlikely(ret != 0)) { in raid1_correct_read_error() 118 if (ret == -ENOMEM) { in raid1_correct_read_error() 157 int ret; in raid1_read_other_base_bdev() local 170 ret = raid_bdev_readv_blocks_ext(base_info, base_ch, raid_io->iovs, raid_io->iovcnt, in raid1_read_other_base_bdev() 173 if (spdk_unlikely(ret != 0)) { in raid1_read_other_base_bdev() 174 if (ret == -ENOMEM) { in raid1_read_other_base_bdev() 247 int ret; in raid1_submit_read_request() local 259 ret in raid1_submit_read_request() 284 int ret = 0; raid1_submit_write_request() local 333 int ret; raid1_submit_rw_request() local 450 int ret; raid1_process_submit_write() local 486 int ret; raid1_submit_process_request() local [all...] |
H A D | raid5f.c | 259 int ret; in raid5f_xor_stripe_continue() local 267 ret = spdk_accel_submit_xor(r5ch->accel_ch, r5ch->chunk_xor_buffers[n_src], in raid5f_xor_stripe_continue() 270 if (spdk_unlikely(ret)) { in raid5f_xor_stripe_continue() 271 if (ret == -ENOMEM) { in raid5f_xor_stripe_continue() 274 stripe_req->xor.status = ret; in raid5f_xor_stripe_continue() 327 int ret; in raid5f_xor_stripe() local 339 ret = spdk_accel_submit_xor(stripe_req->r5ch->accel_ch, dest_chunk->md_buf, in raid5f_xor_stripe() 342 if (spdk_unlikely(ret)) { in raid5f_xor_stripe() 343 if (ret == -ENOMEM) { in raid5f_xor_stripe() 346 stripe_req->xor.status = ret; in raid5f_xor_stripe() [all …]
|
H A D | concat.c | 74 int ret = 0; in concat_submit_rw_request() local 111 ret = raid_bdev_readv_blocks_ext(base_info, base_ch, in concat_submit_rw_request() 116 ret = raid_bdev_writev_blocks_ext(base_info, base_ch, in concat_submit_rw_request() 125 if (ret == -ENOMEM) { in concat_submit_rw_request() 128 } else if (ret != 0) { in concat_submit_rw_request() 172 int ret; in concat_submit_null_payload_request() local 241 ret = raid_bdev_unmap_blocks(base_info, base_ch, in concat_submit_null_payload_request() 246 ret = raid_bdev_flush_blocks(base_info, base_ch, in concat_submit_null_payload_request() 253 ret = -EIO; in concat_submit_null_payload_request() 255 if (ret == 0) { in concat_submit_null_payload_request() [all …]
|
H A D | raid0.c | 86 int ret = 0; in raid0_submit_rw_request() local 127 ret = raid_bdev_readv_blocks_ext(base_info, base_ch, in raid0_submit_rw_request() 136 ret = raid_bdev_verify_dix_reftag(raid_io->iovs, raid_io->iovcnt, io_opts.metadata, in raid0_submit_rw_request() 138 if (ret != 0) { in raid0_submit_rw_request() 145 ret = raid_bdev_writev_blocks_ext(base_info, base_ch, in raid0_submit_rw_request() 154 if (ret == -ENOMEM) { in raid0_submit_rw_request() 157 } else if (ret != 0) { in raid0_submit_rw_request() 300 int ret; in raid0_submit_null_payload_request() local 330 ret = raid_bdev_unmap_blocks(base_info, base_ch, in raid0_submit_null_payload_request() 336 ret = raid_bdev_flush_blocks(base_info, base_ch, in raid0_submit_null_payload_request() [all …]
|
/spdk/test/unit/lib/vhost/vhost.c/ |
H A D | vhost_ut.c | 366 int ret; in create_controller_test() local 372 ret = alloc_vdev(&vdev, "vdev_name_0", NULL); in create_controller_test() 373 SPDK_CU_ASSERT_FATAL(ret == 0 && vdev); in create_controller_test() 378 ret = alloc_vdev(&vdev, "vdev_name_0", "0xf"); in create_controller_test() 379 SPDK_CU_ASSERT_FATAL(ret == 0 && vdev); in create_controller_test() 384 ret = alloc_vdev(&vdev, "vdev_name_0", "0x2"); in create_controller_test() 385 SPDK_CU_ASSERT_FATAL(ret == 0 && vdev); in create_controller_test() 390 ret = alloc_vdev(&vdev, "vdev_name_0", "0x3"); in create_controller_test() 391 SPDK_CU_ASSERT_FATAL(ret == 0 && vdev); in create_controller_test() 396 ret in create_controller_test() 451 int ret; remove_controller_test() local 471 uint16_t reqs_len, ret, i; vq_avail_ring_get_test() local 682 int ret; vhost_blk_construct_test() local [all...] |
/spdk/module/bdev/nvme/ |
H A D | nvme_rpc.c | 100 int ret; in rpc_bdev_nvme_send_cmd_complete() local 102 ret = rpc_bdev_nvme_send_cmd_resp_construct(&ctx->resp, &ctx->req, cpl); in rpc_bdev_nvme_send_cmd_complete() 103 if (ret) { in rpc_bdev_nvme_send_cmd_complete() 105 spdk_strerror(-ret)); in rpc_bdev_nvme_send_cmd_complete() 147 int ret; in nvme_rpc_admin_cmd_bdev_nvme() local 149 ret = spdk_nvme_ctrlr_cmd_admin_raw(_nvme_ctrlr->ctrlr, cmd, buf, in nvme_rpc_admin_cmd_bdev_nvme() 152 return ret; in nvme_rpc_admin_cmd_bdev_nvme() 162 int ret; in nvme_rpc_io_cmd_bdev_nvme() local 167 ret = spdk_nvme_ctrlr_cmd_io_raw_with_md(_nvme_ctrlr->ctrlr, io_qpair, in nvme_rpc_io_cmd_bdev_nvme() 169 if (ret) { in nvme_rpc_io_cmd_bdev_nvme() [all …]
|
/spdk/test/unit/lib/nvmf/vfio_user.c/ |
H A D | vfio_user_ut.c | 59 int i, ret; in test_nvme_cmd_map_prps() 70 ret = nvme_cmd_map_prps(NULL, &cmd, iovs, 33, len, mps, gpa_to_vva); in test_nvme_cmd_map_prps() 71 CU_ASSERT(ret == 1); in test_nvme_cmd_map_prps() 79 ret = nvme_cmd_map_prps(NULL, &cmd, iovs, 1, len, mps, gpa_to_vva); in test_nvme_cmd_map_prps() 80 CU_ASSERT(ret == -ERANGE); in test_nvme_cmd_map_prps() 81 ret = nvme_cmd_map_prps(NULL, &cmd, iovs, 33, len, mps, gpa_to_vva); in test_nvme_cmd_map_prps() 82 CU_ASSERT(ret == 2); in test_nvme_cmd_map_prps() 97 ret = nvme_cmd_map_prps(NULL, &cmd, iovs, 33, len, mps, gpa_to_vva); in test_nvme_cmd_map_prps() 98 CU_ASSERT(ret == 33); in test_nvme_cmd_map_prps() 112 ret in test_nvme_cmd_map_prps() 58 int i, ret; test_nvme_cmd_map_prps() local 127 int i, ret; test_nvme_cmd_map_sgls() local [all...] |
/spdk/module/vfu_device/ |
H A D | vfu_virtio.c | 64 int ret; in virtio_dev_map_vq() local 75 ret = vfu_virtio_map_q(dev, &vq->desc, phys_addr, len); in virtio_dev_map_vq() 76 if (ret) { in virtio_dev_map_vq() 78 return ret; in virtio_dev_map_vq() 83 ret = vfu_virtio_map_q(dev, &vq->avail, phys_addr, len); in virtio_dev_map_vq() 84 if (ret) { in virtio_dev_map_vq() 87 return ret; in virtio_dev_map_vq() 92 ret = vfu_virtio_map_q(dev, &vq->used, phys_addr, len); in virtio_dev_map_vq() 93 if (ret) { in virtio_dev_map_vq() 97 return ret; in virtio_dev_map_vq() [all …]
|
H A D | vfu_virtio_blk.c | 182 int ret; in virtio_blk_process_req() local 230 ret = spdk_bdev_readv(blk_endpoint->bdev_desc, blk_endpoint->io_channel, in virtio_blk_process_req() 235 ret = spdk_bdev_writev(blk_endpoint->bdev_desc, blk_endpoint->io_channel, in virtio_blk_process_req() 239 if (ret) { in virtio_blk_process_req() 242 return ret; in virtio_blk_process_req() 259 ret = spdk_bdev_unmap(blk_endpoint->bdev_desc, blk_endpoint->io_channel, in virtio_blk_process_req() 262 if (ret) { in virtio_blk_process_req() 265 return ret; in virtio_blk_process_req() 285 ret = spdk_bdev_write_zeroes(blk_endpoint->bdev_desc, blk_endpoint->io_channel, in virtio_blk_process_req() 288 if (ret) { in virtio_blk_process_req() [all …]
|
/spdk/go/rpc/mocks/ |
H A D | IClient.go | 28 ret := _m.Called(method, params) 32 if rf, ok := ret.Get(0).(func(string, interface{}) (*client.Response, error)); ok { 35 if rf, ok := ret.Get(0).(func(string, interface{}) *client.Response); ok { 38 if ret.Get(0) != nil { 39 r0 = ret.Get(0).(*client.Response) 43 if rf, ok := ret.Get(1).(func(string, interface{}) error); ok { 46 r1 = ret.Error(1)
|
/spdk/module/bdev/rbd/ |
H A D | bdev_rbd.c | 259 int ret; in bdev_rados_cluster_init() local 261 ret = rados_create(cluster, user_id); in bdev_rados_cluster_init() 262 if (ret < 0) { in bdev_rados_cluster_init() 270 ret = rados_conf_set(*cluster, entry[0], entry[1]); in bdev_rados_cluster_init() 271 if (ret < 0) { in bdev_rados_cluster_init() 280 ret = rados_conf_read_file(*cluster, NULL); in bdev_rados_cluster_init() 281 if (ret < 0) { in bdev_rados_cluster_init() 289 ret = rados_connect(*cluster); in bdev_rados_cluster_init() 290 if (ret < 0) { in bdev_rados_cluster_init() 327 int ret; in bdev_rbd_shared_cluster_init() local [all …]
|
/spdk/lib/virtio/ |
H A D | virtio_vhost_user.c | 90 ssize_t ret; in vhost_user_read() local 93 ret = recv(fd, (void *)msg, sz_hdr, 0); in vhost_user_read() 94 if ((size_t)ret != sz_hdr) { in vhost_user_read() 96 ret, sz_hdr); in vhost_user_read() 97 if (ret == -1) { in vhost_user_read() 120 ret = recv(fd, (void *)((char *)msg + sz_hdr), sz_payload, 0); in vhost_user_read() 121 if ((size_t)ret != sz_payload) { in vhost_user_read() 123 ret, msg->size); in vhost_user_read() 124 if (ret == -1) { in vhost_user_read() 588 int ret; in virtio_user_map_notify() local 651 int ret; virtio_user_start_device() local 693 int ret; virtio_user_stop_device() local 822 int ret; virtio_user_set_features() local [all...] |
/spdk/lib/nvmf/ |
H A D | vfio_user.c | 761 int ret; in map_one() 771 ret = vfu_addr_to_sgl(ctx, (void *)(uintptr_t)addr, len, sg, 1, prot); in nvme_cmd_map_prps() 772 if (ret < 0) { in nvme_cmd_map_prps() 773 if (ret == -1) { in nvme_cmd_map_prps() 780 addr, addr + len, prot, -(ret + 1)); in nvme_cmd_map_prps() 785 ret = vfu_sgl_get(ctx, sg, iov, 1, 0); in nvme_cmd_map_prps() 786 if (ret != 0) { in nvme_cmd_map_prps() 924 int ret; in nvme_cmd_map_sgls() 972 ret = nvme_cmd_map_sgls_data(prv, sgl, num_sgls, &iovs[total_iovcnt], in nvme_map_cmd() 974 if (spdk_unlikely(ret < in nvme_map_cmd() 733 int ret; map_one() local 896 int ret; nvme_cmd_map_sgls() local 1379 void *ret; map_q() local 1412 int ret; asq_setup() local 1548 int ret; vfio_user_sq_rearm() local 1627 int ret; acq_setup() local 1667 void *ret; _map_one() local 2645 int ret; memory_region_add_cb() local 2727 int ret = 0; memory_region_remove_cb() local 2873 int ret = enable_ctrlr(vu_ctrlr); nvmf_vfio_user_prop_req_rsp_set() local 3040 int ret; access_bar0_fn() local 3215 int ret; vfio_user_quiesce_done() local 3287 int ret; vfio_user_quiesce_pg() local 3641 int ret; vfio_user_migr_ctrlr_construct_qps() local 3908 int ret = 0; vfio_user_migration_device_state_transition() local 4095 int ret; vfio_user_dev_info_fill() local 4425 int ret; nvmf_vfio_user_listen() local 4916 int ret; vfio_user_poll_vfu_ctx() local 4973 int ret = 0; vfio_user_poll_group_process() local 5013 int ret = SPDK_POLLER_IDLE; vfio_user_ctrlr_intr() local 5763 int ret; nvmf_vfio_user_poll_group_poll() local [all...] |
/spdk/lib/nbd/ |
H A D | nbd.c | 541 int ret = 0; in nbd_io_exec() local 546 ret = nbd_submit_bdev_io(nbd, io); in nbd_io_exec() 547 if (ret < 0) { in nbd_io_exec() 548 return ret; in nbd_io_exec() 561 int ret = 0; in nbd_io_recv_internal() local 574 ret = nbd_socket_rw(nbd->spdk_sp_fd, (char *)&io->req + io->offset, in nbd_io_recv_internal() 576 if (ret < 0) { in nbd_io_recv_internal() 579 return ret; in nbd_io_recv_internal() 582 io->offset += ret; in nbd_io_recv_internal() 583 received = ret; in nbd_io_recv_internal() 678 int i, rc, ret = 0; nbd_io_recv() local 705 int ret = 0; nbd_io_xmit_internal() local 770 int ret = 0; nbd_io_xmit() local [all...] |
/spdk/test/nvme/fdp/ |
H A D | fdp.c | 124 int ret; in set_fdp_events() local 139 ret = spdk_nvme_ctrlr_cmd_set_feature_ns(ctrlr, SPDK_NVME_FEAT_FDP_EVENTS, cdw11, cdw12, in set_fdp_events() 142 if (ret) { in set_fdp_events() 165 int ret; in get_fdp_events() local 178 ret = spdk_nvme_ctrlr_cmd_get_feature_ns(ctrlr, SPDK_NVME_FEAT_FDP_EVENTS, cdw11, in get_fdp_events() 181 if (ret) { in get_fdp_events() 227 int ret; in get_fdp() local 238 ret = spdk_nvme_ctrlr_cmd_get_feature(ctrlr, SPDK_NVME_FEAT_FDP, cdw11, NULL, 0, in get_fdp() 240 if (ret) { in get_fdp() 269 int ret; in check_fdp_write() local 324 int ret; reclaim_unit_handle_update() local 357 int ret; reclaim_unit_handle_status() local 834 int ret, err; fdp_tests() local [all...] |
/spdk/test/env/env_dpdk_post_init/ |
H A D | env_dpdk_post_init.c | 68 int ret; in main() local 73 ret = rte_eal_init(argc, argv); in main() 74 if (ret < 0) { in main() 80 ret = spdk_env_dpdk_post_init(false); in main() 81 if (ret < 0) { in main()
|
/spdk/lib/env_dpdk/ |
H A D | pci_event.c | 198 int ret; in spdk_pci_get_event() local 204 ret = recv(fd, buf, SPDK_UEVENT_MSG_LEN - 1, MSG_DONTWAIT); in spdk_pci_get_event() 205 if (ret > 0) { in spdk_pci_get_event() 207 } else if (ret < 0) { in spdk_pci_get_event() 211 ret = errno; in spdk_pci_get_event() 213 return -ret; in spdk_pci_get_event()
|