From aa6db9037e0c620bb4c2862dcdbc65a4770d719e Mon Sep 17 00:00:00 2001 From: Anoob Joseph Date: Mon, 31 Jan 2022 18:00:28 +0530 Subject: [PATCH] crypto/cnxk: use unique cache line per inst CPT inflight request is used to track a request that is enqueued to cryptodev. Having more than one inst use the same cacheline can result in serialization of CPT result memory writes causing perf degradations. Align inflight request to ROC cache line to ensure only one result would be written per cache line.. Signed-off-by: Anoob Joseph Acked-by: Akhil Goyal --- drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.h b/drivers/crypto/cnxk/cnxk_cryptodev_ops.h index e521f07585..0656ba9675 100644 --- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.h +++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.h @@ -40,7 +40,9 @@ struct cpt_inflight_req { void *mdata; uint8_t op_flags; void *qp; -} __rte_aligned(16); +} __rte_aligned(ROC_ALIGN); + +PLT_STATIC_ASSERT(sizeof(struct cpt_inflight_req) == ROC_CACHE_LINE_SZ); struct pending_queue { /** Array of pending requests */ -- 2.20.1