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

Anoob Joseph anoobj at marvell.com
Mon Aug 26 10:54:22 CEST 2024


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 at marvell.com>
---
 drivers/crypto/cnxk/cn10k_ipsec.c | 2 --
 1 file changed, 2 deletions(-)

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;
 	}
-- 
2.45.2



More information about the dev mailing list