Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 207) sorted by relevance

123456789

/spdk/lib/util/
H A Diov.c31 size_t len; in spdk_ioviter_first() local
39 len = spdk_ioviter_firstv(iter, 2, iovs, iovcnts, out); in spdk_ioviter_first()
41 if (len > 0) { in spdk_ioviter_first()
46 return len; in spdk_ioviter_first()
77 size_t len; in spdk_ioviter_next() local
79 len = spdk_ioviter_nextv(iter, out); in spdk_ioviter_next()
81 if (len > 0) { in spdk_ioviter_next()
86 return len; in spdk_ioviter_next()
93 size_t len; in spdk_ioviter_nextv() local
97 len = UINT32_MAX; in spdk_ioviter_nextv()
[all …]
H A Dxor.c37 xor_gen_unaligned(void *dest, void **sources, uint32_t n, uint32_t len) in xor_gen_unaligned() argument
41 for (i = 0; i < len; i++) { in xor_gen_unaligned()
52 xor_gen_basic(void *dest, void **sources, uint32_t n, uint32_t len) in xor_gen_basic() argument
59 xor_gen_unaligned(dest, sources, n, len); in xor_gen_basic()
64 len_div = len >> shift; in xor_gen_basic()
76 if (len_rem < len) { in xor_gen_basic()
83 xor_gen_unaligned((uint8_t *)dest + len_rem, sources2, n, len - len_rem); in xor_gen_basic()
93 do_xor_gen(void *dest, void **sources, uint32_t n, uint32_t len) in do_xor_gen() argument
105 if (xor_gen(n + 1, len, buffers)) { in do_xor_gen()
109 xor_gen_basic(dest, sources, n, len); in do_xor_gen()
[all …]
H A Dcrc16.c17 spdk_crc16_t10dif(uint16_t init_crc, const void *buf, size_t len) in spdk_crc16_t10dif() argument
19 return (crc16_t10dif(init_crc, buf, len)); in spdk_crc16_t10dif()
24 size_t len) in spdk_crc16_t10dif_copy() argument
26 return (crc16_t10dif_copy(init_crc, dst, src, len)); in spdk_crc16_t10dif_copy()
617 crc16_table_t10dif(uint16_t init_crc, const void *buf, size_t len) in crc16_table_t10dif() argument
623 crc = crc_update_fast(crc, data, len); in crc16_table_t10dif()
628 spdk_crc16_t10dif(uint16_t init_crc, const void *buf, size_t len) in spdk_crc16_t10dif() argument
630 return (crc16_table_t10dif(init_crc, buf, len)); in spdk_crc16_t10dif()
634 spdk_crc16_t10dif_copy(uint16_t init_crc, uint8_t *dst, uint8_t *src, size_t len) in spdk_crc16_t10dif_copy() argument
636 memcpy(dst, src, len); in spdk_crc16_t10dif_copy()
[all …]
H A Dcrc32c.c13 spdk_crc32c_update(const void *buf, size_t len, uint32_t crc) in spdk_crc32c_update() argument
15 return crc32_iscsi((unsigned char *)buf, len, crc); in spdk_crc32c_update()
21 spdk_crc32c_update(const void *buf, size_t len, uint32_t crc) in spdk_crc32c_update() argument
31 count_post = (uint64_t)((uintptr_t)buf + len) & 7; in spdk_crc32c_update()
32 count_mid = (len - count_pre - count_post) / 8; in spdk_crc32c_update()
61 spdk_crc32c_update(const void *buf, size_t len, uint32_t crc) in spdk_crc32c_update() argument
70 count_post = (uint64_t)(buf + len) & 7; in spdk_crc32c_update()
71 count_mid = (len - count_pre - count_post) / 8; in spdk_crc32c_update()
104 spdk_crc32c_update(const void *buf, size_t len, uint32_t crc) in spdk_crc32c_update() argument
106 return crc32_update(&g_crc32c_table, buf, len, cr in spdk_crc32c_update()
130 spdk_crc32c_nvme(const void * buf,size_t len,uint32_t crc) spdk_crc32c_nvme() argument
[all...]
H A Dhexlify.c35 spdk_hexlify(const char *bin, size_t len) in spdk_hexlify() argument
39 hex = malloc((len * 2) + 1); in spdk_hexlify()
44 for (size_t i = 0; i < len; i++) { in spdk_hexlify()
63 size_t len = strlen(hex); in spdk_unhexlify() local
65 if (len % 2 != 0) { in spdk_unhexlify()
66 SPDK_ERRLOG("Invalid hex string len %d. It must be mod of 2.\n", (int)len); in spdk_unhexlify()
69 res = malloc(len / 2); in spdk_unhexlify()
74 for (size_t i = 0; i < len; i += 2) { in spdk_unhexlify()
H A Dcrc64.c13 spdk_crc64_nvme(const void *buf, size_t len, uint64_t crc) in spdk_crc64_nvme() argument
15 return crc64_rocksoft_refl(crc, (const uint8_t *)buf, len); in spdk_crc64_nvme()
152 crc64_rocksoft_refl_base(uint64_t seed, const uint8_t *buf, uint64_t len) in crc64_rocksoft_refl_base() argument
156 for (i = 0; i < len; i++) { in crc64_rocksoft_refl_base()
165 spdk_crc64_nvme(const void *buf, size_t len, uint64_t crc) in spdk_crc64_nvme() argument
167 return crc64_rocksoft_refl_base(crc, (const uint8_t *)buf, len); in spdk_crc64_nvme()
H A Dcrc32.c32 crc32_update(const struct spdk_crc32_table *table, const void *buf, size_t len, uint32_t crc) in crc32_update() argument
41 count_post = (uint64_t)(buf + len) & 7; in crc32_update()
42 count_mid = (len - count_pre - count_post) / 8; in crc32_update()
67 crc32_update(const struct spdk_crc32_table *table, const void *buf, size_t len, uint32_t crc) in crc32_update() argument
72 for (i = 0; i < len; i++) { in crc32_update()
/spdk/test/unit/lib/iscsi/param.c/
H A Dparam_ut.c42 int total, len; in burst_length_param_negotiation() local
85 len = snprintf(data + total, 8192 - total, "%s=%d", in burst_length_param_negotiation()
87 total += len + 1; in burst_length_param_negotiation()
89 len = snprintf(data + total, 8192 - total, "%s=%d", in burst_length_param_negotiation()
91 total += len + 1; in burst_length_param_negotiation()
93 len = snprintf(data + total, 8192 - total, "%s=%d", in burst_length_param_negotiation()
95 total += len + 1; in burst_length_param_negotiation()
163 len = sizeof(strconst) - 1; \
164 rc = iscsi_parse_params(&params, data, len, partial_enabled, partial_text)
184 int len; in parse_valid_test() local
[all …]
/spdk/lib/scsi/
H A Dscsi_bdev.c63 int hlen, len = 0; in bdev_scsi_report_luns() local
90 if (alloc_len - (hlen + len) < 8) { in bdev_scsi_report_luns()
97 to_be64(&data[hlen + len], fmt_lun); in bdev_scsi_report_luns()
98 len += 8; in bdev_scsi_report_luns()
102 to_be32(data, len); in bdev_scsi_report_luns()
104 return hlen + len; in bdev_scsi_report_luns()
110 size_t len; in bdev_scsi_pad_scsi_name() local
112 len = strlen(name); in bdev_scsi_pad_scsi_name()
113 memcpy(dst, name, len); in bdev_scsi_pad_scsi_name()
115 dst[len++] = '\0'; in bdev_scsi_pad_scsi_name()
[all …]
H A Dtask.c92 size_t len = 0; in spdk_scsi_task_scatter_data() local
109 len += iovs[i].iov_len; in spdk_scsi_task_scatter_data()
112 if (len < buf_len) { in spdk_scsi_task_scatter_data()
123 len = spdk_min(iovs[i].iov_len, buf_left); in spdk_scsi_task_scatter_data()
124 buf_left -= len; in spdk_scsi_task_scatter_data()
125 memcpy(iovs[i].iov_base, pos, len); in spdk_scsi_task_scatter_data()
126 pos += len; in spdk_scsi_task_scatter_data()
133 spdk_scsi_task_gather_data(struct spdk_scsi_task *task, int *len) in spdk_scsi_task_gather_data() argument
147 *len = 0; in spdk_scsi_task_gather_data()
153 *len = -1; in spdk_scsi_task_gather_data()
[all …]
H A Dport.c81 uint32_t len; in spdk_scsi_port_set_iscsi_transport_id() local
93 len = snprintf(name, SPDK_SCSI_MAX_TRANSPORT_ID_LENGTH - sizeof(*data), in spdk_scsi_port_set_iscsi_transport_id()
96 name[len++] = '\0'; in spdk_scsi_port_set_iscsi_transport_id()
97 } while (len & 3); in spdk_scsi_port_set_iscsi_transport_id()
99 if (len < 20) { in spdk_scsi_port_set_iscsi_transport_id()
104 to_be16(&data->additional_len, len); in spdk_scsi_port_set_iscsi_transport_id()
105 port->transport_id_len = len + sizeof(*data); in spdk_scsi_port_set_iscsi_transport_id()
/spdk/test/unit/lib/json/json_util.c/
H A Djson_util_ut.c19 v.len = sizeof(x) - 1
55 v.len = sizeof("test") - 1; in test_strequal()
69 v.len = sizeof("test\0hello") - 1; in test_strequal()
205 object[3].len = 5; in test_decode_object()
210 object[3].len = 6; in test_decode_object()
267 values[0].len = 2; in test_decode_array()
269 values[1].len = 4; in test_decode_array()
272 values[2].len = 4; in test_decode_array()
282 values[0].len = 3; in test_decode_array()
287 values[0].len in test_decode_array()
[all...]
/spdk/test/env/mem_callbacks/
H A Dmem_callbacks.c20 size_t len; member
27 memory_hotplug_cb(enum rte_mem_event event_type, const void *addr, size_t len, void *arg) in memory_hotplug_cb() argument
35 printf("register %p %ju\n", addr, len); in memory_hotplug_cb()
37 allocation->len = len; in memory_hotplug_cb()
41 if (allocation->vaddr == (uintptr_t)addr && allocation->len == len) { in memory_hotplug_cb()
45 printf("unregister %p %ju %s\n", addr, len, allocation == NULL ? "FAILED" : "PASSED"); in memory_hotplug_cb()
54 const struct rte_memseg *ms, size_t len, void *arg) in memory_iter_cb() argument
61 printf("register %p %ju\n", ms->addr, len); in memory_iter_cb()
63 allocation->len = len; in memory_iter_cb()
70 verify_buffer(void *_buf, size_t len) in verify_buffer() argument
[all …]
/spdk/test/nvme/sgl/
H A Dsgl.c36 size_t len; member
57 offset += iov->len; in nvme_request_reset_sgl()
82 *address = iov->base + iov->offset + iov->len - req->current_iov_bytes_left; in nvme_request_next_sge()
87 *length = iov->len; in nvme_request_next_sge()
111 req->iovs[0].len = 0x800; in build_io_request_0()
121 req->iovs[0].len = 0x200; in build_io_request_1()
131 req->iovs[0].len = 0x40000; in build_io_request_2()
143 req->iovs[0].len = 0x800; in build_io_request_3()
147 req->iovs[1].len = 0x1000; in build_io_request_3()
151 req->iovs[2].len in build_io_request_3()
321 uint32_t len, lba_count; writev_readv_tests() local
[all...]
/spdk/test/unit/lib/nvmf/vfio_user.c/
H A Dvfio_user_ut.c13 DEFINE_STUB(spdk_mem_register, int, (void *vaddr, size_t len), 0);
14 DEFINE_STUB(spdk_mem_unregister, int, (void *vaddr, size_t len), 0);
46 gpa_to_vva(void *prv, uint64_t addr, uint64_t len, uint32_t flags) in gpa_to_vva()
57 uint32_t len; in test_nvme_cmd_map_prps()
69 len = 4096; 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()
73 CU_ASSERT(iovs[0].iov_len == len); in test_nvme_cmd_map_prps()
78 len = 4096; 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()
81 ret = nvme_cmd_map_prps(NULL, &cmd, iovs, 33, len, mp in test_nvme_cmd_map_prps()
45 gpa_to_vva(void * prv,uint64_t addr,uint64_t len,uint32_t flags) gpa_to_vva() argument
56 uint32_t len; test_nvme_cmd_map_prps() local
124 uint32_t len; test_nvme_cmd_map_sgls() local
[all...]
/spdk/test/unit/lib/keyring/keyring.c/
H A Dkeyring_ut.c15 int len; member
20 int len; member
37 /* Use spdk_json_val's start/len to pass a buffer with the key */ in ut_keyring_add_key()
38 memcpy(utkey->buf, opts->buf, opts->len); in ut_keyring_add_key()
39 utkey->len = opts->len; in ut_keyring_add_key()
51 memset(utkey->buf, 0, utkey->len); in ut_keyring_remove_key()
56 ut_keyring_get_key(struct spdk_key *key, void *buf, int len) in ut_keyring_get_key() argument
60 memcpy(buf, utkey->buf, utkey->len); in ut_keyring_get_key()
62 return utkey->len; in ut_keyring_get_key()
[all...]
/spdk/test/iscsi_tgt/rpc_config/
H A Drpc_config.py16 if (len(sys.argv) == 6):
201 verify(len(jsonvalues) == tag, 1,
202 "iscsi_get_portal_groups returned {} groups, expected {}".format(len(jsonvalues), tag))
218 verify(len(jsonvalues) == (len(tag_list) - (idx + 1)), 1,
219 "get_portal_group returned {} groups, expected {}".format(len(jsonvalues), (len(tag_list) - (idx + 1))))
246 verify(len(jsonvalues) == tag, 1,
247 "iscsi_get_initiator_groups returned {} groups, expected {}".format(len(jsonvalues), tag))
265 verify(len(jsonvalue
[all...]
/spdk/module/bdev/ocf/
H A Dvolume.c47 uint64_t len; in vbdev_ocf_volume_get_length() local
49 len = base->bdev->blocklen * base->bdev->blockcnt; in vbdev_ocf_volume_get_length()
51 return len; in vbdev_ocf_volume_get_length()
79 int len, i; in vbdev_ocf_volume_io_get()
85 len = MIN(bytes, orig_vec[i].iov_len - offset);
88 cpy_vec[i].iov_len = len; in vbdev_ocf_volume_io_put()
90 bytes -= len; in vbdev_ocf_volume_io_put()
120 int len, i; initialize_cpy_vector() local
266 uint64_t addr, len; vbdev_ocf_volume_submit_io() local
/spdk/lib/json/
H A Djson_util.c21 return val->len + 2; in spdk_json_val_len()
30 size_t len; in spdk_json_strequal() local
36 len = strlen(str); in spdk_json_strequal()
37 if (val->len != len) { in spdk_json_strequal()
41 return memcmp(val->start, str, len) == 0; in spdk_json_strequal()
47 size_t len; in spdk_json_strdup() local
54 len = val->len; in spdk_json_strdup()
56 if (memchr(val->start, '\0', len)) { in spdk_json_strdup()
61 s = malloc(len + 1); in spdk_json_strdup()
66 memcpy(s, val->start, len); in spdk_json_strdup()
[all …]
H A Djson_write.c168 spdk_json_write_val_raw(struct spdk_json_write_ctx *w, const void *data, size_t len) in spdk_json_write_val_raw() argument
171 return emit(w, data, len); in spdk_json_write_val_raw()
392 write_string_or_name(struct spdk_json_write_ctx *w, const char *val, size_t len) in write_string_or_name() argument
395 const uint8_t *end = val + len; in write_string_or_name()
429 write_string_or_name_utf16le(struct spdk_json_write_ctx *w, const uint16_t *val, size_t len) in write_string_or_name_utf16le() argument
432 const uint16_t *end = val + len; in write_string_or_name_utf16le()
460 spdk_json_write_string_raw(struct spdk_json_write_ctx *w, const char *val, size_t len) in spdk_json_write_string_raw() argument
463 return write_string_or_name(w, val, len); in spdk_json_write_string_raw()
473 spdk_json_write_string_utf16le_raw(struct spdk_json_write_ctx *w, const uint16_t *val, size_t len) in spdk_json_write_string_utf16le_raw() argument
476 return write_string_or_name_utf16le(w, val, len); in spdk_json_write_string_utf16le_raw()
[all …]
/spdk/test/common/lib/
H A Dtest_iobuf.c18 struct spdk_iobuf_entry *entry, uint64_t len));
71 spdk_iobuf_get(struct spdk_iobuf_channel *ch, uint64_t len, in spdk_iobuf_get()
83 if (len > g_iobuf.opts.small_bufsize) { in spdk_iobuf_get()
92 buf = calloc(1, len); in spdk_iobuf_get()
107 buf = calloc(1, len); in spdk_iobuf_put() argument
114 spdk_iobuf_put(struct spdk_iobuf_channel *ch, void *buf, uint64_t len) in spdk_iobuf_put()
123 if (len > g_iobuf.opts.small_bufsize) { in spdk_iobuf_put()
67 spdk_iobuf_get(struct spdk_iobuf_channel * ch,uint64_t len,struct spdk_iobuf_entry * entry,spdk_iobuf_get_cb cb_fn) spdk_iobuf_get() argument
/spdk/test/app/fuzz/vhost_fuzz/
H A Dvhost_fuzz.c447 if (val->len > 16) { in fuzz_json_decode_hex_uint64()
452 for (i = 0; i < val->len; i++) { in fuzz_json_decode_hex_uint64()
512 if (!strncmp(prev_value->start, "req_iov", prev_value->len)) { in parse_vhost_blk_cmds()
514 } else if (!strncmp(prev_value->start, "data_iov", prev_value->len)) { in parse_vhost_blk_cmds()
516 } else if (!strncmp(prev_value->start, "resp_iov", prev_value->len)) { in parse_vhost_blk_cmds()
518 } else if (!strncmp(prev_value->start, "type", prev_value->len)) { in parse_vhost_blk_cmds()
524 } else if (!strncmp(prev_value->start, "ioprio", prev_value->len)) { in parse_vhost_blk_cmds()
530 } else if (!strncmp(prev_value->start, "sector", prev_value->len)) { in parse_vhost_blk_cmds()
539 fprintf(stderr, "Invalid value supplied for io_ctx->%.*s: %.*s\n", prev_value->len, in parse_vhost_blk_cmds()
540 (char *)prev_value->start, value->len, (char *)value->start); in parse_vhost_blk_cmds()
[all …]
/spdk/test/unit/lib/sock/sock.c/
H A Dsock_ut.c140 spdk_ut_sock_recv(struct spdk_sock *_sock, void *buf, size_t len) in spdk_ut_sock_recv() argument
145 len = spdk_min(len, sock->bytes_avail); in spdk_ut_sock_recv()
147 if (len == 0) { in spdk_ut_sock_recv()
152 memcpy(buf, sock->buf, len); in spdk_ut_sock_recv()
153 memcpy(tmp, &sock->buf[len], sock->bytes_avail - len); in spdk_ut_sock_recv()
154 memcpy(sock->buf, tmp, sock->bytes_avail - len); in spdk_ut_sock_recv()
155 sock->bytes_avail -= len; in spdk_ut_sock_recv()
157 return len; in spdk_ut_sock_recv()
164 size_t len; spdk_ut_sock_readv() local
887 size_t len = 0; ut_sock_impl_get_set_opts() local
913 size_t len = 0; posix_sock_impl_get_set_opts() local
[all...]
/spdk/test/app/fuzz/common/
H A Dfuzz_common.h23 fuzz_fill_random_bytes(char *character_repr, size_t len, unsigned int *rand_seed) in fuzz_fill_random_bytes() argument
27 for (i = 0; i < len; i++) { in fuzz_fill_random_bytes()
47 fuzz_get_value_base_64_buffer(void *item, size_t len) in fuzz_get_value_base_64_buffer() argument
54 total_size = spdk_base64_get_encoded_strlen(len) + 1; in fuzz_get_value_base_64_buffer()
61 rc = spdk_base64_encode(value_string, item, len); in fuzz_get_value_base_64_buffer()
71 fuzz_get_base_64_buffer_value(void *item, size_t len, char *buf, size_t buf_len) in fuzz_get_base_64_buffer_value() argument
86 if (size_of_data < len) { in fuzz_get_base_64_buffer_value()
93 if (rc || size_of_data != len) { in fuzz_get_base_64_buffer_value()
202 if (!strncmp(values->start, obj_name, values->len)) { in fuzz_parse_args_into_array()
/spdk/lib/env_dpdk/22.07/
H A Drte_bus_pci.h137 uint64_t iova, size_t len);
156 uint64_t iova, size_t len);
307 void *buf, size_t len, off_t offset);
323 const void *buf, size_t len, off_t offset);
333 uint64_t len; /* only filled for memory mapped ports */ member
377 void *data, size_t len, off_t offset);
392 const void *data, size_t len, off_t offset);

123456789