crypto/cnxk: use unique cache line per inst
authorAnoob Joseph <anoobj@marvell.com>
Mon, 31 Jan 2022 12:30:28 +0000 (18:00 +0530)
committerAkhil Goyal <gakhil@marvell.com>
Sat, 12 Feb 2022 09:26:38 +0000 (10:26 +0100)
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 <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
drivers/crypto/cnxk/cnxk_cryptodev_ops.h

index e521f07..0656ba9 100644 (file)
@@ -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 */