@@ -998,7 +998,7 @@ roc_cpt_ctx_write(struct roc_cpt_lf *lf, void *sa_dptr, void *sa_cptr,
}
int
-roc_on_cpt_ctx_write(struct roc_cpt_lf *lf, void *sa, uint8_t opcode,
+roc_on_cpt_ctx_write(struct roc_cpt_lf *lf, uint64_t sa, uint8_t opcode,
uint16_t ctx_len, uint8_t egrp)
{
union cpt_res_s res, *hw_res;
@@ -1019,9 +1019,9 @@ roc_on_cpt_ctx_write(struct roc_cpt_lf *lf, void *sa, uint8_t opcode,
inst.w4.s.param1 = 0;
inst.w4.s.param2 = 0;
inst.w4.s.dlen = ctx_len;
- inst.dptr = rte_mempool_virt2iova(sa);
+ inst.dptr = sa;
inst.rptr = 0;
- inst.w7.s.cptr = rte_mempool_virt2iova(sa);
+ inst.w7.s.cptr = sa;
inst.w7.s.egrp = egrp;
inst.w0.u64 = 0;
@@ -1029,7 +1029,7 @@ roc_on_cpt_ctx_write(struct roc_cpt_lf *lf, void *sa, uint8_t opcode,
inst.w3.u64 = 0;
inst.res_addr = (uintptr_t)hw_res;
- rte_io_wmb();
+ plt_io_wmb();
do {
/* Copy CPT command to LMTLINE */
@@ -173,7 +173,7 @@ void __roc_api roc_cpt_parse_hdr_dump(const struct cpt_parse_hdr_s *cpth);
int __roc_api roc_cpt_ctx_write(struct roc_cpt_lf *lf, void *sa_dptr,
void *sa_cptr, uint16_t sa_len);
-int __roc_api roc_on_cpt_ctx_write(struct roc_cpt_lf *lf, void *sa,
+int __roc_api roc_on_cpt_ctx_write(struct roc_cpt_lf *lf, uint64_t sa,
uint8_t opcode, uint16_t ctx_len,
uint8_t egrp);
#endif /* _ROC_CPT_H_ */
@@ -82,8 +82,8 @@ cn9k_ipsec_outb_sa_create(struct cnxk_cpt_qp *qp,
ctx_len = ret;
opcode = ROC_IE_ON_MAJOR_OP_WRITE_IPSEC_OUTBOUND;
egrp = roc_cpt->eng_grp[CPT_ENG_TYPE_IE];
- ret = roc_on_cpt_ctx_write(&qp->lf, (void *)&sa->out_sa, opcode,
- ctx_len, egrp);
+ ret = roc_on_cpt_ctx_write(&qp->lf, rte_mempool_virt2iova(&sa->out_sa),
+ opcode, ctx_len, egrp);
if (ret)
return ret;
@@ -174,8 +174,8 @@ cn9k_ipsec_inb_sa_create(struct cnxk_cpt_qp *qp,
ctx_len = ret;
opcode = ROC_IE_ON_MAJOR_OP_WRITE_IPSEC_INBOUND;
egrp = roc_cpt->eng_grp[CPT_ENG_TYPE_IE];
- ret = roc_on_cpt_ctx_write(&qp->lf, (void *)&sa->in_sa, opcode, ctx_len,
- egrp);
+ ret = roc_on_cpt_ctx_write(&qp->lf, rte_mempool_virt2iova(&sa->in_sa),
+ opcode, ctx_len, egrp);
if (ret)
return ret;