[2/2] crypto/cnxk: remove delay in stats

Message ID 20240826085432.2480734-2-anoobj@marvell.com (mailing list archive)
State Accepted
Delegated to: akhil goyal
Headers
Series [1/2] test/crypto: allow retries with stats test |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation warning apply issues
ci/github-robot: build success github build: passed

Commit Message

Anoob Joseph Aug. 26, 2024, 8:54 a.m. UTC
Having 1 ms delay for retrieving stats per session would mean
significant delay for a system with large number of sessions. If
accurate stats are required, application can call stats again
after a delay and get most updated stats.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 drivers/crypto/cnxk/cn10k_ipsec.c | 2 --
 1 file changed, 2 deletions(-)
  

Patch

diff --git a/drivers/crypto/cnxk/cn10k_ipsec.c b/drivers/crypto/cnxk/cn10k_ipsec.c
index 7517602fa4..8123a5f97b 100644
--- a/drivers/crypto/cnxk/cn10k_ipsec.c
+++ b/drivers/crypto/cnxk/cn10k_ipsec.c
@@ -350,13 +350,11 @@  cn10k_ipsec_stats_get(struct cnxk_cpt_qp *qp, struct cn10k_sec_session *sess,
 	if (sess->ipsec.is_outbound) {
 		out_sa = &sa->out_sa;
 		roc_cpt_lf_ctx_flush(&qp->lf, out_sa, false);
-		rte_delay_ms(1);
 		stats->ipsec.opackets = out_sa->ctx.mib_pkts;
 		stats->ipsec.obytes = out_sa->ctx.mib_octs;
 	} else {
 		in_sa = &sa->in_sa;
 		roc_cpt_lf_ctx_flush(&qp->lf, in_sa, false);
-		rte_delay_ms(1);
 		stats->ipsec.ipackets = in_sa->ctx.mib_pkts;
 		stats->ipsec.ibytes = in_sa->ctx.mib_octs;
 	}