Hi Anoob, > const struct rte_cryptodev_capabilities * > -otx_get_capabilities(void) > +otx_get_capabilities(uint64_t flags) > { > - return otx_capabilities; > + if (flags & RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO) > + return otx_asym_capabilities; > + else > + return otx_sym_capabilities; > + > }
I believe this will give Asym capabilities always. As the feature flag RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO will always be set, as the flags are set in init. It will never go in else. > diff --git a/drivers/crypto/octeontx/otx_cryptodev_capabilities.h > b/drivers/crypto/octeontx/otx_cryptodev_capabilities.h > index fc62821..439b50e 100644 > --- a/drivers/crypto/octeontx/otx_cryptodev_capabilities.h > +++ b/drivers/crypto/octeontx/otx_cryptodev_capabilities.h > @@ -8,10 +8,9 @@ > #include <rte_cryptodev.h> > > /* > - * Get capabilities list for the device > - * > + * Get capabilities list for the device, based on device type > */ > const struct rte_cryptodev_capabilities * > -otx_get_capabilities(void); > +otx_get_capabilities(uint64_t flags); > > #endif /* _OTX_CRYPTODEV_CAPABILITIES_H_ */ > diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c > b/drivers/crypto/octeontx/otx_cryptodev_ops.c > index 88efed3..b59a001 100644 > --- a/drivers/crypto/octeontx/otx_cryptodev_ops.c > +++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c > @@ -105,7 +105,7 @@ otx_cpt_dev_info_get(struct rte_cryptodev *dev, struct > rte_cryptodev_info *info) > if (info != NULL) { > info->max_nb_queue_pairs = CPT_NUM_QS_PER_VF; > info->feature_flags = dev->feature_flags; > - info->capabilities = otx_get_capabilities(); > + info->capabilities = otx_get_capabilities(info->feature_flags); > info->sym.max_nb_sessions = 0; > info->driver_id = otx_cryptodev_driver_id; > info->min_mbuf_headroom_req = > OTX_CPT_MIN_HEADROOM_REQ; > @@ -635,7 +635,8 @@ otx_cpt_dev_create(struct rte_cryptodev *c_dev) > case OTX_CPT_VF_TYPE_AE: > /* Set asymmetric cpt feature flags */ > c_dev->feature_flags = > RTE_CRYPTODEV_FF_ASYMMETRIC_CRYPTO | > - RTE_CRYPTODEV_FF_HW_ACCELERATED; > + RTE_CRYPTODEV_FF_HW_ACCELERATED | > + RTE_CRYPTODEV_FF_RSA_PRIV_OP_KEY_QT; > break; > case OTX_CPT_VF_TYPE_SE: > /* Set symmetric cpt feature flags */ > -- > 2.7.4