Content-Type: multipart/mixed; boundary="===============2214591446665932700==" MIME-Version: 1.0 From: Tony Zhu Subject: [Accel-config] [PATCH v1 1/9] accel-config/test: add drain operation support for single submission Date: Fri, 11 Feb 2022 21:16:25 +0800 Message-ID: <20220211131633.1652340-2-tony.zhu@intel.com> In-Reply-To: 20220211131633.1652340-1-tony.zhu@intel.com To: accel-config@lists.01.org List-ID: --===============2214591446665932700== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Drain submission is similiar as noop operation, so modify test_noop to support drain operation. It is not necessary to test drain in batch, single submission is enough.A Drain descriptor may not be included in a batch. It is treated as an unsupported operation type. The batch completion status is 0x5,the drain subtask completion status should be 0x10. In dsa_test for batch, drain is not a support operation. Signed-off-by: Tony Zhu --- test/dsa_test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/dsa_test.c b/test/dsa_test.c index eccf89c..8407bfc 100644 --- a/test/dsa_test.c +++ b/test/dsa_test.c @@ -136,7 +136,7 @@ static int test_batch(struct dsa_context *ctx, size_t b= uf_size, return rc; } = -static int test_noop(struct dsa_context *ctx, int tflags, int num_desc) +static int test_noop_drain(struct dsa_context *ctx, int tflags, uint32_t o= pcode, int num_desc) { struct task_node *tsk_node; int rc =3D DSA_STATUS_OK; @@ -161,7 +161,7 @@ static int test_noop(struct dsa_context *ctx, int tflag= s, int num_desc) /* allocate memory to src and dest buffers and fill in the desc for all = the nodes*/ tsk_node =3D ctx->multi_task_node; while (tsk_node) { - tsk_node->tsk->opcode =3D DSA_OPCODE_NOOP; + tsk_node->tsk->opcode =3D opcode; tsk_node->tsk->test_flags =3D tflags; tsk_node =3D tsk_node->next; } @@ -404,7 +404,8 @@ int main(int argc, char *argv[]) = switch (opcode) { case DSA_OPCODE_NOOP: - rc =3D test_noop(dsa, tflags, num_desc); + case DSA_OPCODE_DRAIN: + rc =3D test_noop_drain(dsa, tflags, opcode, num_desc); if (rc !=3D DSA_STATUS_OK) goto error; break; -- = 2.27.0 --===============2214591446665932700==--