* [PATCH] app/test-crypto-perf: add missed resubmission fix
@ 2024-01-05 6:55 Suanming Mou
2024-01-10 14:46 ` [EXT] " Anoob Joseph
2024-01-15 8:08 ` [PATCH v2] " Suanming Mou
0 siblings, 2 replies; 5+ messages in thread
From: Suanming Mou @ 2024-01-05 6:55 UTC (permalink / raw)
To: anoobj, ciara.power; +Cc: dev, stable
Currently, after enqueue_burst, there may be ops_unused ops
left for next round enqueue. And in next round preparation,
only ops_needed ops will be added. But if in the final round
the left ops is less than ops_needed, there will be invalid
ops between the new needed ops and previous unused ops. The
previous unused ops should be moved front after the needed
ops.
In the commit[1], an resubmission fix was added to throughput
test, and the fix was missed for verify.
This commit adds the missed resubmission fix for verify.
[1] 44e2980b70d1 ("app/crypto-perf: fix crypto operation resubmission")
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
---
app/test-crypto-perf/cperf_test_verify.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 2b0d3f142b..0328bb5724 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -275,7 +275,6 @@ cperf_verify_test_runner(void *test_ctx)
ops_needed, ctx->sess, ctx->options,
ctx->test_vector, iv_offset, &imix_idx, NULL);
-
/* Populate the mbuf with the test vector, for verification */
for (i = 0; i < ops_needed; i++)
cperf_mbuf_set(ops[i]->sym->m_src,
@@ -293,6 +292,19 @@ cperf_verify_test_runner(void *test_ctx)
}
#endif /* CPERF_LINEARIZATION_ENABLE */
+ /**
+ * When ops_needed is smaller than ops_enqd, the
+ * unused ops need to be moved to the front for
+ * next round use.
+ */
+ if (unlikely(ops_enqd > ops_needed)) {
+ size_t nb_b_to_mov = ops_unused * sizeof(
+ struct rte_crypto_op *);
+
+ memmove(&ops[ops_needed], &ops[ops_enqd],
+ nb_b_to_mov);
+ }
+
/* Enqueue burst of ops on crypto device */
ops_enqd = rte_cryptodev_enqueue_burst(ctx->dev_id, ctx->qp_id,
ops, burst_size);
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [EXT] [PATCH] app/test-crypto-perf: add missed resubmission fix
2024-01-05 6:55 [PATCH] app/test-crypto-perf: add missed resubmission fix Suanming Mou
@ 2024-01-10 14:46 ` Anoob Joseph
2024-01-15 7:46 ` Suanming Mou
2024-01-15 8:08 ` [PATCH v2] " Suanming Mou
1 sibling, 1 reply; 5+ messages in thread
From: Anoob Joseph @ 2024-01-10 14:46 UTC (permalink / raw)
To: Suanming Mou; +Cc: dev, stable, ciara.power
Hi Suanming,
Please see inline.
Thanks,
Anoob
> -----Original Message-----
> From: Suanming Mou <suanmingm@nvidia.com>
> Sent: Friday, January 5, 2024 12:26 PM
> To: Anoob Joseph <anoobj@marvell.com>; ciara.power@intel.com
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [EXT] [PATCH] app/test-crypto-perf: add missed resubmission fix
>
> External Email
>
> ----------------------------------------------------------------------
> Currently, after enqueue_burst, there may be ops_unused ops left for next
> round enqueue. And in next round preparation, only ops_needed ops will be
> added. But if in the final round the left ops is less than ops_needed, there
> will be invalid ops between the new needed ops and previous unused ops.
> The previous unused ops should be moved front after the needed ops.
>
> In the commit[1], an resubmission fix was added to throughput test, and the
> fix was missed for verify.
>
> This commit adds the missed resubmission fix for verify.
>
> [1] 44e2980b70d1 ("app/crypto-perf: fix crypto operation resubmission")
>
> Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test
> application")
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
> ---
> app/test-crypto-perf/cperf_test_verify.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-
> perf/cperf_test_verify.c
> index 2b0d3f142b..0328bb5724 100644
> --- a/app/test-crypto-perf/cperf_test_verify.c
> +++ b/app/test-crypto-perf/cperf_test_verify.c
> @@ -275,7 +275,6 @@ cperf_verify_test_runner(void *test_ctx)
> ops_needed, ctx->sess, ctx->options,
> ctx->test_vector, iv_offset, &imix_idx,
> NULL);
>
> -
> /* Populate the mbuf with the test vector, for verification */
> for (i = 0; i < ops_needed; i++)
> cperf_mbuf_set(ops[i]->sym->m_src,
> @@ -293,6 +292,19 @@ cperf_verify_test_runner(void *test_ctx)
> }
> #endif /* CPERF_LINEARIZATION_ENABLE */
>
> + /**
> + * When ops_needed is smaller than ops_enqd, the
> + * unused ops need to be moved to the front for
> + * next round use.
> + */
> + if (unlikely(ops_enqd > ops_needed)) {
> + size_t nb_b_to_mov = ops_unused * sizeof(
> + struct rte_crypto_op *);
[Anoob] The alignment is relaxed to 100 chars now. In case you think it improve code legibility.
Patch looks good either way.
Acked-by: Anoob Joseph <anoobj@marvell.com>
> +
> + memmove(&ops[ops_needed], &ops[ops_enqd],
> + nb_b_to_mov);
> + }
> +
> /* Enqueue burst of ops on crypto device */
> ops_enqd = rte_cryptodev_enqueue_burst(ctx->dev_id,
> ctx->qp_id,
> ops, burst_size);
> --
> 2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [EXT] [PATCH] app/test-crypto-perf: add missed resubmission fix
2024-01-10 14:46 ` [EXT] " Anoob Joseph
@ 2024-01-15 7:46 ` Suanming Mou
0 siblings, 0 replies; 5+ messages in thread
From: Suanming Mou @ 2024-01-15 7:46 UTC (permalink / raw)
To: Anoob Joseph; +Cc: dev, stable, ciara.power
> -----Original Message-----
> From: Anoob Joseph <anoobj@marvell.com>
> Sent: Wednesday, January 10, 2024 10:47 PM
> To: Suanming Mou <suanmingm@nvidia.com>
> Cc: dev@dpdk.org; stable@dpdk.org; ciara.power@intel.com
> Subject: RE: [EXT] [PATCH] app/test-crypto-perf: add missed resubmission fix
>
> Hi Suanming,
>
> Please see inline.
>
> Thanks,
> Anoob
>
> > -----Original Message-----
> > From: Suanming Mou <suanmingm@nvidia.com>
> > Sent: Friday, January 5, 2024 12:26 PM
> > To: Anoob Joseph <anoobj@marvell.com>; ciara.power@intel.com
> > Cc: dev@dpdk.org; stable@dpdk.org
> > Subject: [EXT] [PATCH] app/test-crypto-perf: add missed resubmission
> > fix
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > Currently, after enqueue_burst, there may be ops_unused ops left for
> > next round enqueue. And in next round preparation, only ops_needed ops
> > will be added. But if in the final round the left ops is less than
> > ops_needed, there will be invalid ops between the new needed ops and
> previous unused ops.
> > The previous unused ops should be moved front after the needed ops.
> >
> > In the commit[1], an resubmission fix was added to throughput test,
> > and the fix was missed for verify.
> >
> > This commit adds the missed resubmission fix for verify.
> >
> > [1] 44e2980b70d1 ("app/crypto-perf: fix crypto operation
> > resubmission")
> >
> > Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test
> > application")
> >
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
> > ---
> > app/test-crypto-perf/cperf_test_verify.c | 14 +++++++++++++-
> > 1 file changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/app/test-crypto-perf/cperf_test_verify.c
> > b/app/test-crypto- perf/cperf_test_verify.c index
> > 2b0d3f142b..0328bb5724 100644
> > --- a/app/test-crypto-perf/cperf_test_verify.c
> > +++ b/app/test-crypto-perf/cperf_test_verify.c
> > @@ -275,7 +275,6 @@ cperf_verify_test_runner(void *test_ctx)
> > ops_needed, ctx->sess, ctx->options,
> > ctx->test_vector, iv_offset, &imix_idx, NULL);
> >
> > -
> > /* Populate the mbuf with the test vector, for verification */
> > for (i = 0; i < ops_needed; i++)
> > cperf_mbuf_set(ops[i]->sym->m_src,
> > @@ -293,6 +292,19 @@ cperf_verify_test_runner(void *test_ctx)
> > }
> > #endif /* CPERF_LINEARIZATION_ENABLE */
> >
> > + /**
> > + * When ops_needed is smaller than ops_enqd, the
> > + * unused ops need to be moved to the front for
> > + * next round use.
> > + */
> > + if (unlikely(ops_enqd > ops_needed)) {
> > + size_t nb_b_to_mov = ops_unused * sizeof(
> > + struct rte_crypto_op *);
>
> [Anoob] The alignment is relaxed to 100 chars now. In case you think it improve
> code legibility.
>
> Patch looks good either way.
Make sense, it is due to the code was copied directly from previous fix. Will try to update v2. Thanks.
>
> Acked-by: Anoob Joseph <anoobj@marvell.com>
>
> > +
> > + memmove(&ops[ops_needed], &ops[ops_enqd],
> > + nb_b_to_mov);
> > + }
> > +
> > /* Enqueue burst of ops on crypto device */
> > ops_enqd = rte_cryptodev_enqueue_burst(ctx->dev_id,
> > ctx->qp_id,
> > ops, burst_size);
> > --
> > 2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] app/test-crypto-perf: add missed resubmission fix
2024-01-05 6:55 [PATCH] app/test-crypto-perf: add missed resubmission fix Suanming Mou
2024-01-10 14:46 ` [EXT] " Anoob Joseph
@ 2024-01-15 8:08 ` Suanming Mou
2024-02-29 17:03 ` [EXT] " Akhil Goyal
1 sibling, 1 reply; 5+ messages in thread
From: Suanming Mou @ 2024-01-15 8:08 UTC (permalink / raw)
To: anoobj, ciara.power; +Cc: dev, stable
Currently, after enqueue_burst, there may be ops_unused ops
left for next round enqueue. And in next round preparation,
only ops_needed ops will be added. But if in the final round
the left ops is less than ops_needed, there will be invalid
ops between the new needed ops and previous unused ops. The
previous unused ops should be moved front after the needed
ops.
In the commit[1], an resubmission fix was added to throughput
test, and the fix was missed for verify.
This commit adds the missed resubmission fix for verify.
[1]
commit 44e2980b70d1 ("app/crypto-perf: fix crypto operation resubmission")
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
---
v2: code-style update.
---
app/test-crypto-perf/cperf_test_verify.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 2b0d3f142b..10172a53a0 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -275,7 +275,6 @@ cperf_verify_test_runner(void *test_ctx)
ops_needed, ctx->sess, ctx->options,
ctx->test_vector, iv_offset, &imix_idx, NULL);
-
/* Populate the mbuf with the test vector, for verification */
for (i = 0; i < ops_needed; i++)
cperf_mbuf_set(ops[i]->sym->m_src,
@@ -293,6 +292,17 @@ cperf_verify_test_runner(void *test_ctx)
}
#endif /* CPERF_LINEARIZATION_ENABLE */
+ /**
+ * When ops_needed is smaller than ops_enqd, the
+ * unused ops need to be moved to the front for
+ * next round use.
+ */
+ if (unlikely(ops_enqd > ops_needed)) {
+ size_t nb_b_to_mov = ops_unused * sizeof(struct rte_crypto_op *);
+
+ memmove(&ops[ops_needed], &ops[ops_enqd], nb_b_to_mov);
+ }
+
/* Enqueue burst of ops on crypto device */
ops_enqd = rte_cryptodev_enqueue_burst(ctx->dev_id, ctx->qp_id,
ops, burst_size);
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [EXT] [PATCH v2] app/test-crypto-perf: add missed resubmission fix
2024-01-15 8:08 ` [PATCH v2] " Suanming Mou
@ 2024-02-29 17:03 ` Akhil Goyal
0 siblings, 0 replies; 5+ messages in thread
From: Akhil Goyal @ 2024-02-29 17:03 UTC (permalink / raw)
To: Suanming Mou, Anoob Joseph, ciara.power; +Cc: dev, stable
> Currently, after enqueue_burst, there may be ops_unused ops
> left for next round enqueue. And in next round preparation,
> only ops_needed ops will be added. But if in the final round
> the left ops is less than ops_needed, there will be invalid
> ops between the new needed ops and previous unused ops. The
> previous unused ops should be moved front after the needed
> ops.
>
> In the commit[1], an resubmission fix was added to throughput
> test, and the fix was missed for verify.
>
> This commit adds the missed resubmission fix for verify.
>
> [1]
> commit 44e2980b70d1 ("app/crypto-perf: fix crypto operation resubmission")
>
> Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
>
> Cc: stable@dpdk.org
>
> Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
>
> Acked-by: Anoob Joseph <anoobj@marvell.com>
> ---
>
> v2: code-style update.
>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-29 17:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-05 6:55 [PATCH] app/test-crypto-perf: add missed resubmission fix Suanming Mou
2024-01-10 14:46 ` [EXT] " Anoob Joseph
2024-01-15 7:46 ` Suanming Mou
2024-01-15 8:08 ` [PATCH v2] " Suanming Mou
2024-02-29 17:03 ` [EXT] " Akhil Goyal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).