+int
+otx2_cpt_hardware_caps_get(const struct rte_cryptodev *dev,
+ union cpt_eng_caps *hw_caps)
+{
+ struct otx2_cpt_vf *vf = dev->data->dev_private;
+ struct otx2_dev *otx2_dev = &vf->otx2_dev;
+ struct cpt_caps_rsp_msg *rsp;
+ int ret;
+
+ otx2_mbox_alloc_msg_cpt_caps_get(otx2_dev->mbox);
+
+ ret = otx2_mbox_process_msg(otx2_dev->mbox, (void *)&rsp);
+ if (ret)
+ return -EIO;
+
+ if (rsp->cpt_pf_drv_version != OTX2_CPT_PMD_VERSION) {
+ otx2_err("Incompatible CPT PMD version"
+ "(Kernel: 0x%04x DPDK: 0x%04x)",
+ rsp->cpt_pf_drv_version, OTX2_CPT_PMD_VERSION);
+ return -EPIPE;
+ }
+
+ vf->cpt_revision = rsp->cpt_revision;
+ memcpy(hw_caps, rsp->eng_caps,
+ sizeof(union cpt_eng_caps) * CPT_MAX_ENG_TYPES);
+
+ return 0;
+}
+