On cn20k, security session CPTR is allocated separately from the SA
wrapper. Return the HW context pointer so cptr_read/write use the
256-byte aligned buffer as documented by the API.

Signed-off-by: Tejasree Kondoj <[email protected]>
---
 drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c 
b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
index 4c9bacecdd..6553ac90a1 100644
--- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c
@@ -1294,7 +1294,7 @@ rte_pmd_cnxk_crypto_cptr_get(struct 
rte_pmd_cnxk_crypto_sess *rte_sess)
                if (roc_model_is_cn20k()) {
                        struct cn20k_sec_session *sec_sess = 
PLT_PTR_CAST(rte_sess->sec_sess);
 
-                       return PLT_PTR_CAST(&sec_sess->sa);
+                       return PLT_PTR_CAST(sec_sess->sa.sa_ptr);
                }
 
                if (roc_model_is_cn10k()) {
-- 
2.43.0

Reply via email to