Content-Type: multipart/mixed; boundary="===============5373724503666386310==" MIME-Version: 1.0 From: Dave Jiang Subject: [Accel-config] Re: [PATCH v1 1/9] accel-config/test: add drain operation support for single submission Date: Fri, 11 Feb 2022 10:08:11 -0700 Message-ID: In-Reply-To: 20220211131633.1652340-2-tony.zhu@intel.com To: accel-config@lists.01.org List-ID: --===============5373724503666386310== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 2/11/2022 6:16 AM, Tony Zhu wrote: > 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. For drain operation, it would make more sense if another operation is = submitted in front of it. Perhaps send a MEMMOVE immediately followed by = DRAIN? > > 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= buf_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= opcode, 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 tfl= ags, int num_desc) > /* allocate memory to src and dest buffers and fill in the desc for a= ll 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; --===============5373724503666386310==--