DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] common/cnxk: align CPT queue depth to power of 2
@ 2021-10-18  7:51 Anoob Joseph
  2021-10-18  7:51 ` [dpdk-dev] [PATCH 2/2] crypto/cnxk: rework pending queue Anoob Joseph
  2021-10-20 14:14 ` [dpdk-dev] [PATCH 1/2] common/cnxk: align CPT queue depth to power of 2 Akhil Goyal
  0 siblings, 2 replies; 3+ messages in thread
From: Anoob Joseph @ 2021-10-18  7:51 UTC (permalink / raw)
  To: Akhil Goyal, Jerin Jacob
  Cc: Anoob Joseph, Archana Muniganti, Tejasree Kondoj, dev

Use CPT LF queue depth as power of 2 to aid in masked checks for pending
queue.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
---
 drivers/common/cnxk/roc_cpt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index 74ada6e..5674418 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -568,6 +568,9 @@ cpt_lf_init(struct roc_cpt_lf *lf)
 	if (lf->nb_desc == 0 || lf->nb_desc > CPT_LF_MAX_NB_DESC)
 		lf->nb_desc = CPT_LF_DEFAULT_NB_DESC;
 
+	/* Update nb_desc to next power of 2 to aid in pending queue checks */
+	lf->nb_desc = plt_align32pow2(lf->nb_desc);
+
 	/* Allocate memory for instruction queue for CPT LF. */
 	iq_mem = plt_zmalloc(cpt_lf_iq_mem_calc(lf->nb_desc), ROC_ALIGN);
 	if (iq_mem == NULL)
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-20 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18  7:51 [dpdk-dev] [PATCH 1/2] common/cnxk: align CPT queue depth to power of 2 Anoob Joseph
2021-10-18  7:51 ` [dpdk-dev] [PATCH 2/2] crypto/cnxk: rework pending queue Anoob Joseph
2021-10-20 14:14 ` [dpdk-dev] [PATCH 1/2] common/cnxk: align CPT queue depth to power of 2 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).