Lines Matching refs:ctx

30 	struct test_ctx *ctx = _ctx;  in test_seq_complete_cb()  local
46 if (memcmp(ctx->buf1, expected_buf1, TEST_XFER_SIZE) != 0 || in test_seq_complete_cb()
47 memcmp(ctx->buf2, expected_buf2, TEST_XFER_SIZE) != 0 || in test_seq_complete_cb()
48 memcmp(ctx->buf1_bck, expected_buf1_bck, TEST_XFER_SIZE != 0) || in test_seq_complete_cb()
49 memcmp(ctx->buf2_bck, expected_buf2_bck, TEST_XFER_SIZE != 0)) { in test_seq_complete_cb()
54 spdk_put_io_channel(ctx->ch); in test_seq_complete_cb()
62 struct test_ctx *ctx = _ctx; in start_driver() local
65 ctx->ch = spdk_accel_get_io_channel(); in start_driver()
66 if (ctx->ch == NULL) { in start_driver()
73 memset(ctx->buf1, INITIAL_PATTERN_1, TEST_XFER_SIZE); in start_driver()
74 memset(ctx->buf2, INITIAL_PATTERN_2, TEST_XFER_SIZE); in start_driver()
75 memset(ctx->buf1_bck, INITIAL_PATTERN_0, TEST_XFER_SIZE); in start_driver()
76 memset(ctx->buf2_bck, INITIAL_PATTERN_0, TEST_XFER_SIZE); in start_driver()
78 ctx->iov1.iov_base = ctx->buf1; in start_driver()
79 ctx->iov1.iov_len = TEST_XFER_SIZE; in start_driver()
81 ctx->iov2.iov_base = ctx->buf2; in start_driver()
82 ctx->iov2.iov_len = TEST_XFER_SIZE; in start_driver()
84 ctx->iov1_bck.iov_base = ctx->buf1_bck; in start_driver()
85 ctx->iov1_bck.iov_len = TEST_XFER_SIZE; in start_driver()
87 ctx->iov2_bck.iov_base = ctx->buf2_bck; in start_driver()
88 ctx->iov2_bck.iov_len = TEST_XFER_SIZE; in start_driver()
96 rc = spdk_accel_append_copy(&seq, ctx->ch, &ctx->iov1_bck, IOVCNT, NULL, NULL, in start_driver()
97 &ctx->iov1, IOVCNT, NULL, NULL, in start_driver()
103 rc = spdk_accel_append_fill(&seq, ctx->ch, &ctx->buf1, TEST_XFER_SIZE, in start_driver()
110 rc = spdk_accel_append_copy(&seq, ctx->ch, &ctx->iov2_bck, IOVCNT, NULL, NULL, in start_driver()
111 &ctx->iov2, IOVCNT, NULL, NULL, in start_driver()
117 rc = spdk_accel_append_fill(&seq, ctx->ch, &ctx->buf2, TEST_XFER_SIZE, in start_driver()
124 spdk_accel_sequence_finish(seq, test_seq_complete_cb, ctx); in start_driver()
128 spdk_put_io_channel(ctx->ch); in start_driver()
137 struct test_ctx ctx = {}; in main() local
152 rc = spdk_app_start(&opts, start_driver, &ctx); in main()