1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 */ 4 5 #include "spdk_internal/mock.h" 6 7 DEFINE_STUB(spdk_notify_send, uint64_t, (const char *type, const char *ctx), 0); 8 DEFINE_STUB(spdk_notify_type_register, struct spdk_notify_type *, (const char *type), NULL); 9 DEFINE_STUB(spdk_memory_domain_get_dma_device_id, const char *, (struct spdk_memory_domain *domain), 10 "test_domain"); 11 DEFINE_STUB(spdk_memory_domain_get_dma_device_type, enum spdk_dma_device_type, 12 (struct spdk_memory_domain *domain), 0); 13 DEFINE_STUB_V(spdk_accel_sequence_finish, 14 (struct spdk_accel_sequence *seq, spdk_accel_completion_cb cb_fn, void *cb_arg)); 15 DEFINE_STUB_V(spdk_accel_sequence_abort, (struct spdk_accel_sequence *seq)); 16 DEFINE_STUB_V(spdk_accel_sequence_reverse, (struct spdk_accel_sequence *seq)); 17 DEFINE_STUB(spdk_accel_append_copy, int, 18 (struct spdk_accel_sequence **seq, struct spdk_io_channel *ch, struct iovec *dst_iovs, 19 uint32_t dst_iovcnt, struct spdk_memory_domain *dst_domain, void *dst_domain_ctx, 20 struct iovec *src_iovs, uint32_t src_iovcnt, struct spdk_memory_domain *src_domain, 21 void *src_domain_ctx, spdk_accel_step_cb cb_fn, void *cb_arg), 0); 22 DEFINE_STUB(spdk_accel_append_dif_verify_copy, int, 23 (struct spdk_accel_sequence **seq, struct spdk_io_channel *ch, 24 struct iovec *dst_iovs, size_t dst_iovcnt, 25 struct spdk_memory_domain *dst_domain, void *dst_domain_ctx, 26 struct iovec *src_iovs, size_t src_iovcnt, 27 struct spdk_memory_domain *src_domain, void *src_domain_ctx, 28 uint32_t num_blocks, 29 const struct spdk_dif_ctx *ctx, struct spdk_dif_error *err, 30 spdk_accel_step_cb cb_fn, void *cb_arg), 0); 31 DEFINE_STUB(spdk_accel_append_dif_generate_copy, int, 32 (struct spdk_accel_sequence **seq, 33 struct spdk_io_channel *ch, 34 struct iovec *dst_iovs, size_t dst_iovcnt, 35 struct spdk_memory_domain *dst_domain, void *dst_domain_ctx, 36 struct iovec *src_iovs, size_t src_iovcnt, 37 struct spdk_memory_domain *src_domain, void *src_domain_ctx, 38 uint32_t num_blocks, const struct spdk_dif_ctx *ctx, 39 spdk_accel_step_cb cb_fn, void *cb_arg), 0); 40 DEFINE_STUB(spdk_accel_get_memory_domain, struct spdk_memory_domain *, (void), NULL); 41 DEFINE_STUB(spdk_accel_get_buf, int, (struct spdk_io_channel *ch, uint64_t len, void **buf, 42 struct spdk_memory_domain **domain, void **domain_ctx), 0); 43 DEFINE_STUB_V(spdk_accel_put_buf, (struct spdk_io_channel *ch, void *buf, 44 struct spdk_memory_domain *domain, void *domain_ctx)); 45