Spdk/lib/util/spdk_util.map
Ben Walker cd8c36f2fe util: Add spdk_ioviter for iterating iovecs
spdk_ioviter_next will walk through two iovecs and yield pointers
to common length segments. For example, given a source iovec (siov) with
4 1KiB elements and a destination iovec (diov) with 1 4KiB element, the
following will happen:

first spdk_ioviter_next:

src = siov[0].iov_base
dst = diov[0].iov_base
len = 1KiB

second spdk_ioviter_next:

src = siov[1].iov_base
dst = diov[0].iov_base + 1KiB
len = 1KiB

third spdk_ioviter_next:

src = siov[2].iov_base
dst = diov[0].iov_base + 2KiB
len = 1KiB

fourth spdk_ioviter_next:

src = siov[3].iov_base
dst = diov[0].iov_base + 3KiB
len = 1KiB

fifth spdk_ioviter_next:

len = 0

This is a useful utility for performing operations where both the source
and destination are scattered memory. As an example and a test vehicle,
spdk_iovcpy has been updated to use this internally.

Change-Id: I7e35e76d38e78d07ea1caf6282d0dfc02182aa83
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10284
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-12-17 09:45:44 +00:00

157 lines
3.2 KiB
Plaintext

{
global:
# public functions in base64.h
spdk_base64_encode;
spdk_base64_urlsafe_encode;
spdk_base64_decode;
spdk_base64_urlsafe_decode;
# public functions in bit_array.h
spdk_bit_array_capacity;
spdk_bit_array_create;
spdk_bit_array_free;
spdk_bit_array_resize;
spdk_bit_array_get;
spdk_bit_array_set;
spdk_bit_array_clear;
spdk_bit_array_find_first_set;
spdk_bit_array_find_first_clear;
spdk_bit_array_count_set;
spdk_bit_array_count_clear;
spdk_bit_array_store_mask;
spdk_bit_array_load_mask;
spdk_bit_array_clear_mask;
# public functions in bit_pool.h
spdk_bit_pool_capacity;
spdk_bit_pool_create;
spdk_bit_pool_create_from_array;
spdk_bit_pool_free;
spdk_bit_pool_resize;
spdk_bit_pool_is_allocated;
spdk_bit_pool_allocate_bit;
spdk_bit_pool_free_bit;
spdk_bit_pool_count_allocated;
spdk_bit_pool_count_free;
spdk_bit_pool_store_mask;
spdk_bit_pool_load_mask;
spdk_bit_pool_free_all_bits;
# public functions in cpuset.h
spdk_cpuset_alloc;
spdk_cpuset_free;
spdk_cpuset_equal;
spdk_cpuset_copy;
spdk_cpuset_and;
spdk_cpuset_or;
spdk_cpuset_xor;
spdk_cpuset_negate;
spdk_cpuset_zero;
spdk_cpuset_set_cpu;
spdk_cpuset_get_cpu;
spdk_cpuset_count;
spdk_cpuset_fmt;
spdk_cpuset_parse;
# public functions in crc16.h
spdk_crc16_t10dif;
spdk_crc16_t10dif_copy;
# public functions in crc32.h
spdk_crc32_ieee_update;
spdk_crc32c_update;
spdk_crc32c_iov_update;
# public functions in dif.h
spdk_dif_ctx_init;
spdk_dif_ctx_set_data_offset;
spdk_dif_ctx_set_remapped_init_ref_tag;
spdk_dif_generate;
spdk_dif_verify;
spdk_dif_update_crc32c;
spdk_dif_generate_copy;
spdk_dif_verify_copy;
spdk_dif_inject_error;
spdk_dix_generate;
spdk_dix_verify;
spdk_dix_inject_error;
spdk_dif_set_md_interleave_iovs;
spdk_dif_generate_stream;
spdk_dif_verify_stream;
spdk_dif_update_crc32c_stream;
spdk_dif_get_range_with_md;
spdk_dif_get_length_with_md;
spdk_dif_remap_ref_tag;
spdk_dix_remap_ref_tag;
# public functions in fd.h
spdk_fd_get_size;
spdk_fd_get_blocklen;
# public functions in file.h
spdk_posix_file_load;
# public functions in pipe.h
spdk_pipe_create;
spdk_pipe_destroy;
spdk_pipe_writer_get_buffer;
spdk_pipe_writer_advance;
spdk_pipe_reader_bytes_available;
spdk_pipe_reader_get_buffer;
spdk_pipe_reader_advance;
# public functions in string.h
spdk_sprintf_alloc;
spdk_vsprintf_alloc;
spdk_sprintf_append_realloc;
spdk_vsprintf_append_realloc;
spdk_strlwr;
spdk_strsepq;
spdk_str_trim;
spdk_strerror_r;
spdk_strerror;
spdk_str_chomp;
spdk_strcpy_pad;
spdk_strlen_pad;
spdk_parse_ip_addr;
spdk_parse_capacity;
spdk_mem_all_zero;
spdk_strtol;
spdk_strtoll;
# public functions in util.h
spdk_u32log2;
spdk_u64log2;
spdk_iovcpy;
spdk_ioviter_first;
spdk_ioviter_next;
# resolvers for functions in util.h
spdk_u32log2.resolver;
spdk_u64log2.resolver;
# public functions in uuid.h
spdk_uuid_parse;
spdk_uuid_fmt_lower;
spdk_uuid_compare;
spdk_uuid_generate;
spdk_uuid_copy;
# public functions in fd_group.h
spdk_fd_group_create;
spdk_fd_group_destroy;
spdk_fd_group_wait;
spdk_fd_group_add;
spdk_fd_group_remove;
spdk_fd_group_event_modify;
spdk_fd_group_get_fd;
# public functions in zipf.h
spdk_zipf_create;
spdk_zipf_free;
spdk_zipf_generate;
local: *;
};